From de91beb37eadfc7e8ccf91f0dfa10f04b4fcc9f7 Mon Sep 17 00:00:00 2001 From: whitechiina <1293616053@qq.com> Date: Fri, 19 Sep 2025 16:09:18 +0800 Subject: [PATCH] updata --- pages/restaurant/home/shop_home/shop_home.vue | 25 +++++++++++++++++-- unpackage/dist/build/web/index.html | 2 +- .../{index.0aa18362.js => index.7a157f4e.js} | 2 +- ...urant-home-shop_home-shop_home.923fe6f7.js | 1 - ...urant-home-shop_home-shop_home.bfa63ac5.js | 1 + 5 files changed, 26 insertions(+), 5 deletions(-) rename unpackage/dist/build/web/static/js/{index.0aa18362.js => index.7a157f4e.js} (99%) delete mode 100644 unpackage/dist/build/web/static/js/pages-restaurant-home-shop_home-shop_home.923fe6f7.js create mode 100644 unpackage/dist/build/web/static/js/pages-restaurant-home-shop_home-shop_home.bfa63ac5.js diff --git a/pages/restaurant/home/shop_home/shop_home.vue b/pages/restaurant/home/shop_home/shop_home.vue index 69a3e41..4812fa1 100644 --- a/pages/restaurant/home/shop_home/shop_home.vue +++ b/pages/restaurant/home/shop_home/shop_home.vue @@ -487,9 +487,30 @@ } }, 10) }, - + getUrl() { - return window.location.href; + let urlData = {}; + try { + urlData.__ua__ = window.navigator.userAgent.toLowerCase(); + if (/android/i.test(urlData.__ua__)) { + urlData.__MachineType__ = 'Android'; + } else if (/iPad|iPhone|iphone|iPod/.test(urlData.__ua__)) { + urlData.__MachineType__ = 'IOS'; + } else { + urlData.__MachineType__ = 'unknown'; + }; + + // 只用#之前的内容 + urlData.__URL__ = location.href.split('#')[0]; + // ios手机会把首次进入的url当做wx.config中的realAuthUrl,所以需要在入口文件将该链接存下来 而不能是当前页面的链接 + if (urlData.__MachineType__ == 'IOS') { + let t = uni.getStorageSync('firstVisitUrl').split('#')[0] + urlData.__URL__ = t; + } + return urlData.__URL__; + } catch (e) { + console.log(e, 'try错误捕获'); + } }, // 挂载微信 diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html index 6eef43c..87494f1 100644 --- a/unpackage/dist/build/web/index.html +++ b/unpackage/dist/build/web/index.html @@ -1,2 +1,2 @@