Kaynağa Gözat

加入备案号

liyanbo 1 ay önce
ebeveyn
işleme
5b823a39a3
1 değiştirilmiş dosya ile 61 ekleme ve 6 silme
  1. 61 6
      src/App.vue

+ 61 - 6
src/App.vue

@@ -8,16 +8,38 @@
   </div>
   <!-- 路由视图 -->
   <router-view></router-view>
+  <footer v-if="isLoginPage" class="login-record-footer">
+    <a
+      href="https://beian.miit.gov.cn/#/Integrated/index"
+      target="_blank"
+      rel="noopener noreferrer"
+    >
+      ICP备案:京ICP备2025136397号-1
+    </a>
+  </footer>
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted, watch } from 'vue'
+import { computed, ref, onMounted, onUnmounted, watch } from 'vue'
 import { useRoute } from 'vue-router'
 
 const route = useRoute()
 const showLandscapeHint = ref(false)
 const countdown = ref(3) // 倒计时初始值
 let countdownTimer = null
+const loginRoutes = new Set([
+  '/',
+  '/login',
+  '/login-mobile',
+  '/quick-login',
+  '/promotion-login',
+  '/login-qsfl',
+  '/register-login',
+  '/ai-login',
+  '/blockly-login'
+])
+
+const isLoginPage = computed(() => loginRoutes.has(route.path))
 let hasShownOnce = false // 用于跟踪当前会话中是否已经显示过提示
 
 // 检测是否为移动设备
@@ -55,12 +77,12 @@ const closeLandscapeHint = () => {
 const startCountdown = () => {
   // 重置倒计时
   countdown.value = 3
-  
+
   // 清理之前的定时器
   if (countdownTimer) {
     clearInterval(countdownTimer)
   }
-  
+
   // 开始新的倒计时
   countdownTimer = setInterval(() => {
     countdown.value--
@@ -77,7 +99,7 @@ const checkLandscapeHint = () => {
     showLandscapeHint.value = false
     return
   }
-  
+
   if (isMobileDevice() && !isLandscape() && !isExcludedRoute() && !hasShownOnce) {
     // 如果是移动设备、竖屏、不在排除路由中,且本次会话中未显示过提示,则显示横屏提示
     showLandscapeHint.value = true
@@ -119,7 +141,7 @@ watch(() => route.path, () => {
 onMounted(() => {
   checkLandscapeHint() // 页面加载时检查
   window.addEventListener('resize', handleResize)
-  
+
   // 监听设备方向变化(如果支持的话)
   if (window.screen && window.screen.orientation) {
     window.screen.orientation.addEventListener('change', handleResize)
@@ -193,8 +215,41 @@ onUnmounted(() => {
   background-color: #66b1ff;
 }
 
+.login-record-footer {
+  position: fixed;
+  right: 16px;
+  bottom: 16px;
+  left: 16px;
+  z-index: 1000;
+  text-align: center;
+}
+
+.login-record-footer a {
+  color: rgba(255, 255, 255, 0.86);
+  font-size: 12px;
+  line-height: 1.5;
+  text-decoration: none;
+  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
+}
+
+.login-record-footer a:hover,
+.login-record-footer a:focus-visible {
+  color: #fff;
+  text-decoration: underline;
+}
+
 /* 移动端样式 - 屏幕宽度小于 768px */
 @media (max-width: 768px) {
+  .login-record-footer {
+    right: 12px;
+    bottom: 12px;
+    left: 12px;
+  }
+
+  .login-record-footer a {
+    font-size: 11px;
+  }
+
   router-view {
     padding: 10px;
   }
@@ -216,4 +271,4 @@ body{
   height: 100vh;
   overflow: hidden;
 }
-</style>
+</style>