From 4551a1537de3468fed2cf8b3a2083af0e431f815 Mon Sep 17 00:00:00 2001 From: 13121765685 Date: Wed, 14 Jan 2026 11:32:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E6=A1=88=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/frontend/src/App.vue | 2 + .../src/components/footerBeiAn/index.vue | 186 ++++++++++++++++++ apps/frontend/src/locales/index.js | 12 +- apps/frontend/src/views/Login/Login.vue | 23 +-- apps/frontend/src/views/Login/PhoneLogin.vue | 3 +- 5 files changed, 205 insertions(+), 21 deletions(-) create mode 100644 apps/frontend/src/components/footerBeiAn/index.vue diff --git a/apps/frontend/src/App.vue b/apps/frontend/src/App.vue index 643f1ba..b19ff34 100644 --- a/apps/frontend/src/App.vue +++ b/apps/frontend/src/App.vue @@ -5,6 +5,7 @@ import MainLayout from '@/components/layout/MainLayout.vue' import AppHeader from '@/components/layout/AppHeader.vue' import AppSidebar from '@/components/layout/AppSidebar.vue' import { useAuthStore } from '@/stores/auth'; +import footerCom from './components/footerBeiAn/index.vue'; const authStore = useAuthStore(); authStore.updateUserInfo() const route = useRoute() @@ -95,6 +96,7 @@ onMounted(() => {
+ \ No newline at end of file diff --git a/apps/frontend/src/locales/index.js b/apps/frontend/src/locales/index.js index 10499ee..7b32165 100644 --- a/apps/frontend/src/locales/index.js +++ b/apps/frontend/src/locales/index.js @@ -1,5 +1,5 @@ -const savedLang = localStorage.getItem('lang') || 'cn' - +import { isWeChatBrowser } from '@deotaland/utils' +let savedLang = localStorage.getItem('lang') || (isWeChatBrowser()?'zh':'en') export default { legacy: false, locale: savedLang, @@ -14,6 +14,10 @@ export default { theme_dark: '深色', lang_zh: '中文', lang_en: '英文', + footer: { + icp: '蜀ICP备2024078618号-2', + icpLink: 'https://beian.miit.gov.cn/#/Integrated/recordQuery' + } }, breadcrumb: { home: '首页', @@ -1535,6 +1539,10 @@ export default { theme_dark: 'Dark', lang_zh: '中文', lang_en: 'English', + footer: { + icp: 'Shu ICP No. 2024078618-2', + icpLink: 'https://beian.miit.gov.cn/#/Integrated/recordQuery' + } }, breadcrumb: { home: 'Home', diff --git a/apps/frontend/src/views/Login/Login.vue b/apps/frontend/src/views/Login/Login.vue index dc10c47..f79aa78 100644 --- a/apps/frontend/src/views/Login/Login.vue +++ b/apps/frontend/src/views/Login/Login.vue @@ -83,7 +83,7 @@ import { onMounted, reactive, ref, computed } from 'vue' import { useRouter,useRoute } from 'vue-router' import { useI18n } from 'vue-i18n' -import { environmentUtils } from '@deotaland/utils' +import { environmentUtils,isWeChatBrowser } from '@deotaland/utils' import { useAuthStore } from '@/stores/auth' import { WarningFilled, InfoFilled, QuestionFilled, UserFilled, Phone } from '@element-plus/icons-vue' // 导入子组件 @@ -99,20 +99,7 @@ const plugin = reactive(new LOGIN()); // 环境检测状态 const environmentInfo = ref(null) -const isDetectingEnvironment = ref(true) -// 判断是否显示手机号登录入口 -const showPhoneLogin = computed(() => { - // 如果还在检测中,默认显示 - if (isDetectingEnvironment.value) { - return true - } - // 如果检测失败,默认显示 - if (!environmentInfo.value) { - return true - } - // 如果是国内环境,显示手机号登录入口 - return environmentInfo.value.isDomestic -}) +const isDetectingEnvironment = ref(true)//是否正在检测环境 @@ -160,13 +147,13 @@ const goToRegister = () => { // 跳转到手机号登录页面 const goToPhoneLogin = () => { - router.push('/login/phone') + router.replace('/login/phone') } //判断是否是国内环境显示手机号登录入口 - // 页面挂载时初始化认证状态 onMounted(() => { - detectEnvironment() + // detectEnvironment() + isWeChatBrowser()&&goToPhoneLogin() }) diff --git a/apps/frontend/src/views/Login/PhoneLogin.vue b/apps/frontend/src/views/Login/PhoneLogin.vue index 3744e96..0494813 100644 --- a/apps/frontend/src/views/Login/PhoneLogin.vue +++ b/apps/frontend/src/views/Login/PhoneLogin.vue @@ -45,7 +45,7 @@ -