tntd 3.1.6 → 3.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";(Object("undefined"!=typeof self?self:this).webpackChunktntd=Object("undefined"!=typeof self?self:this).webpackChunktntd||[]).push([[930],{84930:(e,t,a)=>{a.r(t),a.d(t,{default:()=>p});var n=a(84639),o=a.n(n),l=a(53130),s=a(32767),c=a(9906),r=a(19466),d=a(52110);const u=new l.Z;let i={account:void 0,password:void 0};const p=e=>{let{visible:t,close:a,signIn:l}=e;const[p,f]=(0,n.useState)(!1),h=localStorage.getItem("accountInfo");if(h)try{i=JSON.parse(h)}catch(e){}const[m,b]=(0,n.useState)(i),{account:v,password:g}=m,k=(e,t)=>{b({...m,[e]:t.target.value})};return o().createElement(s.ZP,{title:"开发者模拟登陆",visible:t,maskClosable:!1,onOk:()=>{f(!0);const e=l&&l(m);e&&e.then&&e.then((e=>{d.Z.success("模拟登陆成功"),localStorage.setItem("accountInfo",JSON.stringify(m)),f(!1),setTimeout((()=>{const{tdToken:t,userId:n}=e||{};u.set("_td_token_",t,{path:"/"}),u.set("_uid_",n,{path:"/"}),a()}),500)})).catch((e=>{throw f(!1),e}))},onCancel:a,confirmLoading:p},o().createElement(r.Z,{labelCol:{span:5},wrapperCol:{span:18}},o().createElement(r.Z.Item,{label:"用户名:"},o().createElement(c.default,{type:"text",placeholder:"请输入用户名",value:v||void 0,onChange:e=>k("account",e)})),o().createElement(r.Z.Item,{label:"密码:"},o().createElement(c.default,{type:"text",placeholder:"请输入用户名",value:g||void 0,onChange:e=>k("password",e)}))))}}}]);