feat:长按付款码=诊断模式(云闪付内无法加 URL 参数的真机排查入口)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
bda2639d78
commit
db6a239560
@@ -29,7 +29,7 @@
|
|||||||
<text class="meta-line" v-if="shop.brandType || shop.category">{{ shop.brandType || shop.category }}</text>
|
<text class="meta-line" v-if="shop.brandType || shop.category">{{ shop.brandType || shop.category }}</text>
|
||||||
<text class="meta-line" v-if="shop.businessTime">营业时间:{{ shop.businessTime }}</text>
|
<text class="meta-line" v-if="shop.businessTime">营业时间:{{ shop.businessTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="pay-btn" @click="onPayCode">
|
<view class="pay-btn" @click="onPayCode()" @longpress="onPayCode(true)">
|
||||||
<svg width="17" height="17" viewBox="0 0 24 24" fill="none"><rect x="3" y="3" width="7" height="7" rx="1.5" stroke="#fff" stroke-width="2"/><rect x="14" y="3" width="7" height="7" rx="1.5" stroke="#fff" stroke-width="2"/><rect x="3" y="14" width="7" height="7" rx="1.5" stroke="#fff" stroke-width="2"/><path d="M14 14h3v3h-3zM18 18h3v3h-3z" fill="#fff"/></svg>
|
<svg width="17" height="17" viewBox="0 0 24 24" fill="none"><rect x="3" y="3" width="7" height="7" rx="1.5" stroke="#fff" stroke-width="2"/><rect x="14" y="3" width="7" height="7" rx="1.5" stroke="#fff" stroke-width="2"/><rect x="3" y="14" width="7" height="7" rx="1.5" stroke="#fff" stroke-width="2"/><path d="M14 14h3v3h-3zM18 18h3v3h-3z" fill="#fff"/></svg>
|
||||||
<text class="pay-btn-text">付款码</text>
|
<text class="pay-btn-text">付款码</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -147,11 +147,12 @@
|
|||||||
},
|
},
|
||||||
// xuchao: 付款码——对齐 ysf 项目首页做法:upsdk.qrCodePay() 由云闪付容器原生拉起付款码,无 web 跳转。
|
// xuchao: 付款码——对齐 ysf 项目首页做法:upsdk.qrCodePay() 由云闪付容器原生拉起付款码,无 web 跳转。
|
||||||
// SDK 加载复用加油页验证过的注入模式;拉不起的场景(非容器/加载失败/非免密登录)统一弹 payGuide
|
// SDK 加载复用加油页验证过的注入模式;拉不起的场景(非容器/加载失败/非免密登录)统一弹 payGuide
|
||||||
onPayCode() {
|
onPayCode(forceDiag) {
|
||||||
// xuchao: 付款码诊断版——每步落诊断点;?vc=1 时卡点用弹窗展示完整诊断,普通用户仍是轻提示
|
// xuchao: 付款码诊断——短按=正常流程(轻提示);长按 或 ?vc=1=诊断弹窗(每步状态可见)。
|
||||||
|
// 云闪付内不便加 URL 参数,长按即真机诊断入口
|
||||||
const diag = []
|
const diag = []
|
||||||
const t0 = Date.now()
|
const t0 = Date.now()
|
||||||
const dbg = /[?&#]vc=1/.test(typeof window !== 'undefined' ? window.location.href : '')
|
const dbg = forceDiag === true || /[?&#]vc=1/.test(typeof window !== 'undefined' ? window.location.href : '')
|
||||||
diag.push('UA=' + String(navigator.userAgent || '').slice(0, 90))
|
diag.push('UA=' + String(navigator.userAgent || '').slice(0, 90))
|
||||||
const fail = (why) => {
|
const fail = (why) => {
|
||||||
diag.push('结果=' + why + ' 耗时' + (Date.now() - t0) + 'ms')
|
diag.push('结果=' + why + ' 耗时' + (Date.now() - t0) + 'ms')
|
||||||
|
|||||||
Reference in New Issue
Block a user