Commit Graph

18 Commits

Author SHA1 Message Date
zerosaturation
83999995f5 refactor(frontend): consolidate user storage read via getStoredUser helper
uni.getStorageSync('user') 在 key 从未写过的 UniApp 平台下默认返回 ""(空串)
而非 null/undefined,旧式 `JSON.parse(uni.getStorageSync('user')) || {}` 在
parse 阶段直接抛 `SyntaxError: Unexpected end of JSON input`,导致 quickLogin
setup 崩溃,并触发 Vue 二次告警 `Invalid vnode type: undefined`。

新增 utils/getStoredUser.js 单点封装,统一处理:
  - 空值/损坏 JSON 兜底(返回 null,不抛)
  - 与 store/modules/user.js 初始化块同源守卫
  - 失败 warn 级别日志,不影响业务

替换全库 16 处不安全 `JSON.parse(userStr)` 调用:
  composables/useLaserMint.js                  composables/useShare.js
  utils/guideConfig.js                         utils/preloadApi/core.js
  pages/castlove/lenticular/lenticular-result.vue
  pages/support-activity/index.vue             pages/support-activity/components/{TopRanking,ActionBar}.vue
  pages/components/{Header,ShareModal,ShareReportButtons}.vue
  pages/tasks/{GuideModal,daily-tasks}.vue
  pages/asset-detail/asset-detail.vue          pages/exhibition/exhibition.vue
  pages/profile/profile.vue                    pages/login/quickLogin.vue(原崩点)

净 -18 行,17 文件改动 + 1 文件新增。后续如需支持多 key(如 'adminUser'),
把 getStoredUser 扩成泛型 getStoredJSON(key) 即可。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 17:16:49 +08:00
zerosaturation
5ab1a537db feat(frontend): daily-task reportEvent 接入 + exhibition 错位实现迁移
Phase F.2 前端接入:

- asset-detail.vue: onLoad 触发 daily_browse_asset reportEvent(后端幂等:
  status=completed/claimed 时 skip;本地不缓存避免跨天去重逻辑复杂)
- exhibition.vue: 删除原 exhibition 页 onLoad 的 daily_browse_asset reportEvent
  调用(错位实现,浏览发生在详情页不在展厅页)
- myWorks.vue: handleAssetSelect 成功分支新增 daily_place_asset reportEvent
- daily-tasks.vue: 移除多余的 task-progress 文本显示(接口不返回
  current_count/target_count,前端 UI 也不展示)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 15:47:01 +08:00
zerosaturation
d4ee464bed fix:修复任务组件报错 2026-07-16 11:34:37 +08:00
zerosaturation
3e1c6c309b feat: 修改样式功能 2026-05-26 22:50:39 +08:00
zerosaturation
ee0433464f feat: 修改铸造消耗确认框和新增批量购买道具的功能,修改回退按钮的颜色 2026-05-22 00:14:28 +08:00
569321bb41 feat: 修改返回按钮 2026-05-21 21:35:17 +08:00
zerosaturation
2450fc1368 feat: 修改各种小bug 2026-05-17 23:33:45 +08:00
6252be4d75 image:替换图片 2026-05-15 21:39:21 +08:00
6e09afe843 feat: 替换字体 2026-05-13 16:34:50 +08:00
zerosaturation
44ba103e64 feat: 修改字体 2026-05-12 11:26:32 +08:00
zerosaturation
958dffce6a feat: 修改跳转小屋的路由,和修改header的样式 2026-05-07 17:55:13 +08:00
zerosaturation
e761bde30b fix: 修复自动升级和展览藏品下架的索引bug 2026-04-23 14:31:40 +08:00
zerosaturation
6866618ff6 fix: 引导任务修改bug 2026-04-22 17:35:43 +08:00
zerosaturation
dd838fccc4 style: 修改每日任务和引导任务的样式 2026-04-22 15:08:05 +08:00
zerosaturation
d7634a558f fix: 修改退出登录时,没有完全清除存储的数据 2026-04-21 16:39:16 +08:00
zerosaturation
bebdc13c80 fix: 修改任务系统的bug 2026-04-17 17:17:32 +08:00
zerosaturation
4e13c86aa4 fix: 修改任务系统奖励修复 2026-04-15 14:11:07 +08:00
ad20197352 feat: 每日任务集成 2026-04-14 14:32:56 +08:00