2 lines
514 B
JavaScript
2 lines
514 B
JavaScript
"use strict";require("../store/index.js");const e=require("../utils/http.js"),r=require("../store/user.js");exports.getUserInfo=()=>{return t=exports,s=null,n=function*(){try{const t=yield e.httpGet("/user/userinfo");return 200==t.code?(r.useUserStore().setUserInfo(t.data),t.data):null}catch(t){return null}},new Promise(((e,r)=>{var u=e=>{try{a(n.next(e))}catch(t){r(t)}},o=e=>{try{a(n.throw(e))}catch(t){r(t)}},a=r=>r.done?e(r.value):Promise.resolve(r.value).then(u,o);a((n=n.apply(t,s)).next())}));var t,s,n};
|