瀏覽代碼

提交守护计划

wangming 1 月之前
父節點
當前提交
5dda162f14

+ 4 - 4
src/components/component/alarModel.vue

@@ -430,8 +430,8 @@ export default {
                     "xcx_mqtt_cmd1" +
                     uni.getStorageSync("userId") +
                     Math.random().toString(16).substring(2, 8),
-                username: "admin",
-                password: "public",
+                username: "lnradar",
+                password: "lnradar",
                 // 微信小程序特定配置
                 wsOptions: {
                     WebSocket: function (url) {
@@ -452,13 +452,13 @@ export default {
             if (!selectedService || selectedService == "aloneServe") {
                 if (__wxConfig.envVersion == "develop") {
                     client = mqtt.connect(
-                        "wxs://cmd.radar-power.cn/mqtt",
+                        "wxs://cmd.radar-power.cn/mqtt/",
                         params
                     );
                 }
                 if (__wxConfig.envVersion == "trial") {
                     client = mqtt.connect(
-                        "wxs://cmd.radar-power.cn/mqtt",
+                        "wxs://cmd.radar-power.cn/mqtt/",
                         params
                     );
                 }

+ 9 - 0
src/pages.json

@@ -204,6 +204,15 @@
                         "navigationBarBackgroundColor": "#faede2",
                         "navigationBarTextStyle": "black"
                     }
+                },
+                {
+                    "path": "playSetting/playSetting",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "计划配置",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
                 }
             ]
         }

+ 4 - 4
src/pagesA/deviceDetail/deviceDetail.vue

@@ -895,8 +895,8 @@ export default {
                     Date.now() +
                     "_" +
                     Math.random().toString(16).substring(2, 8),
-                username: "admin",
-                password: "public",
+                username: "lnradar",
+                password: "lnradar",
                 // 微信小程序特定配置
                 wsOptions: {
                     WebSocket: function (url) {
@@ -917,13 +917,13 @@ export default {
             if (!selectedService || selectedService == "aloneServe") {
                 if (__wxConfig.envVersion == "develop") {
                     clientTwo = mqtt.connect(
-                        "wxs://data.radar-power.cn/mqtt",
+                        "wxs://data.radar-power.cn/mqtt/",
                         params
                     );
                 }
                 if (__wxConfig.envVersion == "trial") {
                     clientTwo = mqtt.connect(
-                        "wxs://data.radar-power.cn/mqtt",
+                        "wxs://data.radar-power.cn/mqtt/",
                         params
                     );
                 }

+ 16 - 4
src/pagesA/healthAlarm/healthAlarm.vue

@@ -2,7 +2,7 @@
     <view class="home-warpTwo">
         <view class="airbody">
             <view class="module">
-                <view class="device-bottom">
+                <view class="device-bottom" v-if="selectedPlan.length > 0">
                     <view
                         class="info-box"
                         v-for="(item, index) in selectedPlan"
@@ -19,13 +19,16 @@
                             ></image>
                             <image
                                 @click="editItem(item)"
-                                style="margin-left: 10rpx"
+                                style="margin-left: 30rpx"
                                 src="../../static/edit.png"
                                 alt=""
                             ></image>
                         </view>
                     </view>
                 </view>
+                <view v-else>
+                    <view class="noPlan">暂无守护计划</view>
+                </view>
             </view>
         </view>
         <view class="bottomTwo">
@@ -90,7 +93,6 @@ export default {
                             this.planListName = res.data.data.map(
                                 (ele) => ele.name
                             );
-                            console.log(this.planList, 99999);
                         }
                     }
                 });
@@ -221,7 +223,11 @@ export default {
             });
         },
         editItem(item) {
-            console.log(item, 88888);
+            uni.navigateTo({
+                url:
+                    "/pagesA/playSetting/playSetting?planInfo=" +
+                    JSON.stringify(item),
+            });
         },
     },
     onLoad(options) {
@@ -322,6 +328,12 @@ export default {
                     margin-top: 20rpx;
                 }
             }
+            .noPlan {
+                background-color: #f9efe5;
+                color: #999;
+                font-size: 28rpx;
+                text-align: center;
+            }
         }
     }
     .bottomTwo {

+ 15 - 0
src/pagesA/playSetting/playSetting.vue

@@ -0,0 +1,15 @@
+<template></template>
+<script>
+export default {
+    data() {
+        return {
+            planInfo: "",
+        };
+    },
+    onLoad(options) {
+        this.planInfo = JSON.parse(options.planInfo);
+        console.log(this.planInfo, 99999);
+    },
+};
+</script>
+<style lang="less"></style>

+ 4 - 1
src/pagesA/shareList/shareList.vue

@@ -73,19 +73,22 @@ export default {
     },
     methods: {
         getShareList() {
+            uni.showLoading({
+                title: "加载中",
+            });
             this.$http
                 .post("wap/share/queryDevShare", {
                     userId: uni.getStorageSync("userId"),
                     state: null,
                 })
                 .then((res) => {
+                    uni.hideLoading();
                     if (res.data.data) {
                         this.shareList = res.data.data;
                         if (this.shareList && this.status != null) {
                             const hasStatusZero = this.shareList.some(
                                 (item) => item.state === 0
                             );
-                            console.log(hasStatusZero);
                             if (!hasStatusZero) {
                                 this.state = null;
                                 this.getShareList();