Explorar el Código

正式服测试服转换功能去除

XuZinan hace 3 años
padre
commit
9761af764f
Se han modificado 2 ficheros con 25 adiciones y 25 borrados
  1. 22 23
      pages/login/login.vue
  2. 3 2
      services/constants.js

+ 22 - 23
pages/login/login.vue

@@ -5,7 +5,6 @@
         src="~@/static/logo.png"
         mode="aspectFit"
         class="img"
-        @click="toogle"
       ></image>
     </view>
     <view class="form">
@@ -87,28 +86,28 @@ export default {
         url: "../WorkingHours/index",
       });
     },
-    toogle() {
-      this.count++;
-      if (this.count == 8) {
-        const env = uni.getStorageSync("ENV");
-        if (env == "dev") {
-          uni.setStorageSync("ENV", "deploy");
-          uni.showToast({
-            icon: "none",
-            title: "已切换成正式环境",
-          });
-        } else {
-          uni.setStorageSync("ENV", "dev");
-          uni.showToast({
-            icon: "none",
-            title: "已切换成测试环境",
-          });
-        }
-        setTimeout(() => {
-			location.reload();
-        }, 1500);
-      }
-    },
+    // toogle() {
+    //   this.count++;
+    //   if (this.count == 8) {
+    //     const env = uni.getStorageSync("ENV");
+    //     if (env == "dev") {
+    //       uni.setStorageSync("ENV", "deploy");
+    //       uni.showToast({
+    //         icon: "none",
+    //         title: "已切换成正式环境",
+    //       });
+    //     } else {
+    //       uni.setStorageSync("ENV", "dev");
+    //       uni.showToast({
+    //         icon: "none",
+    //         title: "已切换成测试环境",
+    //       });
+    //     }
+    //     setTimeout(() => {
+		// 	location.reload();
+    //     }, 1500);
+    //   }
+    // },
     forget() {
       this.count2++;
       if (this.count2 >= 5) {

+ 3 - 2
services/constants.js

@@ -19,8 +19,9 @@ export const devHost = "http://47.96.12.136:8897";
 
 export const deployHost = "http://120.55.44.4:8897";
 
-export const host = uni.getStorageSync('ENV') == 'dev' ? devHost : deployHost
-// export const host = devHost
+// export const host = uni.getStorageSync('ENV') == 'dev' ? devHost : deployHost
+export const host = devHost
+// export const host = deployHost
 
 //设备实时数据获取接口
 export const jinkeCloudUserName = "admin";