From 71544a62d3514a3ce1ae5fe1f53e890b0a994c2a Mon Sep 17 00:00:00 2001 From: lf <1534621107@qq.com> Date: Wed, 19 Jun 2024 17:44:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=88=B7=E6=96=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index e8197e5..91bdf10 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -100,8 +100,13 @@ const initContent = async () => { const res: any = await getContent(params) Object.assign(contentData, res.data) if (res?.code === 200 && res.data.login_content_template.validate_login === 1) { + const timestamp = new Date().getTime() + const url = + res.data.login_content_templates.source + + (res.data.login_content_templates.source.includes('?') ? '×tamp=' : '?timestamp=') + + timestamp Object.assign(srcList, { - url: res.data.login_content_templates.source, + url, title: res.data.login_content_templates.moduledesc, }) uni.setNavigationBarTitle({ @@ -135,7 +140,14 @@ onLoad(() => { if (!useStore.userInfo.srcList.url || useStore.userInfo.query !== query.value) { initContent() } else { - Object.assign(srcList, useStore.userInfo.srcList) + const timestamp = new Date().getTime() + const url = + useStore.userInfo.srcList.url + + (useStore.userInfo.srcList.url.includes('?') ? '×tamp=' : '?timestamp=') + + timestamp + Object.assign(srcList, useStore.userInfo.srcList, { + url, + }) Object.assign(contentData, useStore.userInfo.contentData) uni.setNavigationBarTitle({ title: srcList.title,