| traditionalApp/pages/webview/webview.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
traditionalApp/pages/webview/webview.vue
@@ -38,6 +38,7 @@ // 仅微赞直播间入口注入带 webchatPay/{appId} 的 UA,微赞 H5 靠它开启唤起支付逻辑。 // 必须在给 web-view 赋值 URL(触发渲染)之前设置,底层 WebView 创建时才会带上该 UA。 injectWeizanUserAgent() logCurrentUserAgent() } // #endif @@ -121,6 +122,19 @@ } /** * 输出进入直播间后底层 WebView 当前实际使用的完整 UA。 */ function logCurrentUserAgent() { // #ifdef APP-PLUS try { console.log('[WebView] 进入直播间完整 UA:', plus.navigator.getUserAgent() || '') } catch (e) { console.error('[WebView] 读取完整 UA 失败:', e) } // #endif } /** * 解码路由参数,异常时回退为空字符串。 */ function decodeQueryValue(value: unknown) {