From ea02b0c2ae63e5c8de309c11915db4bb43eb400b Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 6 Jan 2025 15:22:53 +0800 Subject: [PATCH] fix --- .env | 5 ++--- src/App.vue | 7 +++++++ src/utils/auth.ts | 3 --- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 79153fd..114f40e 100644 --- a/.env +++ b/.env @@ -2,8 +2,7 @@ VITE_APP_TITLE=金融产品设计及数字化营销沙盘 VITE_PORT=9520 # VITE_PROXY=http://192.168.31.125:8080 VITE_PUBLIC_PATH=./ -VITE_BASE_API=http://192.168.31.51:9000 -# VITE_BASE_API=http://121.37.12.51 -# VITE_BASE_API=https://www.occupationlab.com +# VITE_BASE_API=http://192.168.31.51:9000 +VITE_BASE_API=https://www.occupationlab.com VITE_I18N_LOCALE=zh-cn VITE_I18N_FALLBACK_LOCALE=zh-cn diff --git a/src/App.vue b/src/App.vue index c59d09a..ce0dc24 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,7 +9,14 @@ import { computed } from 'vue'; import { ElConfigProvider } from 'element-plus'; import { useI18n } from 'vue-i18n'; import { getElementPlusLocale } from '@/i18n'; +import Cookies from 'js-cookie'; const { locale } = useI18n({ useScope: 'global' }); const lang = computed(() => getElementPlusLocale(locale.value as string)); + +console.log(33, document.referrer); +// 保证同一个浏览器只有一个当前系统能打开 +if (!document.referrer) { + window.location.href = decodeURIComponent(Cookies.get('sand-referrer')); +} diff --git a/src/utils/auth.ts b/src/utils/auth.ts index a09fcb3..6ee2181 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -3,9 +3,6 @@ import Cookies from 'js-cookie'; const SAND_ACCESS_TOKEN = 'sand-token'; export const getAccessToken = (): string | undefined => Cookies.get(SAND_ACCESS_TOKEN); -export const setAccessToken = (token: string): void => { - Cookies.set(SAND_ACCESS_TOKEN, token); -}; export const removeAccessToken = (): void => Cookies.remove(SAND_ACCESS_TOKEN); export const removeParam = (): void => { Cookies.remove('sand-classId');