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

实名认证刷新实名状态的提示优化
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() { 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) {

View File

@ -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(),
// }) })
}, },
// //