瀏覽代碼

页面加载进行判断

lichao 3 年之前
父節點
當前提交
b9db73612f
共有 1 個文件被更改,包括 9 次插入7 次删除
  1. 9 7
      src/views/index.vue

+ 9 - 7
src/views/index.vue

@@ -873,14 +873,16 @@ export default {
     this.getConfigKey("data_print_title").then((response) => {
       Cookies.set("companyName", response.msg);
     });
-    queryHomeInfo().then((response) => {
-      this.fleetData = response.data;
-      if (response.data.upperRight.length > 0) {
-        this.upperRights = response.data.upperRight.slice(0, 10);
-      }
-      this.upperLeftCntrs = response.data.upperLeftCntrs;
-    });
     this.sysType = Cookies.get("sysType");
+    if (this.sysType == 2) {
+      queryHomeInfo().then((response) => {
+        this.fleetData = response.data;
+        if (response.data.upperRight.length > 0) {
+          this.upperRights = response.data.upperRight.slice(0, 10);
+        }
+        this.upperLeftCntrs = response.data.upperLeftCntrs;
+      });
+    }
     // console.log(this.sysType);
   },
   activated() {