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