Files
qhmes/web-dist/js/shareStore-C5golSdU.js
2026-06-16 18:19:57 +08:00

2 lines
944 B
Java

var i=(t,o,e)=>new Promise((l,c)=>{var f=r=>{try{n(e.next(r))}catch(a){c(a)}},d=r=>{try{n(e.throw(r))}catch(a){c(a)}},n=r=>r.done?l(r.value):Promise.resolve(r.value).then(f,d);n((e=e.apply(t,o)).next())});import{am as u,bp as h,bq as m,br as g,bs as R}from"./index-X7Y8jykP.js";const s=h(),I=u({id:"online-cgform-share",state:()=>({cgformRecord:null,dataRecord:null}),getters:{getCgformRecord(){return this.cgformRecord},getDataRecord(){return this.dataRecord}},actions:{checkUrlToken(){return i(this,null,function*(){const t=new URLSearchParams(window.location.search).get("token"),o=t!=null&&t.length>0;if(o){s.setToken(t);try{const e=yield m();if(e!=null&&e.userInfo)s.setUserInfo(e.userInfo),e.sysAllDictItems&&s.setAllDictItems(e.sysAllDictItems);else throw new Error("token无效");return!0}catch(e){return s.setToken(""),g(R),!1}}return o})},setCgformRecord(t){this.cgformRecord=t},setDataRecord(t){this.dataRecord=t}}});export{I as u};