Jelajahi Sumber

添加分包

wzh 7 bulan lalu
induk
melakukan
088f015d14

+ 87 - 76
pages.json

@@ -13,12 +13,7 @@
         "navigationBarTitleText": "蓝牙配网"
       }
     },
-    {
-      "path": "pages/device/index",
-      "style": {
-        "navigationBarTitleText": "设备列表"
-      }
-    },
+   
     {
       "path": "pages/user/list",
       "style": {
@@ -98,52 +93,14 @@
         "navigationBarTitleText": "浏览文本"
       }
     },
-    {
-      "path": "pages/device/detail",
-      "style": {
-        "navigationBarTitleText": "详情",
-        "navigationStyle": "custom"
-      }
-    },
-    {
-      "path": "pages/device/detail_6",
-      "style": {
-        "navigationBarTitleText": "详情",
-        "navigationStyle": "custom"
-      }
-    },
-    {
-      "path": "pages/device/detail_new_5",
-      "style": {
-        "navigationBarTitleText": "详情",
-        "navigationStyle": "custom"
-      }
-    },
-    {
-      "path": "pages/device/detail_new_20250528",
-      "style": {
-        "navigationBarTitleText": "详情",
-        "navigationStyle": "custom"
-      }
-    },
-    {
-      "path": "pages/device/setting",
-      "style": {
-        "navigationBarTitleText": "设置"
-      }
-    },
+    
     {
       "path": "pages/wifi/index",
       "style": {
         "navigationBarTitleText": "配网"
       }
     },
-    {
-      "path": "pages/device/scan",
-      "style": {
-        "navigationBarTitleText": "绑定设备"
-      }
-    },
+   
     {
       "path": "pages/user/index",
       "style": {
@@ -151,36 +108,7 @@
       }
     },
 
-    {
-      "path": "pages/device/alert",
-      "style": {
-        "navigationBarTitleText": "报警列表"
-      }
-    },
-    {
-      "path": "pages/device/error",
-      "style": {
-        "navigationBarTitleText": "异常列表"
-      }
-    },
-    {
-      "path": "pages/device/reset/reset",
-      "style": {
-        "navigationBarTitleText": "设备注销"
-      }
-    },
-    {
-      "path": "pages/device/reset/resetrecord",
-      "style": {
-        "navigationBarTitleText": "注销记录"
-      }
-    },
-    {
-      "path": "pages/device/rank",
-      "style": {
-        "navigationBarTitleText": "排行榜"
-      }
-    },
+    
 	{
 		"path": "pages/regist/index",
 		"style": {
@@ -196,6 +124,89 @@
 		}
 	}
   ],
+  "subPackages": [
+      {
+        "root": "subpkg",
+        "pages": [
+			{
+			  "path": "device/index",
+			  "style": {
+			    "navigationBarTitleText": "设备列表"
+			  }
+			},
+         {
+           "path": "device/detail",
+           "style": {
+             "navigationBarTitleText": "详情",
+             "navigationStyle": "custom"
+           }
+         },
+		 {
+		   "path": "device/scan",
+		   "style": {
+		     "navigationBarTitleText": "绑定设备"
+		   }
+		 },
+         {
+           "path": "device/detail_6",
+           "style": {
+             "navigationBarTitleText": "详情",
+             "navigationStyle": "custom"
+           }
+         },
+         {
+           "path": "device/detail_new_5",
+           "style": {
+             "navigationBarTitleText": "详情",
+             "navigationStyle": "custom"
+           }
+         },
+         {
+           "path": "device/detail_new_20250528",
+           "style": {
+             "navigationBarTitleText": "详情",
+             "navigationStyle": "custom"
+           }
+         },
+         {
+           "path": "device/setting",
+           "style": {
+             "navigationBarTitleText": "设置"
+           }
+         },
+		 {
+		   "path": "device/alert",
+		   "style": {
+		     "navigationBarTitleText": "报警列表"
+		   }
+		 },
+		 {
+		   "path": "device/error",
+		   "style": {
+		     "navigationBarTitleText": "异常列表"
+		   }
+		 },
+		 {
+		   "path": "device/reset/reset",
+		   "style": {
+		     "navigationBarTitleText": "设备注销"
+		   }
+		 },
+		 {
+		   "path": "device/reset/resetrecord",
+		   "style": {
+		     "navigationBarTitleText": "注销记录"
+		   }
+		 },
+		 {
+		   "path": "device/rank",
+		   "style": {
+		     "navigationBarTitleText": "排行榜"
+		   }
+		 }
+        ]
+      }
+    ],
   "tabBar": {
     "color": "#000000",
     "selectedColor": "#000000",

+ 1 - 1
pages/index.vue

@@ -16,7 +16,7 @@ import { getToken, setToken, removeToken } from '@/utils/auth'
         let deptNum = opt.deptId;
         setToken(token)
         uni.reLaunch({
-          url: '/pages/device/index?deptId='+deptNum
+          url: '/subpkg/device/index?deptId='+deptNum
         });
       }
     }

+ 1 - 1
pages/user/index.vue

@@ -143,7 +143,7 @@
 			},
 			toDeviceList(item) {
 				uni.navigateTo({
-					url: '/pages/device/index?deptId=' + item.deptId
+					url: '/subpkg/device/index?deptId=' + item.deptId
 				});
 			},
 			//删除客户,并删除客户下的用户信息和解绑设备

+ 10 - 10
pages/work/index.vue

@@ -237,21 +237,21 @@ export default {
                 let type =device.type;
                 if(type == 23){
                   uni.navigateTo({
-                    url: '/pages/device/detail_new_20250528?id='+device.deviceId
+                    url: '/subpkg/device/detail_new_20250528?id='+device.deviceId
                   });
                   return;
                 }
                 if(type == 16 || type == 17 || type == 18 || type == 19){
                   uni.navigateTo({
-                    url: '/pages/device/detail_6?id='+device.deviceId
+                    url: '/subpkg/device/detail_6?id='+device.deviceId
                   });
                 }else if(type == 20 || type == 21 || type == 22){
                   uni.navigateTo({
-                    url: '/pages/device/detail_new_5?id='+device.deviceId
+                    url: '/subpkg/device/detail_new_5?id='+device.deviceId
                   });
                 }else{
                   uni.navigateTo({
-                    url: '/pages/device/detail?id='+device.deviceId
+                    url: '/subpkg/device/detail?id='+device.deviceId
                   });
                 }
 
@@ -294,7 +294,7 @@ export default {
         }
         if('device' == path){
           uni.navigateTo({
-            url: '/pages/device/index'
+            url: '/subpkg/device/index'
           });
         }
         if('wifi' == path){
@@ -304,7 +304,7 @@ export default {
         }
         if('scan' == path){
           uni.navigateTo({
-            url: '/pages/device/scan'
+            url: '/subpkg/device/scan'
           });
         }
         if('user' == path){
@@ -314,23 +314,23 @@ export default {
         }
         if('alert' == path){
           uni.navigateTo({
-            url: '/pages/device/alert'
+            url: '/subpkg/device/alert'
           });
         }
         if('error' == path){
           uni.navigateTo({
-            url: '/pages/device/error'
+            url: '/subpkg/device/error'
           });
         }
         if('reset' == path){
           uni.navigateTo({
-            url: '/pages/device/reset/reset'
+            url: '/subpkg/device/reset/reset'
           });
         }
 
         if('time' == path){
           uni.navigateTo({
-            url: '/pages/device/rank'
+            url: '/subpkg/device/rank'
           });
         }
 		if('reviews'==path){

pages/device/alert.vue → subpkg/device/alert.vue


+ 1 - 1
pages/device/detail.vue

@@ -3115,7 +3115,7 @@ export default {
     },
     goDeviceDetail(id){
       uni.navigateTo({
-        url: '/pages/device/detail/detail?id='+id
+        url: '/subpkg/device/detail/detail?id='+id
       });
     },
     async connectMqtt() {

+ 1 - 1
pages/device/detail_6.vue

@@ -3198,7 +3198,7 @@ export default {
     },
     goDeviceDetail(id){
       uni.navigateTo({
-        url: '/pages/device/detail/detail?id='+id
+        url: '/subpkg/device/detail/detail?id='+id
       });
     },
     async connectMqtt() {

+ 2 - 2
pages/device/detail_new_20250528.vue

@@ -3305,7 +3305,7 @@ export default {
     },
     showDrawer() {
       uni.navigateTo({
-        url: '/pages/device/setting?id='+this.id
+        url: '/subpkg/device/setting?id='+this.id
       });
       // this.$refs.showLeft.open();
     },
@@ -3925,7 +3925,7 @@ export default {
     },
     goDeviceDetail(id){
       uni.navigateTo({
-        url: '/pages/device/detail/detail?id='+id
+        url: '/subpkg/device/detail/detail?id='+id
       });
     },
     async connectMqtt() {

pages/device/detail_new_5.vue → subpkg/device/detail_new_5.vue


pages/device/error.vue → subpkg/device/error.vue


+ 4 - 4
pages/device/index.vue

@@ -84,21 +84,21 @@ export default {
       let type = item.type;
       if(type == 23){
         uni.navigateTo({
-          url: '/pages/device/detail_new_20250528?id='+item.deviceId
+          url: '/subpkg/device/detail_new_20250528?id='+item.deviceId
         });
         return;
       }
       if(type == 16 || type == 17 || type == 18 || type == 19){
         uni.navigateTo({
-          url: '/pages/device/detail_6?id='+item.deviceId
+          url: '/subpkg/device/detail_6?id='+item.deviceId
         });
       }else if(type == 20 || type == 21 || type == 22){
         uni.navigateTo({
-          url: '/pages/device/detail_new_5?id='+item.deviceId
+          url: '/subpkg/device/detail_new_5?id='+item.deviceId
         });
       }else{
         uni.navigateTo({
-          url: '/pages/device/detail?id='+item.deviceId
+          url: '/subpkg/device/detail?id='+item.deviceId
         });
       }
 

pages/device/rank.vue → subpkg/device/rank.vue


+ 1 - 2
pages/device/reset/reset.vue

@@ -2,8 +2,7 @@
   <view class="work-container">
     <view style="margin-top: 10px">
       <u-cell @click="resetUser"  title="扫码注销" :isLink="true" arrow-direction="left"></u-cell>
-      <u-cell  title="注销记录" :isLink="true" url="/pages/device/reset/resetrecord" arrow-direction="left"></u-cell>
-<!--      <u-cell  title="已注销列表" :isLink="true" url="/pages/device/index?deptId=-1" arrow-direction="left"></u-cell>-->
+      <u-cell  title="注销记录" :isLink="true" url="/subpkg/device/reset/resetrecord" arrow-direction="left"></u-cell>
 
     </view>
     <u-modal :show="show" :title="dlgTitle" @cancel="cancel" :showCancelButton="true" @confirm="bingDevice" >

pages/device/reset/resetrecord.vue → subpkg/device/reset/resetrecord.vue


pages/device/scan.vue → subpkg/device/scan.vue


pages/device/setting.vue → subpkg/device/setting.vue