Ver código fonte

添加主框架

bill 2 anos atrás
pai
commit
5c25a29285

+ 0 - 1
src/hook/custom/setup.ts

@@ -3,7 +3,6 @@ import { watchEffect, watch, ref } from "vue";
 import { Router } from "vue-router";
 import { useCustom, useDisabled } from "./hook";
 import {
-  laserModeStack,
   disabledMap,
   hotDisabledStack,
   mapDisabledStack,

+ 3 - 16
src/preset/main.vue

@@ -223,23 +223,10 @@ onMounted(async () => {
     }
     throw e;
   }
+  await presetLogin();
 
-  let preClear;
-  watch(
-    isLogin,
-    async () => {
-      preClear && preClear();
-      if (isLogin.value) {
-        preClear = await presetLogin();
-      } else {
-        preClear = await presetDelogin();
-      }
-
-      loaded.value = true;
-    },
-    { immediate: true }
-  );
-
+  loaded.value = true;
+  console.log("???");
   watch(router.currentRoute, () => {
     putCtrl.value = false;
   });

+ 1 - 0
src/preset/traffic-main.vue

@@ -143,6 +143,7 @@ onMounted(async () => {
     throw e;
   }
   await presetLogin();
+  loaded.value = true;
   watch(router.currentRoute, () => {
     putCtrl.value = false;
   });

+ 6 - 4
src/store/hot.ts

@@ -48,10 +48,12 @@ const assembly = (styles: HotStylesRaw, list: HotsRaw) => {
 };
 
 export const requestData = async () => {
-  const [ohots, ostyles] = await Promise.all([
-    axios.get(URL.hotlist),
-    axios.get(URL.stylelist),
-  ]);
+  // const [ohots, ostyles] = await Promise.all([
+  //   axios.get(URL.hotlist),
+  //   axios.get(URL.stylelist),
+  // ]);
+  const ohots = { list: [] };
+  const ostyles = { list: [] };
   styles.value = ostyles.list;
   list.value = assembly(
     styles.value,

+ 2 - 1
src/store/measure.ts

@@ -39,7 +39,8 @@ export const recovery = () => {
 };
 
 export const requestData = async () => {
-  const res = await axios.get(URL.measureList);
+  // const res = await axios.get(URL.measureList);
+  const res = { list: [] };
   list.value = res.list.map((item) => {
     return {
       ...item,