fix: 云闪付控件唤起路线B——发布脚本向构建产物index.html注入upsdk静态标签(HBuilderX不吃根模板,控件桥需静态加载);白名单豁免下线,唤起失败统一弹指引模态
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
8b3ac20e34
commit
b6bbb0b219
@@ -1,10 +1,8 @@
|
||||
// xuchao: 怀化石油汽油减免券——前端常量与工具(全写死,只服务这一个门店,决策 1/10/15)
|
||||
// 价格真相在后端常量(20000 分),此处 200.00 仅展示用,两处改价必须同步
|
||||
// 价格真相=后端配置 hh.voucher.price-fen 经 latest 下发;此处 200.00 仅为接口未返回时的展示兜底
|
||||
|
||||
export const PETROL_SHOP_ID = '851219003520709'
|
||||
export const VOUCHER_PRICE_TEXT = '200.00'
|
||||
// xuchao: 非云闪付环境豁免拦截的联调手机号(决策 13)
|
||||
export const VOUCHER_PAY_WHITELIST_PHONE = '18684839400'
|
||||
|
||||
export const VOUCHER_NAME = '怀化石油汽油电子券'
|
||||
|
||||
@@ -35,12 +33,6 @@ export function injectUpSdk() {
|
||||
document.head.appendChild(s)
|
||||
}
|
||||
|
||||
// xuchao: 云闪付容器判定只看 UA——不能掺 window.upsdk 是否已加载(SDK 是异步注入的,
|
||||
// 首屏点击时可能还没 load 完,会把云闪付内首点误判为站外)。UA 关键字真机实测后定稿。
|
||||
export function isUnionPayApp() {
|
||||
if (typeof navigator === 'undefined' || !navigator.userAgent) return false
|
||||
return /unionpay|upsdk|云闪付/i.test(navigator.userAgent)
|
||||
}
|
||||
|
||||
// xuchao: open-api/hhService/voucher/* 为双层壳:外层 errcode,内层 data.code 才是业务码
|
||||
// (同 login.vue 的 isBizOk 判定,提到公共层复用)
|
||||
|
||||
Reference in New Issue
Block a user