PageSourceSearch

https://datapp.ai/_nuxt/wechat.2b802979.js

js datapp.ai collected 2026-10-05 12:07:20 UTC 2,473 bytes, 1 lines download raw bytes

1import{a as e,W as s,p as a,o as t,b as o,f as n,k as i,E as c,A as d,C as r}from"./entry.dcbe8379.js";import{_ as w}from"./_plugin-vue_export-helper.1b428a4d.js";const l={class:"wechat-callback"},p=w(e({__name:"wechat",setup(e){const{loginApi:w}=r(),p=i("bind"),g=s();return a(async()=>{g.query.login?(p.value="login",localStorage.setItem("wechatBindMode","login")):(p.value="bind",localStorage.setItem("wechatBindMode","bind"));try{const{code:e,state:s}=g.query;e&&s&&("bind"===p.value?await(async()=>{try{const{code:e,state:s}=g.query;if(e&&s){let a=localStorage.getItem("wechatBindCode")||"";window.self,window.top;const t=await w.bindWechatAccount({code:e,state:s,verCode:a});if(200===t.code){c({message:"绑定微信成功",type:"success",customClass:"index3000"});const s=JSON.parse(JSON.stringify(t));s.data.callbackCode=e,window.self!==window.top?window.parent.postMessage({type:"wechat-bind-success",data:s},"*"):await d("/my/account?bind=success")}else window.self!==window.top?(window.parent.postMessage({type:"wechat-bind-error",data:JSON.parse(JSON.stringify(t))},"*"),window.close()):await d("/my/account?bind=error1&msg="+encodeURIComponent(t.msg||"绑定失败"))}}catch(e){c({message:"绑定微信失败",type:"error",customClass:"index3000"}),window.self!==window.top?(window.parent.postMessage({type:"wechat-bind-error",data:{msg:"网络错误"}},"*"),window.close()):await d("/my/account?bind=error3&msg="+encodeURIComponent("网络错误"))}})():await(async()=>{try{const{code:e,state:s}=g.query;if(e&&s){const a=await w.wxLogin({code:e,state:s});if(200===a.code){const s=JSON.parse(JSON.stringify(a));s.data.callbackCode=e,c({message:"微信登录成功",type:"success",customClass:"index3000"}),window.self!==window.top?window.parent.postMessage({type:"wechat-login-success",data:s},"*"):(localStorage.setItem("wxloginInfo",JSON.stringify(s)),await d("/login?wxlogin=success"))}else 5001083!==a.code&&c({message:"微信登录失败:"+JSON.stringify(a),type:"error",customClass:"index3000"}),window.self!==window.top?window.parent.postMessage({type:"wechat-login-error",data:JSON.parse(JSON.stringify(a))},"*"):5001083!==a.code&&await d("/login?wxlogin=error1&msg="+encodeURIComponent(a.msg||"微信登录失败"))}}catch(e){}})())}catch(e){}}),(e,s)=>(t(),o("div",l,[...s[0]||(s[0]=[n("div",{class:"loading"},[n("div",{class:"spinner"}),n("p",null,"正在处理微信绑定...")],-1)])]))}}),[["__scopeId","data-v-efdf7607"]]);export{p 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.