增加权益码

This commit is contained in:
zhangguoping 2024-08-01 19:21:51 +08:00
parent eea760dd21
commit 4f7a732b7f
1 changed files with 9 additions and 5 deletions

View File

@ -86,8 +86,8 @@ const getUrlPathName = () => {
return strR return strR
} }
} }
// parent
window.parent.addEventListener('message', function (event) { window.addEventListener('message', function (event) {
switch (event.data.data.type) { switch (event.data.data.type) {
case 'login': case 'login':
case 'couponBack': case 'couponBack':
@ -96,7 +96,8 @@ window.parent.addEventListener('message', function (event) {
break break
case 'coupon': case 'coupon':
srcList.url = 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 srcList.title = contentData.user_content_templates.moduledesc
break break
case 'location': case 'location':
@ -154,7 +155,8 @@ function initData(res) {
} else if (loginValid.validate_login === 2) { } else if (loginValid.validate_login === 2) {
// api_code // api_code
srcList.url = getTimesTamp( 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 srcList.title = baseUrl.moduledesc
} }
@ -209,7 +211,9 @@ onLoad(() => {
initContent() initContent()
} else { } else {
activityCode.value = activityCodeU 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 srcList.title = contentDataU.content_templates.moduledesc
Object.assign(srcList, { Object.assign(srcList, {
url: getTimesTamp(srcList.url), url: getTimesTamp(srcList.url),