wx-auth-c89f0e06.js 521 B

1
  1. import{d as l,P as i,r as t,e as c,a as d,Z as f,Y as p,bk as h,V as w}from"./index-b80927fb.js";import{u as m}from"./index-b27ccbd4.js";const x=l({name:"wx-auth-layout",setup(){const r=m(),a=i(),e=t(!1),u=t(!1),o=t(""),s=c(()=>!!(o.value||u.value||!w().weixin));return(async()=>{if(!e.value){e.value=!0;try{o.value=await r.getOpenId(f()+window.location.pathname+"#"+a.path+"?"+p.stringify({...a.query}))}catch(n){console.log(n,"error"),u.value=!0}e.value=!1}})(),()=>s.value?d(h,null,null):null}});export{x as default};