12 |
- import{a7 as l,aj as d,o as c,b as m,d as a,f as u,a as f,a2 as x,ae as h}from"./index-312d0758.js";import{E as y}from"./el-button-5fd5d56e.js";import{_}from"./wechatlogo-1df960a8.js";import{b as v}from"./browser-e933942f.js";import{r as n}from"./request-ae682a54.js";import{E as g}from"./index-8db4c46a.js";import"./index-7588b595.js";import"./plugin-vue_export-helper-1cff8a04.js";import"./index-a787320c.js";import"./use-form-item-01b63eaa.js";import"./constants-8ece7a3d.js";import"./index-1da7ed1a.js";import"./use-form-common-props-714f341f.js";import"./axios-87b33878.js";import"./typescript-c7dac87b.js";const b={style:{display:"flex","justify-content":"space-between"}},w=a("div",{style:{"font-size":"15px",color:"#b1b2b4"}},"当前位置:个人中心 > 换绑微信",-1),q=h('<div><div style="width:100%;display:flex;justify-content:center;"><div style="height:40px;display:flex;margin-top:50px;"><img src="'+_+'" 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),U={__name:"index",setup(k){const p=l();function s(){p.push({path:"/homeH5/grzx",query:{tab:"grxx"}})}let r=null;return d(()=>{clearInterval(r)}),n({url:"/openapi/wx/wx.php",data:{type:"qrcode_bind"}}).then(t=>{let e={errorCorrectionLevel:"H",type:"image/png",quality:.3,margin:12,width:200,height:180,text:t.data.qrcode_url,color:{dark:"#333333",light:"#fff"}},i=document.getElementById("QRCode_header");v.toCanvas(i,t.data.qrcode_url,e,function(o){}),r=setInterval(()=>{n({url:"/openapi/wx/wx.php",data:{type:"token",state:t.data.state}}).then(o=>{o.code!="401"&&o.code=="1"&&(g.success("换绑成功"),clearInterval(r),s())})},2e3)}),(t,e)=>{const i=y;return c(),m("div",null,[a("div",b,[w,a("div",null,[u(i,{type:"primary",style:{width:"80px"},onClick:e[0]||(e[0]=o=>s())},{default:f(()=>[x("返回")]),_:1})])]),q])}}};export{U as default};
|