From 5537f28fd38d103710e1956e7e6e4ff7c5c57524 Mon Sep 17 00:00:00 2001 From: lf <1534621107@qq.com> Date: Mon, 24 Jun 2024 09:33:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 2462ed9..68fd589 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -128,6 +128,7 @@ window.parent.addEventListener('message', function (event) { async function initContent() { const params = {} params[codeType[code]] = activityCode.value || '' + useStore.reset() const res: any = await getContent(params) initData(res) } @@ -195,8 +196,11 @@ const intervalData = () => { onLoad(() => { activityCode.value = getUrlPathName() - intervalData() - if (!useStore.userInfo.srcList.url || useStore.userInfo.query !== query.value) { + if ( + !useStore.userInfo.srcList.url || + useStore.userInfo.query !== query.value || + useStore.userInfo.href === window.location.href + ) { initContent() } else { Object.assign(srcList, useStore.userInfo.srcList, { @@ -207,6 +211,7 @@ onLoad(() => { title: srcList.title, }) } + intervalData() }) onUnload(() => {