登录和个人中心修改手机号,重置页面绑定手机号
This commit is contained in:
71
pages/member/activatedmemberone.vue
Normal file
71
pages/member/activatedmemberone.vue
Normal file
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<view>
|
||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/wkthuiyuanbg.png" class="imgstyle" mode=""></image>
|
||||
<button class="btnclass" open-type="getPhoneNumber" @getphonenumber="sumbit">立即开通 </button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
shopId: "",
|
||||
switchdata: true, // 绑定后
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.shopId = e.shopId
|
||||
},
|
||||
onUnload() {
|
||||
if (this.switchdata) {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
sumbit(d) {
|
||||
if (d.detail.iv) {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async (data) => {
|
||||
let res = await this.api.userwxlogins({
|
||||
code: data.code,
|
||||
encryptedData: d.detail.encryptedData,
|
||||
iv: d.detail.iv,
|
||||
shopId: this.shopId
|
||||
})
|
||||
if (res.code == 0) {
|
||||
this.switchdata = false
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.imgstyle {
|
||||
width: 694rpx;
|
||||
height: 414rpx;
|
||||
margin: 70rpx auto;
|
||||
}
|
||||
|
||||
.btnclass {
|
||||
width: 694rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background: #6D89A4;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -42,6 +42,14 @@
|
||||
this.paygetShopByMember(e.shopId)
|
||||
}
|
||||
this.paygetActive(e.shopId) //列表
|
||||
// 判断是否绑定手机,只有下单时候有,会员列表肯定有
|
||||
console.log(uni.cache.get('userInfo').telephone, '调试1')
|
||||
if (!uni.cache.get('userInfo').telephone) {
|
||||
// 跳转到开通页面
|
||||
uni.navigateTo({
|
||||
url: '/pages/member/activatedmemberone?shopId=' + e.shopId
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async paygetShopByMember(w) {
|
||||
|
||||
Reference in New Issue
Block a user