index-0b8aa568.js 1.5 KB

12
  1. import{_ as l}from"./wechatlogo-1df960a8.js";import{b as d}from"./browser-e933942f.js";import{a7 as c,aj as m,o as f,b as u,ae as h}from"./index-312d0758.js";import{r as a}from"./request-ae682a54.js";import{b as i}from"./route-block-83d24a4e.js";import{E as x}from"./index-8db4c46a.js";import"./axios-87b33878.js";import"./typescript-c7dac87b.js";import"./plugin-vue_export-helper-1cff8a04.js";import"./index-7588b595.js";const _=h('<div><div style="width:100%;display:flex;justify-content:center;"><div style="height:40px;display:flex;margin-top:50px;"><img src="'+l+'" style="width:40px;"><div style="height:40px;line-height:40px;margin-left:10px;"><span style="font-size:25px;">使用微信扫一扫</span></div></div></div><div style="display:flex;justify-content:center;height:200px;margin-top:20px;"><canvas id="QRCode_header"></canvas></div></div>',1),v=[_],g={__name:"index",setup(y){const n=c();function s(){n.back()}let t=null;return m(()=>{clearInterval(t)}),a({url:"/openapi/wx/wx.php",data:{type:"qrcode_bind"}}).then(e=>{let r={errorCorrectionLevel:"H",type:"image/png",quality:.3,margin:12,width:200,height:180,text:e.data.qrcode_url,color:{dark:"#333333",light:"#fff"}},p=document.getElementById("QRCode_header");d.toCanvas(p,e.data.qrcode_url,r,function(o){}),t=setInterval(()=>{a({url:"/openapi/wx/wx.php",data:{type:"token",state:e.data.state}}).then(o=>{o.code!="401"&&o.code=="1"&&(x.success("换绑成功"),clearInterval(t),s())})},2e3)}),(e,r)=>(f(),u("div",null,v))}};typeof i=="function"&&i(g);export{g as default};