11wqe1 1 месяц назад
Родитель
Сommit
69c85984d7
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      src/App.vue

+ 6 - 2
src/App.vue

@@ -1,5 +1,5 @@
 <script setup>
-import { onMounted, ref } from 'vue'
+import { onMounted, ref, inject } from 'vue'
 import { RouterLink, RouterView, useRoute } from 'vue-router'
 import Header from './views/header.vue';
 import axios from 'axios';
@@ -12,6 +12,7 @@ const store = userInfoStore()
 const CurrentRole = userCurrentRole()
 const Current = userCurrent()
 const setgotype = pageGotype()
+const lang = inject('lang')
 
 const name = ref('')
 const isShow = ref(true)
@@ -72,7 +73,10 @@ onMounted(() => {
           name.value = r.data.data.result.name
           userInfo2(r.data.data.result)
         }else {
-          top.location.href = "https://bjt.baoan.edu.cn/manage/?baojiaotong=1&service=https://cloud.cocorobo.cn/ai.html"
+          const serviceUrl = lang.lang === 'hk'
+            ? 'https://cloud.cocorobo.hk/course_resource/index.html'
+            : 'https://cloud.cocorobo.cn/ai.html'
+          top.location.href = `https://bjt.baoan.edu.cn/manage/?baojiaotong=1&service=${serviceUrl}`
         }
       })
   }else if(userid){