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) {