feat: ui update

This commit is contained in:
2026-09-15 16:01:59 +08:00
parent 1a11816839
commit 26c392d612
89 changed files with 10377 additions and 4861 deletions
+28 -21
View File
@@ -21,6 +21,12 @@ Page({
userInfo: {} as UserInfo,
giftVisible: false,
giftItems: [] as GiftItem[],
// 生日引导:v2 玻璃弹窗
birthVisible: false,
birthButtons: [
{ text: '稍后再说', value: '' },
{ text: '去完善', value: 'ok', type: 'main' },
],
},
onLoad(query: Record<string, string>) {
@@ -180,28 +186,29 @@ Page({
},
showBirthGuide() {
wx.showModal({
title: '完善个人信息',
content: '设置生日后即可查看今日星座运势',
confirmText: '去完善',
cancelText: '稍后再说',
success: (res) => {
if (res.confirm) {
// 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)
// 跳转失败时清除标记,避免下次进入「我的」页意外弹窗
wx.removeStorageSync(STORAGE_KEYS.OPEN_PROFILE_EDIT)
},
})
} else {
this.goAfterLogin()
}
this.setData({ birthVisible: true })
},
onBirthCancel() {
this.setData({ birthVisible: false })
this.goAfterLogin()
},
onBirthConfirm(e: WechatMiniprogram.CustomEvent) {
this.setData({ birthVisible: false })
if (e.detail.value !== 'ok') {
this.goAfterLogin()
return
}
// switchTab 不支持 query 传参,用 storage 标记让「我的」页 onShow 自动弹出编辑弹窗
wx.setStorageSync(STORAGE_KEYS.OPEN_PROFILE_EDIT, 1)
wx.switchTab({
url: '/pages/profile/profile',
fail: (err) => {
logger.warn(LOG, 'switchTab 个人资料失败, err=', err && err.errMsg)
// 跳转失败时清除标记,避免下次进入「我的」页意外弹窗
wx.removeStorageSync(STORAGE_KEYS.OPEN_PROFILE_EDIT)
},
fail: (e) => logger.warn(LOG, '生日引导弹窗失败, err=', e && e.errMsg),
})
},