From 91eb05fa367d5547547f849c8f037190d415f7b4 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Fri, 14 Jul 2023 18:46:35 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E5=85=BC=E5=AE=B9=E4=BA=91?= =?UTF-8?q?=E9=97=AA=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- homepage.html | 3 ++- ysf.html | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/homepage.html b/homepage.html index 9a42692..7d6031d 100644 --- a/homepage.html +++ b/homepage.html @@ -373,7 +373,8 @@ self.swiperDataList = res.data; sessionStorage.setItem('goodsCount', res.data.length); self.goodsShow = res.data.length > 1; - if (res.data && res.data.length == 1) {//单个商品直接进入详情页面 + let ua = window.navigator.userAgent.toLowerCase();/* 判断是否web-view打开 */ + if ((res.data && res.data.length == 1) || /miniProgram/i.test(ua)) {//单个商品直接进入详情页面 sessionStorage.setItem('goodsInfo', JSON.stringify(res.data[0])); this.toPage(res.data[0]); return false; diff --git a/ysf.html b/ysf.html index c0d322e..5c92baf 100644 --- a/ysf.html +++ b/ysf.html @@ -17,7 +17,7 @@
-
{{prompt_text}} @@ -115,7 +115,8 @@ popStatus: 1, /*1 成功 2提示 3失败 */ prompt_text: '', cls: null, - money: 0 + money: 0, + isMini: false, }; }, @@ -123,6 +124,12 @@ modelPop }, + mounted () { + /* 判断是否是微信小程序内 */ + let ua = window.navigator.userAgent.toLowerCase(); + this.isMini = /miniProgram/i.test(ua); + }, + methods: { /* 立即领取 */ submit () { @@ -157,6 +164,7 @@ } else { this.tip('领取成功,请前往【云闪付】-【卡包】中查看', 1); } + self.ysf.available = 9; } else { if (code == 403) { if (this.backAble) { @@ -178,6 +186,8 @@ /* 返回 */ backGoodsFn () { this.money = 0; + /* 判断是否web-view打开 则不返回 */ + if (this.isMini) return; if (this.backAble) { window.location.replace('./homepage.html'); } else {