feat(h5): 首页 H5 壳从定稿原型抽取(#home 满屏,静态 mock,零桥) #96

Merged
guke merged 12 commits from feat/h5-sgbridge-gk into feat/h5-sgbridge 2026-06-30 11:57:48 +08:00
Member

首页webview改造合并

首页webview改造合并
guke added 12 commits 2026-06-30 11:57:43 +08:00
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
含 H2a 定位授权桥方法 isLocationGranted/requestLocationPermission(原 WIP 一并提交)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
删 7 张写死 mock 卡改 CouponCard 动态渲染(随原生:feed-tag 只用 price_label/rank_label,去掉「比团购省」);三排序 tab 智能推荐/距离最近→feed、销量最高→top-sales(删 mock 残留 asc/desc);触底翻页 + 每 tab 5min 缓存 + loading/empty/degraded 三态 + 去重 + 切 tab 防竞态 + 未授权只切高亮不打接口;抢→referral-link([1,3])→SGBridge.openMeituan(deeplink||h5)。含原 H2a 定位空态 WIP 一并提交。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
删写死 mock(DEFAULT_LAST_COMPARE_RECORD + localStorage 读),改带 Bearer token 拉真实比价记录;取最近一条 status=success 且 created_at 在 4 分钟内才显示(对齐原生 HomeViewModel.loadLastCompare),否则/未登录/401 隐藏横幅;进页 + 回前台 visibilitychange 各拉一次;点击仍走 SGBridge.navigate('compareResult')。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
横幅默认 display:none + 真实数据覆盖,占位本不显示;清空源码里的 mock 串,留结构与标签(最低价/去查看)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
home/index.html 引用 assets/welfare/index/coin-icon.png,但 h5/home/assets/ 整个 welfare 子树在抽取时漏拷,弹窗右上角金币 404 不显示。从原型资源补回该图标。test: 断言 /h5/home/assets/welfare/index/coin-icon.png 返 200。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
showCouponAdRewardToast(home/index.html:8841,领券奖励已到账 toast)引用 assets/welfare/index/checkin-coins-600.png,同属抽取时漏本地化的 welfare 子树。从原型 checkin-popup/reward-coins-600.png 补回该图。test: 断言 200。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
guke merged commit 8e3b282c79 into feat/h5-sgbridge 2026-06-30 11:57:48 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WonderableAI/shaguabijia-app-server#96