zuypeng 1 жил өмнө
parent
commit
7491273994

+ 7 - 2
src/pages-wash/device/index.vue

@@ -91,7 +91,7 @@ const loadDeviceDetail = (id: number) => {
         })
       }, 2000)
     }
-    res.functionList = res.funcs?.split("|") || []
+    res.functionList = res.functions?.split("|") || []
     state.device = res;
   }).catch(e => {
     console.error(e)
@@ -123,6 +123,7 @@ const handleClickDevice = () => {
             uni.showToast({
               title: '设备启动成功'
             })
+            state.device.state ='busy'
           })
         } else {
           uni.showLoading({
@@ -130,7 +131,11 @@ const handleClickDevice = () => {
             mask: true,
           });
           post(`/wash-device/stopDevice/${state.device.shortId}`).then((res: any) => {
-            uni.hideLoading()
+            uni.hideLoading();
+            uni.showToast({
+              title: '设备停机成功'
+            })
+            state.device.state ='idle'
           })
         }
       }

+ 2 - 2
src/utils/https.ts

@@ -14,9 +14,9 @@ isDevelopment = e === "develop" || e === "trial";
 // #endif
 
 let env: string = isDevelopment ? "dev" : "prd";
-const apis = {
+const apis:any = {
     dev: {
-        serverUrl: "http://192.168.5.7:9099/api",
+        serverUrl: "https://dev-wash.kuaiyuman.cn/api",
         fileUrl: "https://zyp-1258963180.cos.ap-guangzhou.myqcloud.com/"
     },
     prd: {