|
@@ -1,22 +1,67 @@
|
|
|
<template>
|
|
|
- <div id="detail">
|
|
|
- <iframe v-if="url" :src="url" frameborder="0" allow="autoplay;encrypted-media" allowfullscreen style="width:100%;height:500px;"> </iframe>
|
|
|
+ <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="toUpdate()">确定</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 } = createNamespacedHelpers('doctor');
|
|
|
export default {
|
|
|
- metaInfo: { title: '' },
|
|
|
- name: 'detail',
|
|
|
+ metaInfo: { title: '用户绑定' },
|
|
|
+ name: 'index',
|
|
|
props: {},
|
|
|
components: {},
|
|
|
data: () => ({
|
|
|
- url: undefined,
|
|
|
+ question: '',
|
|
|
}),
|
|
|
created() {},
|
|
|
- computed: {},
|
|
|
- methods: {},
|
|
|
+ computed: {
|
|
|
+ openid() {
|
|
|
+ return this.$route.query.openid;
|
|
|
+ },
|
|
|
+ doctorid() {
|
|
|
+ return this.$route.query.doctorid;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // ...mapActions(['bind']),
|
|
|
+ async toUpdate() {
|
|
|
+ const res = await this.bind({ id: this.doctorid, openid: this.openid });
|
|
|
+ if (res.errcode === 0) {
|
|
|
+ this.$router.push({ path: '/', query: { openid: this.openid } });
|
|
|
+ this.$toast({ type: 'success', message: '绑定成功' });
|
|
|
+ } else {
|
|
|
+ this.$toast({ type: 'fail', message: res.errmsg });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ window.history.go(-1);
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
+<style lang="less" scoped>
|
|
|
+.icon {
|
|
|
+ height: 30vh;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.icon .el-image {
|
|
|
+ width: 100px;
|
|
|
+ margin: 40px 0;
|
|
|
+}
|
|
|
+</style>
|