bugfix:ui
This commit is contained in:
@@ -3,6 +3,7 @@ import * as auth from '../../utils/auth'
|
||||
import { HoroscopeData } from '../../types/models'
|
||||
import { setTabBarSelected } from '../../utils/tabbar'
|
||||
import { logger } from '../../utils/logger'
|
||||
import { STORAGE_KEYS } from '../../utils/config'
|
||||
|
||||
// 日志模块名
|
||||
const LOG = 'horoscope'
|
||||
@@ -117,9 +118,15 @@ Page({
|
||||
},
|
||||
|
||||
onGoProfile() {
|
||||
// switchTab 不支持 query 传参,用 storage 标记让「我的」页 onShow 自动弹出编辑弹窗
|
||||
wx.setStorageSync(STORAGE_KEYS.OPEN_PROFILE_EDIT, 1)
|
||||
wx.switchTab({
|
||||
url: '/pages/profile/profile',
|
||||
fail: (e) => logger.warn(LOG, 'switchTab 个人资料失败, err=', e && e.errMsg),
|
||||
fail: (e) => {
|
||||
logger.warn(LOG, 'switchTab 个人资料失败, err=', e && e.errMsg)
|
||||
// 跳转失败时清除标记,避免下次进入「我的」页意外弹窗
|
||||
wx.removeStorageSync(STORAGE_KEYS.OPEN_PROFILE_EDIT)
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user