From 4f7a732b7f24bd4b696925a4431f0917f6bbc968 Mon Sep 17 00:00:00 2001 From: zhangguoping Date: Thu, 1 Aug 2024 19:21:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9D=83=E7=9B=8A=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 9a12f2e..c6d4b34 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -86,8 +86,8 @@ const getUrlPathName = () => { return strR } } - -window.parent.addEventListener('message', function (event) { +// parent +window.addEventListener('message', function (event) { switch (event.data.data.type) { case 'login': case 'couponBack': @@ -96,7 +96,8 @@ window.parent.addEventListener('message', function (event) { break case 'coupon': srcList.url = - contentData.user_content_templates.source + `?activity_code=${activityCode.value}` + contentData.user_content_templates.source + + `?activity_code=${activityCode.value}&lottery_code=${lottery.value}` srcList.title = contentData.user_content_templates.moduledesc break case 'location': @@ -154,7 +155,8 @@ function initData(res) { } else if (loginValid.validate_login === 2) { // api_code 方式 srcList.url = getTimesTamp( - baseUrl.source + `?activity_code=${activityCode.value}&token=${token}`, + baseUrl.source + + `?activity_code=${activityCode.value}&token=${token}&lottery_code=${lottery.value}`, ) srcList.title = baseUrl.moduledesc } @@ -209,7 +211,9 @@ onLoad(() => { initContent() } else { activityCode.value = activityCodeU - srcList.url = contentDataU.content_templates.source + `?activity_code=${activityCode.value}` + srcList.url = + contentDataU.content_templates.source + + `?activity_code=${activityCode.value}&lottery_code=${lottery.value}` srcList.title = contentDataU.content_templates.moduledesc Object.assign(srcList, { url: getTimesTamp(srcList.url),