Sfoglia il codice sorgente

授权跳转修改

duy 3 mesi fa
parent
commit
71b266747e
1 ha cambiato i file con 11 aggiunte e 7 eliminazioni
  1. 11 7
      src/views/home/auth.vue

+ 11 - 7
src/views/home/auth.vue

@@ -36,7 +36,7 @@ store.clearStoreData()
 //变量
 const loading = ref(true)
 const isErrorShow = ref(false)
-const toUrl = ref('/datav')
+const toUrl = ref('/statistics/stats')
 
 //渲染完成
 onMounted(() => {
@@ -83,17 +83,21 @@ const loginByTokenApi = async (form) => {
         setTimeout(() => {
             loading.value = false
             isErrorShow.value = false
-            window?.$message?.success('授权登录成功')
+         
+            // window?.$message?.success('授权登录成功')
             if (!website.localModel) {
             //210跳转文件收集
                 // router.push({ name: 'file' })  
             const role_id = getStoreValue('role_id')
-            if (website.ex_role_id.includes(role_id)) {
-                router.push({ name: 'transfer-initial-expert' })
-            } else {
-                router.push({ name: 'statistics-stats' })
-            }
+            // if (website.ex_role_id.includes(role_id)) {
+            //     router.push({ name: 'transfer-initial-expert' })
+            // } else {
+            //     router.push({ path: toUrl.value })
+            //     // router.push({ name: 'statistics-stats' })
+            // }
+            router.push({ path: toUrl.value })
             } else {
+                window?.$message?.success('授权登录成功')
                 //甬台温,跳转大屏
                 router.push({ path: toUrl.value })
             }