只有在登录情况下才有首次提醒取实名,
实名认证刷新实名状态的提示优化
This commit is contained in:
parent
326720450b
commit
e96e22f2b0
|
|
@ -70,6 +70,8 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
shihasExecuted: uni.getStorageSync('hasExecutedGoToRealName') || false,
|
||||||
|
|
||||||
// 基础配置
|
// 基础配置
|
||||||
isRealName: false,
|
isRealName: false,
|
||||||
indicatorDots: true,
|
indicatorDots: true,
|
||||||
|
|
@ -107,16 +109,29 @@ export default {
|
||||||
this.fetchAnnouncement()
|
this.fetchAnnouncement()
|
||||||
this.fetchBannerList()
|
this.fetchBannerList()
|
||||||
this.fetchDeviceList()
|
this.fetchDeviceList()
|
||||||
this.goToRealName()
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
this.fetchAnnouncement()
|
this.fetchAnnouncement()
|
||||||
this.fetchBannerList()
|
this.fetchBannerList()
|
||||||
this.fetchDeviceList()
|
this.fetchDeviceList()
|
||||||
|
this.onceTipRealName()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
async onceTipRealName() {
|
||||||
|
console.log('onceTipRealName-hasExecuted:', this.hasExecuted)
|
||||||
|
const storageInfo = uni.getStorageInfoSync()
|
||||||
|
console.log('当前存储Keys:', storageInfo.keys)
|
||||||
|
let token = uni.getStorageSync('token')
|
||||||
|
console.log('onceTipRealName-token:', token)
|
||||||
|
|
||||||
|
if (token && !this.hasExecuted) {
|
||||||
|
await this.goToRealName()
|
||||||
|
this.hasExecuted = true
|
||||||
|
uni.setStorageSync('hasExecutedGoToRealName', true)
|
||||||
|
}
|
||||||
|
},
|
||||||
async goToRealName() {
|
async goToRealName() {
|
||||||
const res = await getIsRealName()
|
const res = await getIsRealName()
|
||||||
if (!res.data) {
|
if (!res.data) {
|
||||||
|
|
|
||||||
|
|
@ -114,12 +114,12 @@ export default {
|
||||||
|
|
||||||
// 统一处理失败
|
// 统一处理失败
|
||||||
handleRefreshFail(message) {
|
handleRefreshFail(message) {
|
||||||
// uni.showModal({
|
uni.showModal({
|
||||||
// title: '提示',
|
title: '提示',
|
||||||
// content: message,
|
content: message,
|
||||||
// showCancel: false,
|
showCancel: false,
|
||||||
// // complete: () => uni.navigateBack(),
|
// // complete: () => uni.navigateBack(),
|
||||||
// })
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击进行实名认证
|
// 点击进行实名认证
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user