Spaces:
Running
Running
import{w,r as n,u as C,a as c,j as a}from"./index.bd3517ca.js";import{r as u,a as l}from"./axios.a426b7c9.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)},y=e=>{let r={url:l.resetPassword,data:{name:e}};return u.post(r)},D=e=>{let r={url:l.commonUpload,data:e};return u.file(r)},b=()=>{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 y("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 D(t);console.log(f,h)},g=async()=>{let t=await b();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}; | |