From 37a68998ad1d92a5cc4618019dafab28c472fcd8 Mon Sep 17 00:00:00 2001 From: tcubic <123456> Date: Mon, 8 Aug 2022 16:28:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Index.vue | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/components/Index.vue b/src/components/Index.vue index febda3b..4d75787 100644 --- a/src/components/Index.vue +++ b/src/components/Index.vue @@ -421,6 +421,8 @@ const luckyWheelFn = () => { // 活动点击 const activityBtn = (item) => { console.log(item.id); + console.log(wx); + if (item.id == 1) { @@ -451,11 +453,21 @@ const activityBtn = (item) => { if (item.id == 4) { console.log("牛牛杯"); - window.location.href = - "https://appstatic.cmschina.com/activity/cmszhyxpt/bees/index.html?id=INT_SMKTC_uD5KUL2d"; - setTimeout(()=>{ - location.replace(location.href) - },1000) + let urlTarget = "https://appstatic.cmschina.com/activity/cmszhyxpt/bees/index.html?id=INT_SMKTC_uD5KUL2d"; + + var targeturl = JSON.stringify(e.currentTarget.dataset.targeturl); + + targeturl = encodeURIComponent(targeturl) + + url = './webview/webview?url=' + targeturl + + wx.miniProgram.navigateTo({url:url,}); + + // window.location.href = + // "https://appstatic.cmschina.com/activity/cmszhyxpt/bees/index.html?id=INT_SMKTC_uD5KUL2d"; + // setTimeout(()=>{ + // location.replace(location.href) + // },1000) } if (item.id == 5) {