Spaces:
Running
Running
import{w,r as n,u as C,a as c,j as a}from"./index.2b3b4b39.js";import{r as u,b as l}from"./axios.1fa0e28b.js";import"./utils.62547028.js";const x=()=>{let e={url:l.PageCustomService,data:{name:"msw111"}};return u.get(e)},B=()=>{let e={url:l.PageCustomService2,data:{name:"msw111"}};return u.get(e)},b=e=>{let r={url:l.resetPassword,data:{name:e}};return u.post(r)},y=e=>{let r={url:l.commonUpload,data:e};return u.file(r)},D=()=>{let e={url:l.exportDetails,data:{id:4,fileName:"\u7533\u8BF7\u5546\u54C1\u660E\u7EC6.xls",export:1}};return u.get(e)};function v(e){n.exports.useState(!0);let r=C();console.log(r),n.exports.useEffect(()=>{i()},[]);const i=async()=>{let{data:t,code:s}=await x();await B(),console.log(t,s)},p=async()=>{let{code:t,data:s}=await b("gdtest002");console.log(t,s)},[o,d]=n.exports.useState(null),m=async()=>{if(!o)return;if((o==null?void 0:o.size)>2*1024*1024){alert("\u5927\u4E86");return}let t=new FormData;const s=e.name||"file";t.append(s,o);let{code:f,data:h}=await y(t);console.log(f,h)},g=async()=>{let t=await D();console.log(t)};return c("div",{className:"User",children:["user",a("p",{children:a("button",{onClick:()=>{p()},children:"post\u8BF7\u6C42"})}),a("p",{children:a("button",{onClick:()=>{r.replace("/about")},children:"\u70B9\u6211\u53BBabout"})}),a("p",{children:a("button",{onClick:()=>{g()},children:"\u70B9\u6211\u4E0B\u8F7D"})}),c("p",{children:[a("input",{type:"file",onChange:t=>{d(t.target.files[0])}}),a("button",{onClick:()=>{m()},children:"\u70B9\u6211\u4E0A\u4F20"})]})]})}var S=w(v);export{S as default}; | |