添加:个人信息编辑 - 微信绑定
This commit is contained in:
parent
a62ca5cdd4
commit
46fdbae8d3
|
|
@ -45,6 +45,20 @@
|
|||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div style="margin-top: 0.625rem;">
|
||||
<van-cell-group>
|
||||
<van-cell title="微信绑定" style="height: 3rem;">
|
||||
<van-field :value="form.isBindingWechat ? '已绑定' : '未绑定'" :readonly="true" input-align="right" placeholder="请输入昵称">
|
||||
<template #button>
|
||||
<van-icon v-if="form.isBindingWechat" class="wechat-icon" name="wechat" color="#1AAD19" size="25"/>
|
||||
<van-icon v-else class="wechat-icon" name="wechat" color="#888888" size="25" @click="weChatBinding"/>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentOne">
|
||||
<van-cell-group class="model" :border="false">
|
||||
|
|
@ -438,4 +452,13 @@
|
|||
::v-deep .van-cell::after {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.wechat-icon {
|
||||
height: 3rem;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ export default {
|
|||
fathername: '', //父亲姓名
|
||||
mothername: '', //母亲姓名
|
||||
idcard:'',
|
||||
idcard_addr:''
|
||||
idcard_addr:'',
|
||||
isBindingWechat: false,
|
||||
},
|
||||
fileList: [],
|
||||
pageType: "register",
|
||||
|
|
@ -90,6 +91,18 @@ export default {
|
|||
this.fun.setWXTitle('基本信息')
|
||||
this.essentialInformation()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 微信绑定结果处理
|
||||
let pageParams = Object.assign(this.$route.params, this.$route.query);
|
||||
let wechatBindRes = pageParams.wechat_binding_res || 'success';
|
||||
if(wechatBindRes === 'error'){
|
||||
let msg = pageParams.wechat_binding_msg || '绑定失败!';
|
||||
this.$dialog.alert({ message: msg });
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async mounted() {
|
||||
if (JSON.parse(window.localStorage.getItem("globalParameter")).register_locate == true) {
|
||||
|
|
@ -268,6 +281,7 @@ export default {
|
|||
this.diyField = response.data?.diy_field
|
||||
this.fixedDiyField = response.data?.fixed_diy_field
|
||||
this.changePicture = response.data?.can_update_avatar
|
||||
this.form.isBindingWechat = response.data?.has_one_fans
|
||||
response.data.basic_info.forEach((item, index) => {
|
||||
this.registerBasicInfo[item.field] = item
|
||||
});
|
||||
|
|
@ -723,7 +737,6 @@ export default {
|
|||
addressJson['address'] = value.detailedAddress
|
||||
return addressJson
|
||||
},
|
||||
|
||||
postDiy(e, member_id = this.member_id) {
|
||||
var that = this;
|
||||
var formData = e;
|
||||
|
|
@ -748,7 +761,23 @@ export default {
|
|||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
// 微信公众号网页 - 微信绑定
|
||||
weChatBinding(){
|
||||
$http.get("member.register.wechat-binding").then(response => {
|
||||
if (response.result == 1) {
|
||||
console.log(response.data);
|
||||
if(response.data.url) window.location.href = response.data.url;
|
||||
return;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
components: {
|
||||
cTitle,
|
||||
|
|
|
|||
Loading…
Reference in New Issue