Files
wx-h5-demo/miniapp/scenario3-home-bug.wxml

28 lines
1.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- 场景3-反面(❌):「小程序首页」(复现 bug 用)
路径:/pages/demo/home
用法:把本页并入小程序并在 app.json 注册(路径 /pages/demo/home),
作为进入 demo 的起点(也可临时当成首页)。
验证:
本页「进入 H5 web-view」→ H5 点 ③「复现旧 bug」→ 立刻退回本页 →
点右上角「···」转发 → 接收者落到本页,而不是那个 H5 页面。
对照:把 H5 里改点 ②「正确分享」并重新走一遍,接收者就应落到 H5 页面。 -->
<view style="padding:48rpx 40rpx;text-align:center">
<view style="font-size:36rpx;font-weight:700;color:#2B2320">兜爸心选 · 首页</view>
<view style="font-size:26rpx;color:#6B615B;line-height:1.7;margin-top:16rpx">
本页是 bug 复现用的「首页」:<br/>
<text style="color:#C4553A">onShareAppMessage 写死 path: '/pages/demo/home'</text><br/>
并忽略回调里的 webViewUrl(旧版实现)。
</view>
<button style="margin-top:40rpx;background:#F4593C;color:#fff;border-radius:14rpx" bindtap="goWebview">
进入 H5 web-view(场景3)
</button>
<view style="font-size:24rpx;color:#A79C95;line-height:1.7;margin-top:32rpx;text-align:left">
操作步骤:<br/>
1. 点上面按钮进入 web-view(加载 wx-h5-demo);<br/>
2. H5 里点 ③「❌ 复现旧 bug:postMessage + navigateBack」;<br/>
3. 会立刻退回本页 —— 点右上角「···」转发;<br/>
4. 接收者打开卡片会落到本页(bug 现象)。<br/>
5. 改点 ②「✅ 正确分享」重走一遍,接收者应打开 H5 页面。
</view>
</view>