|
@@ -0,0 +1,66 @@
|
|
|
+<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>
|
|
|
+ <el-col :span="24" style="height:10vh;text-align:center">
|
|
|
+ 您确定将您的微信号与本平台账号绑定吗?
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" style="height:4rem">
|
|
|
+ <van-button type="info" style="width:100%" round @click="toBind()">确定</van-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <van-button plain style="width:100%" round @click="cancel()">取消</van-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: login } = createNamespacedHelpers('login');
|
|
|
+export default {
|
|
|
+ metaInfo: { title: '用户绑定' },
|
|
|
+ name: 'index',
|
|
|
+ props: {},
|
|
|
+ components: {},
|
|
|
+ data: () => ({
|
|
|
+ question: require('@/assets/question.png'),
|
|
|
+ }),
|
|
|
+ created() {},
|
|
|
+ computed: {
|
|
|
+ openid() {
|
|
|
+ return this.$route.query.openid;
|
|
|
+ },
|
|
|
+ uid() {
|
|
|
+ return this.$route.query.uid;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...login(['userBind']),
|
|
|
+ async toBind() {
|
|
|
+ const res = await this.userBind({ uid: this.uid, openid: this.openid });
|
|
|
+ if (res.errcode === 0) {
|
|
|
+ this.$toast({ type: 'success', message: '绑定成功' });
|
|
|
+ } else {
|
|
|
+ this.$toast({ type: 'fail', message: res.errmsg });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ window.history.go(-1);
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.icon {
|
|
|
+ height: 30vh;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.icon .el-image {
|
|
|
+ width: 100px;
|
|
|
+ margin: 40px 0;
|
|
|
+}
|
|
|
+</style>
|