|
@@ -1,17 +1,24 @@
|
|
|
<template>
|
|
|
<div id="index">
|
|
|
<el-row style="padding:10px;height:100vh">
|
|
|
- <el-col :span="24" class="icon">
|
|
|
- <el-image :src="question"></el-image>
|
|
|
+ <el-col :span="24" v-if="display == '1'">
|
|
|
+ <el-col :span="24" class="icon">
|
|
|
+ <el-image :src="question"></el-image>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" style="height:10vh;text-align:center">
|
|
|
+ {{ type == '1' ? '您确定将您的微信号与本平台账号绑定吗?' : '您确定登陆本平台' }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" style="height:4rem">
|
|
|
+ <van-button type="info" style="width:100%" round @click="confirm()">确定</van-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <van-button plain style="width:100%" round @click="cancel()">取消</van-button>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" style="height:10vh;text-align:center">
|
|
|
- {{ type == '1' ? '您确定将您的微信号与本平台账号绑定吗?' : '您确定登陆本平台' }}
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" style="height:4rem">
|
|
|
- <van-button type="info" style="width:100%" round @click="confirm()">确定</van-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <van-button plain style="width:100%" round @click="cancel()">取消</van-button>
|
|
|
+ <el-col :span="24" class="confirmSuc" v-else>
|
|
|
+ <van-icon name="passed" />
|
|
|
+ <p>綁定成功</p>
|
|
|
+ <el-link type="danger" :underline="false">您可以关闭本页面!</el-link>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -27,6 +34,7 @@ export default {
|
|
|
components: {},
|
|
|
data: () => ({
|
|
|
question: require('@/assets/question.png'),
|
|
|
+ display: '1',
|
|
|
}),
|
|
|
created() {},
|
|
|
computed: {
|
|
@@ -53,8 +61,10 @@ export default {
|
|
|
const res = await this.userBind({ uid: this.uid, openid: this.openid, qrcode: this.qrcode, type: this.type });
|
|
|
if (res.errcode === 0) {
|
|
|
this.$toast({ type: 'success', message: '绑定成功' });
|
|
|
+ this.display = '2';
|
|
|
} else {
|
|
|
this.$toast({ type: 'fail', message: res.errmsg });
|
|
|
+ this.display = '1';
|
|
|
}
|
|
|
},
|
|
|
async toWxLogin() {
|
|
@@ -76,4 +86,17 @@ export default {
|
|
|
width: 100px;
|
|
|
margin: 40px 0;
|
|
|
}
|
|
|
+.confirmSuc {
|
|
|
+ text-align: center;
|
|
|
+ padding: 30% 0;
|
|
|
+ .van-icon {
|
|
|
+ font-size: 100px;
|
|
|
+ color: #32cd32;
|
|
|
+ }
|
|
|
+ p {
|
|
|
+ font-size: 30px;
|
|
|
+ padding: 0 0;
|
|
|
+ margin: 30px 0 30px 0;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|