text: var l=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var m=e=>l(e,"__esModule",{value:!0});var p=(e,r)=>{for(var t in r)l(e,t,{get:r[t],enumerable:!0})};var c=(e,r,t,n)=>{for(var o=n>1?void 0:n?f(r,t):r,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(n?a(r,t,o):a(o))||o);return n&&o&&l(r,t,o),o};m(exports);p(exports,{default:()=>y});var d=window.$common.getRequester("//wqao.top",async e=>{if(e.code!==200)throw new Error(e.message);return e.data});function w(){return d.request("POST","/alfred/user/info",null,window.$common.getHeaders())}function g(e){return d.request("POST","/alfred/user/login",e,window.$common.getHeaders())}function u(){return(e,r,t)=>{let n=t.value;t.value=function(){this.loginModal=!1,this.userModel={account:"",password:"",nickname:""},this.postLogin=async()=>{if(!this.userModel.account)throw new Error("\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A");if(!this.userModel.password)throw new Error("\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A");return await g(this.userModel)},this.tokenCharge=async()=>{if(!localStorage["token-qqlx"])throw new Error("\u8BF7\u5148\u767B\u5F55");window.$store.commit("clearUserInfo");let o=await w();window.$store.commit("setUserInfo",o)},this.clearLocalUserInfo=()=>{window.$store.commit("clearUserInfo"),localStorage["token-qqlx"]=""},n.apply(this,arguments)}}}var h=window.$common.Loadding,i=class{constructor(){this.logined=!1;this.initReact()}async initReact(){try{await this.tokenCharge()}catch(e){window.$common.loadOff(e),this.clearLocalUserInfo()}}async postMyLogin(){let e=await this.postLogin();localStorage["token-qqlx"]=e.authorization,window.$store.commit("setUserInfo",e),window.$tip("\u767B\u5F55\u6210\u529F"),window.$router.push({path:"/users"})}reLogin(){window.$confirm("\u786E\u8BA4","\u786E\u5B9E\u8981\u6CE8\u9500\u767B\u5F55\u5417?",e=>{!e||(this.clearLocalUserInfo(),location.reload())})}};c([u()],i.prototype,"initReact",1),c([h()],i.prototype,"postMyLogin",1);var y=i;
  