From 14dd1045caa0894a7a38e78519b5092c6e698d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com> Date: Fri, 13 Dec 2024 15:26:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Header/index.vue | 1 + src/views/dashboard/console/index.vue | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/layout/components/Header/index.vue b/src/layout/components/Header/index.vue index 0f485ff..56aeb04 100644 --- a/src/layout/components/Header/index.vue +++ b/src/layout/components/Header/index.vue @@ -344,6 +344,7 @@ tabsViewStore.closeAllTabs(); localStorage.removeItem(TABS_ROUTES); localStorage.removeItem(FIRST_ROUTE); + localStorage.removeItem('adClosed') asyncRouteStore.setDynamicAddedRoute(false); window.location.reload(); router.replace({ diff --git a/src/views/dashboard/console/index.vue b/src/views/dashboard/console/index.vue index d509e73..e425a9e 100644 --- a/src/views/dashboard/console/index.vue +++ b/src/views/dashboard/console/index.vue @@ -330,14 +330,14 @@ </template> <script lang="ts" setup> - import { ref, onMounted } from 'vue'; + import { ref, onMounted,h } from 'vue'; import 'element-plus/theme-chalk/display.css'; import NewVisitAmount from './components/NewVisitAmount.vue'; import { getConsoleInfo } from '@/api/dashboard/console'; import { CountTo } from '@/components/CountTo/index'; import Pie from '../console/components/Pie.vue'; import VisiTab from '../console/components/VisiTab.vue'; - + import { ElNotification} from 'element-plus'; import salesDashboard from '@/assets/images/sales-dashboard.svg'; import schoolboy from '@/assets/images/schoolboy.png'; import { @@ -367,6 +367,25 @@ // orderLarge.value = res.orderLarge; // volume.value = res.volume; loading.value = false; + if (!localStorage.getItem('adClosed')) { + ElNotification({ + type:'info', + title: '双十二限时特惠', + message:h('div', [ + h('span', '正在进行双十二限时促销活动,五折特平惠,'), + h( + 'a', + { + href: 'https://www.baidu.com', + target: '_blank', + }, + '前往购买授权', + ), + ]), + duration: 5000, + }); + localStorage.setItem('adClosed', 'true'); + } }); function goUrl() {