diff --git a/App.vue b/App.vue index 8878890..a51e726 100644 --- a/App.vue +++ b/App.vue @@ -41,7 +41,9 @@ parameters: {} }, - onLaunch: function(parameters = {}) { + onLaunch: function(parameters = {}) { + uni.setStorageSync('firstVisitUrlH5', location.href); + // 动态构建script标签,用于引入wxjs文件 var script = document.createElement('script'); script.src = "https://res.wx.qq.com/open/js/jweixin-1.6.0.js"; diff --git a/pages/restaurant/home/shop_home/shop_home.vue b/pages/restaurant/home/shop_home/shop_home.vue index 925766c..e239c94 100644 --- a/pages/restaurant/home/shop_home/shop_home.vue +++ b/pages/restaurant/home/shop_home/shop_home.vue @@ -504,7 +504,7 @@ urlData.__URL__ = location.href.split('#')[0]; // ios手机会把首次进入的url当做wx.config中的realAuthUrl,所以需要在入口文件将该链接存下来 而不能是当前页面的链接 if (urlData.__MachineType__ == 'IOS') { - let t = uni.getStorageSync('firstVisitUrl').split('#')[0] + let t = uni.getStorageSync('firstVisitUrlH5').split('#')[0] urlData.__URL__ = t; } return urlData.__URL__; diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html index 143352d..6876780 100644 --- a/unpackage/dist/build/web/index.html +++ b/unpackage/dist/build/web/index.html @@ -1,2 +1,2 @@