topfans/frontend
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
..
components feat:修改铸造消耗弹窗样式 2026-07-27 13:38:23 +08:00
composables refactor(frontend): consolidate user storage read via getStoredUser helper 2026-07-27 17:16:49 +08:00
config
hybrid/html
pages refactor(frontend): consolidate user storage read via getStoredUser helper 2026-07-27 17:16:49 +08:00
static feat:修改图片尺寸和uni配置 2026-07-27 12:48:02 +08:00
store fix(frontend): clear all daily_login_completed_* keys on logout 2026-07-27 16:36:58 +08:00
uni_modules fix:修改一键登录页到首页的bug 2026-07-21 15:00:49 +08:00
uniCloud-alipay
utils refactor(frontend): consolidate user storage read via getStoredUser helper 2026-07-27 17:16:49 +08:00
.env.development
.env.production
.gitignore
App.vue feat:修改图片尺寸和uni配置 2026-07-27 12:48:02 +08:00
index.html
main.js
manifest.json feat:修改图片尺寸和uni配置 2026-07-27 12:48:02 +08:00
oss-upload-test(1).html
package.json feat:增加二维码验证真伪的功能 2026-07-13 11:22:56 +08:00
pages.json feat:修改详细页面,修改为每个类型的页面不对 2026-07-15 19:16:28 +08:00
RANKING_API_SPECIFICATION.md
uni.promisify.adaptor.js
uni.scss