1import"./73H-8xEe.js";import{E as s}from"./zn4TYq_S.js";import{o as a,k as c,j as l}from"./CNCspZWH.js";import{e as i}from"./B7pcLWKw.js";import{useAuthStore as u}from"./DU2hPJJc.js";const w={__name:"loginSuccess",setup(p){const t=c();l(),u(),a(()=>{let e=t.query.code?t.query.code:"";n(e),localStorage.setItem("CODE",e)});const n=async e=>{try{const o=await i({grantType:"social",code:e,state:localStorage.getItem("STATE"),source:"wechat_open",alias:"pc_new"}),r=window.location.origin;console.log("ç»å½ç»æ:",o,"ç®æ æº:",r),o.code==200?(window.parent.postMessage({type:"WEIXIN_LOGIN_SUCCESS",userInfo:o.data},r),console.log("å·²åéç»å½æåæ¶æ¯å°ç¶çªå£")):o.code==102?(window.parent.postMessage({type:"WEIXIN_LOGIN_ShowBind",userInfo:{}},r),console.log("å·²åéæ¾ç¤ºç»å®é¡µé¢æ¶æ¯å°ç¶çªå£")):(s.error(o.msg||"ç»å½å¤±è´¥"),console.error("ç»å½é误:",o))}catch(o){console.error("ç»å½è¯·æ±å¼å¸¸:",o),s.error("ç»å½è¿ç¨ä¸åçé误")}};return(e,o)=>null}};export{w as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.