林旭祥 преди 2 дни
родител
ревизия
f758d75e08
променени са 2 файла, в които са добавени 6 реда и са изтрити 9 реда
  1. 0 1
      src/utils/sunshineRunWs.ts
  2. 6 8
      src/views/login/qrcode.vue

+ 0 - 1
src/utils/sunshineRunWs.ts

@@ -16,7 +16,6 @@ export function useSunshineRunSocket() {
   let ip = localStorage.getItem('ip');
   const address: any = ip?ip:import.meta.env.VITE_APP_BASE_API;
   const token: any = localStorage.getItem('token');
-  const deviceid: any = localStorage.getItem('deviceid');
   const myToken: any = 'JWT ' + token;
 
   // let socketHand: any = useAppStore().getSocketHand() || null; //ws实例对象

+ 6 - 8
src/views/login/qrcode.vue

@@ -111,6 +111,11 @@ const getHandWs = () => {
       //刷新
       window.location.reload();
     }
+    //自动登录
+    if (route.query?.auto) {
+      type.value = 2;
+      getLogin();
+    }
   });
 };
 
@@ -204,14 +209,7 @@ onMounted(() => {
     loginForm.value.password = myPassword;
   }
   localStorage.removeItem('ip');
-  if (route.query?.auto) {
-    type.value = 2;
-    getLogin();
-  } else if (token && deviceid) {
-    router.push({ path: '/gesture' });
-  } else {
-    getHandWs();
-  }
+  getHandWs();
 });
 
 onBeforeUnmount(() => {