Browse Source

提交优化代码

wangming 2 tháng trước cách đây
mục cha
commit
14edcd074c
3 tập tin đã thay đổi với 200 bổ sung253 xóa
  1. 1 1
      src/manifest.json
  2. 198 244
      src/pages.json
  3. 1 8
      src/pagesA/devices/devices.vue

+ 1 - 1
src/manifest.json

@@ -72,7 +72,7 @@
                 "provider": "wx610ea582556c983e"
             },
             "wmpf-voip": {
-                "version": "latest",
+                "version": "2.4.7",
                 "provider": "wxf830863afde621eb"
             }
         },

+ 198 - 244
src/pages.json

@@ -1,246 +1,200 @@
 {
-	"pages": [{
-		"path": "pages/home/home",
-		"style": {
-			"navigationStyle": "custom",
-			"enablePullDownRefresh": true
-		}
-	}],
-	"subPackages": [{
-		"root": "pagesA",
-		"pages": [{
-				"path": "deviceDetail/deviceDetail",
-				"style": {
-					"navigationBarTitleText": "设备详情",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				},
-				"usingComponents": {}
-			},
-			{
-				"path": "adDevice/adDevice",
-				"style": {
-					"navigationBarTitleText": "添加设备",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				},
-				"usingComponents": {
-					"van-cell": "@vant/weapp/cell/index",
-					"van-cell-group": "@vant/weapp/cell-group/index",
-					"van-picker": "@vant/weapp/picker/index",
-					"van-popup": "@vant/weapp/popup/index",
-					"van-button": "@vant/weapp/button/index"
-				}
-			},
-			{
-				"path": "loginNew/loginNew",
-				"style": {
-					"navigationStyle": "custom",
-					"enablePullDownRefresh": false
-				},
-				"usingComponents": {
-					"van-button": "@vant/weapp/button/index",
-					"van-checkbox": "@vant/weapp/checkbox/index"
-				}
-			},
-			{
-				"path": "roomSetting/roomSetting",
-				"style": {
-					"navigationBarTitleText": "房间布局",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				},
-				"usingComponents": {
-					"van-nav-bar": "@vant/weapp/nav-bar/index",
-					"van-cell": "@vant/weapp/cell/index",
-					"van-tab": "@vant/weapp/tab/index",
-					"van-tabs": "@vant/weapp/tabs/index",
-					"van-picker": "@vant/weapp/picker/index",
-					"van-popup": "@vant/weapp/popup/index"
-				}
-			},
-			{
-				"path": "devices/devices",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "我的设备",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				},
-				"usingComponents": {
-					"van-nav-bar": "@vant/weapp/nav-bar/index",
-					"van-button": "@vant/weapp/button/index",
-					"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
-					"van-empty": "@vant/weapp/empty/index",
-					"van-dropdown-item": "@vant/weapp/dropdown-item/index"
-				}
-			},
-			{
-				"path": "deviceSetting/deviceSetting",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "设置",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				},
-				"usingComponents": {}
-			},
-			{
-				"path": "my/my",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "我的",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				},
-				"usingComponents": {}
-			},
-			{
-				"path": "OTA/OTA",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "OTA升级",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				},
-				"usingComponents": {}
-			},
-			{
-				"path": "shareList/shareList",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "分享记录",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				},
-				"usingComponents": {}
-			},
-			{
-				"path": "linkShare/linkShare",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "链接分享",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				},
-				"usingComponents": {}
-			},
-			{
-				"path": "serChange/serChange",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "网络配置",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				}
-			},
-			{
-				"path": "sharePages/sharePages",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "分享确认",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				}
-			},
-			{
-				"path": "homeManage/homeManage",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "家庭管理",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				}
-			},
-			{
-				"path": "homeDetail/homeDetail",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "家庭详情",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				}
-			},
-			{
-				"path": "warnDevice/warnDevice",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "报警设备",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				}
-			},
-			{
-				"path": "discrepancy/discrepancy",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "出入详情",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				}
-			},
-			{
-				"path": "abnormalInfo/abnormalInfo",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationBarTitleText": "异常信息",
-					"navigationBarBackgroundColor": "#faede2",
-					"navigationBarTextStyle": "black"
-				}
-			}
-		]
-	}],
-	"plugins": {
-		"airkiss": {
-			"version": "1.1.2",
-			"provider": "wx610ea582556c983e"
-		}
-	},
-	"globalStyle": {
-		"usingComponents": {
-			"van-button": "/wxcomponents/vant/button/index",
-			"van-cell": "/wxcomponents/vant/cell/index",
-			"van-cell-group": "/wxcomponents/vant/cell-group/index",
-			"van-checkbox": "/wxcomponents/vant/checkbox/index",
-			"van-checkbox-group": "/wxcomponents/vant/checkbox-group/index",
-			"van-col": "/wxcomponents/vant/col/index",
-			"van-goods-action": "/wxcomponents/vant/goods-action/index",
-			"van-goods-action-icon": "/wxcomponents/vant/goods-action-icon/index",
-			"van-goods-action-button": "/wxcomponents/vant/goods-action-button/index",
-			"van-loading": "/wxcomponents/vant/loading/index",
-			"van-nav-bar": "/wxcomponents/vant/nav-bar/index",
-			"van-notice-bar": "/wxcomponents/vant/notice-bar/index",
-			"van-notify": "/wxcomponents/vant/notify/index",
-			"van-panel": "/wxcomponents/vant/panel/index",
-			"van-popup": "/wxcomponents/vant/popup/index",
-			"van-progress": "/wxcomponents/vant/progress/index",
-			"van-radio": "/wxcomponents/vant/radio/index",
-			"van-radio-group": "/wxcomponents/vant/radio-group/index",
-			"van-row": "/wxcomponents/vant/row/index",
-			"van-search": "/wxcomponents/vant/search/index",
-			"van-slider": "/wxcomponents/vant/slider/index",
-			"van-stepper": "/wxcomponents/vant/stepper/index",
-			"van-steps": "/wxcomponents/vant/steps/index",
-			"van-submit-bar": "/wxcomponents/vant/submit-bar/index",
-			"van-swipe-cell": "/wxcomponents/vant/swipe-cell/index",
-			"van-switch": "/wxcomponents/vant/switch/index",
-			"van-tab": "/wxcomponents/vant/tab/index",
-			"van-tabs": "/wxcomponents/vant/tabs/index",
-			"van-tabbar": "/wxcomponents/vant/tabbar/index",
-			"van-tabbar-item": "/wxcomponents/vant/tabbar-item/index",
-			"van-tag": "/wxcomponents/vant/tag/index",
-			"van-toast": "/wxcomponents/vant/toast/index",
-			"van-transition": "/wxcomponents/vant/transition/index",
-			"van-tree-select": "/wxcomponents/vant/tree-select/index",
-			"van-datetime-picker": "/wxcomponents/vant/datetime-picker/index",
-			"van-rate": "/wxcomponents/vant/rate/index",
-			"van-collapse": "/wxcomponents/vant/collapse/index",
-			"van-collapse-item": "/wxcomponents/vant/collapse-item/index",
-			"van-picker": "/wxcomponents/vant/picker/index"
-		}
-	},
-	"usingComponts": true,
-	"requiredPrivateInfos": [
-		"getLocation"
-	]
+    "pages": [
+        {
+            "path": "pages/home/home",
+            "style": {
+                "navigationStyle": "custom",
+                "enablePullDownRefresh": true
+            }
+        }
+    ],
+    "subPackages": [
+        {
+            "root": "pagesA",
+            "pages": [
+                {
+                    "path": "deviceDetail/deviceDetail",
+                    "style": {
+                        "navigationBarTitleText": "设备详情",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    },
+                    "usingComponents": {}
+                },
+                {
+                    "path": "adDevice/adDevice",
+                    "style": {
+                        "navigationBarTitleText": "添加设备",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
+                },
+                {
+                    "path": "loginNew/loginNew",
+                    "style": {
+                        "navigationStyle": "custom",
+                        "enablePullDownRefresh": false
+                    },
+                    "usingComponents": {
+                        "van-button": "@vant/weapp/button/index"
+                    }
+                },
+                {
+                    "path": "roomSetting/roomSetting",
+                    "style": {
+                        "navigationBarTitleText": "房间布局",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
+                },
+                {
+                    "path": "devices/devices",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "我的设备",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
+                },
+                {
+                    "path": "deviceSetting/deviceSetting",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "设置",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    },
+                    "usingComponents": {}
+                },
+                {
+                    "path": "my/my",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "我的",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    },
+                    "usingComponents": {}
+                },
+                {
+                    "path": "OTA/OTA",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "OTA升级",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    },
+                    "usingComponents": {}
+                },
+                {
+                    "path": "shareList/shareList",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "分享记录",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    },
+                    "usingComponents": {}
+                },
+                {
+                    "path": "linkShare/linkShare",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "链接分享",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    },
+                    "usingComponents": {}
+                },
+                {
+                    "path": "serChange/serChange",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "网络配置",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
+                },
+                {
+                    "path": "sharePages/sharePages",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "分享确认",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
+                },
+                {
+                    "path": "homeManage/homeManage",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "家庭管理",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
+                },
+                {
+                    "path": "homeDetail/homeDetail",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "家庭详情",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
+                },
+                {
+                    "path": "warnDevice/warnDevice",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "报警设备",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
+                },
+                {
+                    "path": "discrepancy/discrepancy",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "出入详情",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
+                },
+                {
+                    "path": "abnormalInfo/abnormalInfo",
+                    "style": {
+                        "enablePullDownRefresh": true,
+                        "navigationBarTitleText": "异常信息",
+                        "navigationBarBackgroundColor": "#faede2",
+                        "navigationBarTextStyle": "black"
+                    }
+                }
+            ]
+        }
+    ],
+    "plugins": {
+        "airkiss": {
+            "version": "1.1.2",
+            "provider": "wx610ea582556c983e"
+        }
+    },
+    "globalStyle": {
+        "usingComponents": {
+            "van-button": "/wxcomponents/vant/button/index",
+            "van-cell": "/wxcomponents/vant/cell/index",
+            "van-cell-group": "/wxcomponents/vant/cell-group/index",
+            "van-checkbox": "/wxcomponents/vant/checkbox/index",
+            "van-checkbox-group": "/wxcomponents/vant/checkbox-group/index",
+            "van-col": "/wxcomponents/vant/col/index",
+            "van-row": "/wxcomponents/vant/row/index",
+            "van-search": "/wxcomponents/vant/search/index",
+            "van-switch": "/wxcomponents/vant/switch/index",
+            "van-tab": "/wxcomponents/vant/tab/index",
+            "van-tabs": "/wxcomponents/vant/tabs/index"
+        }
+    },
+    "usingComponts": true,
+    "requiredPrivateInfos": [
+        "getLocation"
+    ]
 }

+ 1 - 8
src/pagesA/devices/devices.vue

@@ -158,6 +158,7 @@ export default {
                     status: status,
                 })
                 .then((res) => {
+                    console.log("设备列表", res);
                     if (res.data.code == 200) {
                         let devs = res.data.data;
                         for (let i = 0; i < devs.length; i++) {
@@ -193,14 +194,6 @@ export default {
                             // );
                         }
                         this.devs = devs;
-                    } else if (
-                        res.data.code !== 11011 &&
-                        res.data.code !== 11012
-                    ) {
-                        uni.showModal({
-                            content: res.data.message,
-                            showCancel: false,
-                        });
                     }
                     uni.hideLoading();
                 });