Merge branch 'dev' into chenxuelian

This commit is contained in:
”chenxuelian“
2023-02-01 21:57:39 +08:00
3 changed files with 35 additions and 9 deletions

View File

@@ -68,7 +68,14 @@
this.$apiServe.getUser().then(res => { this.$apiServe.getUser().then(res => {
console.log('个人信息==', res.data); console.log('个人信息==', res.data);
if (res.data.msg == "登录超时,请重新登录") { if (res.data.msg == "登录超时,请重新登录") {
this.isLoad = false if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.$toast.warn('登录失败请重试')
this.isLoad = false
// uni.navigateTo({
// url: '../../pages/my/login/login'
// })
return
}
} }
var data = res.data.data var data = res.data.data
this.avatar = data.avatar this.avatar = data.avatar

View File

@@ -23,6 +23,8 @@
name: '', name: '',
phone: '', phone: '',
showM: false, showM: false,
//部分产品无权限访问需升级VIP
needAsk: '',
//会员中心的用户名旁边不显示edit图标 //会员中心的用户名旁边不显示edit图标
show: false, show: false,
content: `请保持手机畅通<br> content: `请保持手机畅通<br>
@@ -30,8 +32,13 @@
commitment: '承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置' commitment: '承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置'
} }
}, },
onLoad(option) {
console.log('ask', option.ask);
if (option.ask == 1) {
this.needAsk = option.ask
}
},
methods: { methods: {
// 联系客服模态框
handleSureClick() { handleSureClick() {
let name = this.$refs.nameAndphone.model.userInfo.name let name = this.$refs.nameAndphone.model.userInfo.name
let phone = this.$refs.nameAndphone.model.userInfo.phone let phone = this.$refs.nameAndphone.model.userInfo.phone
@@ -47,14 +54,15 @@
} else if (res.data.code == 20005) { } else if (res.data.code == 20005) {
this.$toast.warn('请完善数据') this.$toast.warn('请完善数据')
} }
}).finally(_ => {}) }).finally(_ => {})
}, },
confirm() { confirm() {
this.showM = false this.showM = false
// uni.switchTab({ if (this.needAsk == 1) {
// url: '/pages/my/my' uni.switchTab({
// }) url: '/pages/index/index'
})
}
} }
} }
} }

View File

@@ -60,6 +60,10 @@
<login @success="reOnLoad()" @fail="failToLoad()"></login> <login @success="reOnLoad()" @fail="failToLoad()"></login>
</u-overlay> </u-overlay>
</view> </view>
<u-modal :show="showM" :content='content' closeOnClickOverlay="false" showCancelButton="true"
confirmText="升级VIP" @confirm="confirm" confirmColor="#0EBB5B">
<rich-text :nodes="content"></rich-text>
</u-modal>
</view> </view>
</view> </view>
</template> </template>
@@ -80,7 +84,9 @@
tagsArray: [], tagsArray: [],
showHeart: false, showHeart: false,
detailList: [], detailList: [],
isLoad: true isLoad: true,
showM: false,
content: '您暂无权限访问请升级VIP访问'
} }
}, },
onLoad(option) { onLoad(option) {
@@ -104,8 +110,8 @@
if (res.data.data.thumb) { if (res.data.data.thumb) {
this.isThumb = true this.isThumb = true
} }
if (res.data.code == 0) { if (res.data.msg == "没有权限访问" && uni.getStorageSync('loginToken')) {
this.$toast.warn('没有权限访问') this.showM = true
} }
if (res.data.data) { if (res.data.data) {
let detail = res.data.data let detail = res.data.data
@@ -162,6 +168,11 @@
}, },
failToLoad() { failToLoad() {
this.$toast.warn('登录失败请重试') this.$toast.warn('登录失败请重试')
},
confirm() {
uni.navigateTo({
url: '../../../packageMy/memberCenter/memberCenter?ask=' + 1
})
} }
} }
} }