From 5a8663eb488b576909247af88952107182403351 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Thu, 8 Jan 2026 14:52:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=9C=A8=E5=BF=AB?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=8E=AF=E5=A2=83=E4=B8=AD=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=94=A8=E6=88=B7=E9=9A=90=E7=A7=81=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E7=AA=97=E4=BD=93=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/util.js | 20 ++++++- components/privacy-popup/privacy-popup.vue | 68 +++++++++++++++------- lang/zh-cn/order/activist.js | 12 ++-- pages_goods/public/css/list.scss | 2 +- 4 files changed, 72 insertions(+), 30 deletions(-) diff --git a/common/js/util.js b/common/js/util.js index fb6a505..9977c54 100644 --- a/common/js/util.js +++ b/common/js/util.js @@ -1169,8 +1169,24 @@ export default { */ isQuickApp() { // #ifndef QUICKAPP-WEBVIEW - const systemInfo = this.getDeviceInfo(); - return systemInfo.platform === 'quickapp' || process.env.UNI_PLATFORM === 'quickapp'; + let _isQuickApp = false; + try { + const ua = navigator?.userAgent?.toLowerCase(); + console.log('ua = ', ua); + _isQuickApp = ua.indexOf('quickapp') !== -1; + + if (!_isQuickApp) { + // 特殊说明由于网站是嵌入到快应用的Webview组件中,UA中不会包含quickapp字符串, + // 但是会包含uniacid参数,所以这里通过uniacid参数来判断是否为快应用环境 + _isQuickApp = ua.indexOf('uniacid=') !== -1; + } + } catch (e) {} + + if (!_isQuickApp) { + const systemInfo = this.getDeviceInfo(); + _isQuickApp = systemInfo?.platform === 'quickapp' || process?.env?.UNI_PLATFORM === 'quickapp'; + } + return _isQuickApp; // #endif return true; diff --git a/components/privacy-popup/privacy-popup.vue b/components/privacy-popup/privacy-popup.vue index 6cc4810..0a53959 100644 --- a/components/privacy-popup/privacy-popup.vue +++ b/components/privacy-popup/privacy-popup.vue @@ -1,6 +1,6 @@