|
|
@ -87,15 +87,17 @@
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="other-login">
|
|
|
|
<div class="other-login">
|
|
|
|
<a v-show="mode !== 'email'" @click="mode = 'email'">{{
|
|
|
|
<a v-show="mode !== 'email'" @click="changeMode('email')">{{
|
|
|
|
$t('login.loginWithEmail')
|
|
|
|
$t('login.loginWithEmail')
|
|
|
|
}}</a>
|
|
|
|
}}</a>
|
|
|
|
<span v-show="mode === 'qrCode'">|</span>
|
|
|
|
<span v-show="mode === 'qrCode'">|</span>
|
|
|
|
<a v-show="mode !== 'phone'" @click="mode = 'phone'">{{
|
|
|
|
<a v-show="mode !== 'phone'" @click="changeMode('phone')">{{
|
|
|
|
$t('login.loginWithPhone')
|
|
|
|
$t('login.loginWithPhone')
|
|
|
|
}}</a>
|
|
|
|
}}</a>
|
|
|
|
<span v-show="mode !== 'qrCode'">|</span>
|
|
|
|
<span v-show="mode !== 'qrCode'">|</span>
|
|
|
|
<a v-show="mode !== 'qrCode'" @click="mode = 'qrCode'"> 二维码登录 </a>
|
|
|
|
<a v-show="mode !== 'qrCode'" @click="changeMode('qrCode')">
|
|
|
|
|
|
|
|
二维码登录
|
|
|
|
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
v-show="mode !== 'qrCode'"
|
|
|
|
v-show="mode !== 'qrCode'"
|
|
|
@ -263,6 +265,8 @@ export default {
|
|
|
|
this.qrCodeInformation = '二维码已失效,请重新扫码';
|
|
|
|
this.qrCodeInformation = '二维码已失效,请重新扫码';
|
|
|
|
} else if (result.code === 802) {
|
|
|
|
} else if (result.code === 802) {
|
|
|
|
this.qrCodeInformation = '扫描成功,请在手机上确认登录';
|
|
|
|
this.qrCodeInformation = '扫描成功,请在手机上确认登录';
|
|
|
|
|
|
|
|
} else if (result.code === 801) {
|
|
|
|
|
|
|
|
this.qrCodeInformation = '打开网易云音乐APP扫码登录';
|
|
|
|
} else if (result.code === 803) {
|
|
|
|
} else if (result.code === 803) {
|
|
|
|
clearInterval(this.qrCodeCheckInterval);
|
|
|
|
clearInterval(this.qrCodeCheckInterval);
|
|
|
|
this.qrCodeInformation = '登录成功,请稍等...';
|
|
|
|
this.qrCodeInformation = '登录成功,请稍等...';
|
|
|
@ -273,6 +277,14 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, 1000);
|
|
|
|
}, 1000);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
changeMode(mode) {
|
|
|
|
|
|
|
|
this.mode = mode;
|
|
|
|
|
|
|
|
if (mode === 'qrCode') {
|
|
|
|
|
|
|
|
this.checkQrCodeLogin();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
clearInterval(this.qrCodeCheckInterval);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|