只有在登录情况下才有首次提醒取实名,

实名认证刷新实名状态的提示优化
This commit is contained in:
WindowBird 2025-09-13 10:10:05 +08:00
parent 326720450b
commit e96e22f2b0
2 changed files with 22 additions and 7 deletions

View File

@ -70,6 +70,8 @@ export default {
},
data() {
return {
shihasExecuted: uni.getStorageSync('hasExecutedGoToRealName') || false,
//
isRealName: false,
indicatorDots: true,
@ -107,16 +109,29 @@ export default {
this.fetchAnnouncement()
this.fetchBannerList()
this.fetchDeviceList()
this.goToRealName()
},
onShow() {
this.fetchAnnouncement()
this.fetchBannerList()
this.fetchDeviceList()
this.onceTipRealName()
},
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() {
const res = await getIsRealName()
if (!res.data) {

View File

@ -114,12 +114,12 @@ export default {
//
handleRefreshFail(message) {
// uni.showModal({
// title: '',
// content: message,
// showCancel: false,
// // complete: () => uni.navigateBack(),
// })
uni.showModal({
title: '提示',
content: message,
showCancel: false,
// // complete: () => uni.navigateBack(),
})
},
//