解决数据绑定和升级VIP问题
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
member: false,
|
||||
member: '',
|
||||
showEdit: true,
|
||||
avatar: '',
|
||||
nickname: '用户',
|
||||
@@ -75,6 +75,8 @@
|
||||
this.avatar = uni.getStorageSync('img_url') + data.avatar
|
||||
this.nickname = data.nickname
|
||||
this.member = data.member
|
||||
uni.setStorageSync('member', data.member)
|
||||
uni.setStorageSync('agreement', data.agreement)
|
||||
uni.setStorageSync('com_name', data.com_name)
|
||||
uni.setStorageSync('com_mobile', data.com_mobile)
|
||||
}).finally(_ => {})
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
<u-navbar :autoBack="true" title="会员中心"></u-navbar>
|
||||
<u--image src="/static/my/wo_icon_hyzxbj.png" width="750rpx" height="349rpx" :lazy-load="true">
|
||||
</u--image>
|
||||
<myAvatar :center="show"></myAvatar>
|
||||
<myAvatar ref="myavatar" :center="show"></myAvatar>
|
||||
<view style="height: 56rpx;"></view>
|
||||
<myForm ref="nameAndphone"></myForm>
|
||||
<view class="commitment">
|
||||
{{commitment}}
|
||||
</view>
|
||||
<u-button type="success" text="升级VIP" color="#0EBB5B" @click="handleSureClick()"></u-button>
|
||||
<u-button type="success" :text="btnText" color="#0EBB5B" @click="handleSureClick()" :disabled="btnDisabled">
|
||||
</u-button>
|
||||
<u-modal :show="showM" closeOnClickOverlay="false" confirmText="确定" @confirm="confirm">
|
||||
<rich-text :nodes="content"></rich-text>
|
||||
</u-modal>
|
||||
@@ -23,17 +24,29 @@
|
||||
name: '',
|
||||
phone: '',
|
||||
showM: false,
|
||||
btnText: '升级VIP',
|
||||
btnDisabled: false,
|
||||
//部分产品无权限访问,需升级VIP
|
||||
needAsk: '',
|
||||
//会员中心的用户名旁边不显示edit图标
|
||||
show: false,
|
||||
content: `请保持手机畅通<br>
|
||||
客服会及时联系您`,
|
||||
commitment: '承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置'
|
||||
commitment: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log('ask', option.ask);
|
||||
console.log('uni.getStorageSync', uni.getStorageSync('member'));
|
||||
if (uni.getStorageSync('member') == 2) {
|
||||
this.btnText = '升级VIP'
|
||||
} else if (uni.getStorageSync('member') == 3) {
|
||||
this.btnText = '升级VIP'
|
||||
this.btnDisabled = true
|
||||
} else if (uni.getStorageSync('member') == 99) {
|
||||
this.btnText = '升级vip,正在审核中'
|
||||
this.btnDisabled = true
|
||||
}
|
||||
this.commitment = uni.getStorageSync('agreement')
|
||||
if (option.ask == 1) {
|
||||
this.needAsk = option.ask
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
this.showUpdate = true
|
||||
}
|
||||
//升级VIP正在审核中
|
||||
if (dataCode == 0 && detail.mytpe == 0) {
|
||||
if (dataCode == 0 && detail.mytpe == 99) {
|
||||
this.showUpdating = true
|
||||
}
|
||||
if (detail) {
|
||||
|
||||
@@ -89,10 +89,15 @@
|
||||
<view style="padding: 30rpx;background-color: #fff;">
|
||||
<u-button color="#0EBB5B" text="确定发布" @tap.stop="submitForm"></u-button>
|
||||
</view>
|
||||
<view style="padding: 20rpx;text-align: center;background-color: #fff;">
|
||||
<view style="padding: 12rpx 30rpx 20rpx 30rpx;background-color: #fff;">
|
||||
<text
|
||||
style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;">承诺声明预留文字位置承诺声明预留文字位置</text>
|
||||
style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;"
|
||||
v-if="tabCurrent === 0">{{claim_r}}</text>
|
||||
<text
|
||||
style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;"
|
||||
v-if="tabCurrent === 1">{{claim_c}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u--form>
|
||||
<view style="margin:0 20rpx;">
|
||||
@@ -115,6 +120,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
claim_r: '',
|
||||
claim_c: '',
|
||||
tabsList: [{
|
||||
name: '需求发布'
|
||||
}, {
|
||||
@@ -155,7 +162,7 @@
|
||||
}
|
||||
},
|
||||
onTabItemTap() {
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
console.log('----onShow')
|
||||
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
||||
console.log(uni.getStorageSync('loginToken'))
|
||||
@@ -207,11 +214,13 @@
|
||||
},
|
||||
getFormData() {
|
||||
this.$apiServe.getIdeasAndNeedsFormdata().then(res => {
|
||||
console.log(res.data.data)
|
||||
console.log(res.data)
|
||||
const formData = res.data.data
|
||||
this.productPickerColumn[0] = formData.product
|
||||
this.positionPickerColumn[0] = formData.loc
|
||||
this.categoryPickerList[0] = formData.class
|
||||
this.claim_r = formData.claim_r
|
||||
this.claim_c = formData.claim_c
|
||||
// this.productPickerList = res.data.data.map((item, index) => {
|
||||
// temp.push(item.name)
|
||||
// return item
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
}
|
||||
},
|
||||
onTabItemTap() {
|
||||
// this.$refs.myavatar.getUser()
|
||||
this.$refs.myavatar.getUser()
|
||||
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
||||
this.isLoad = false
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user