|
@@ -11,7 +11,7 @@
|
|
|
>
|
|
|
<div class="dis_flex">
|
|
|
<img :src="imgUrl ? imgUrl : require('@/assets/qrcode.png')" alt="" />
|
|
|
- <p v-if="scanningStatus" style="color:red">小程序已扫码</p>
|
|
|
+ <p v-if="scanningStatus" style="color: red">小程序已扫码</p>
|
|
|
<p class="headerTitle">使用微信扫一扫快捷登录</p>
|
|
|
<p class="clickFuncStyle">
|
|
|
扫描即表示同意<br /><span @click="innerVisibleOpenFunc(1)"
|
|
@@ -560,20 +560,19 @@ export default {
|
|
|
scanCode: this.scanCode,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.backData(res);
|
|
|
+ this.backData(res);
|
|
|
+ this.scanningStatus = false;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ if (err.msg === "小程序已扫码" && this.interValTime !== null) {
|
|
|
+ clearInterval(this.interValTime);
|
|
|
+ this.interValTime = null;
|
|
|
+ this.scanningStatus = true;
|
|
|
+ } else if (err.msg === "暂未登录" && !this.interValTime) {
|
|
|
+ this.interValTime = setInterval(() => {
|
|
|
+ this.updateQRcode();
|
|
|
+ }, 60000);
|
|
|
this.scanningStatus = false;
|
|
|
- } else {
|
|
|
- if (res.msg === "小程序已扫码" && this.interValTime !== null) {
|
|
|
- clearInterval(this.interValTime);
|
|
|
- this.interValTime = null;
|
|
|
- this.scanningStatus = true;
|
|
|
- } else if (res.msg === "暂未登录" && !this.interValTime) {
|
|
|
- this.interValTime = setInterval(() => {
|
|
|
- this.updateQRcode();
|
|
|
- }, 60000);
|
|
|
- this.scanningStatus = false;
|
|
|
- }
|
|
|
}
|
|
|
});
|
|
|
},
|