Browse Source

小程序调整代码结构

zhengkaixin 2 years ago
parent
commit
2f55097d4e

+ 1 - 1
App.vue

@@ -6,7 +6,7 @@
 <script>
 <script>
 	
 	
 	import './config/.env.js'
 	import './config/.env.js'
-	import './assets/js/font.js'
+	//import './assets/js/font.js'
 	export default {
 	export default {
 		onLaunch: function() {
 		onLaunch: function() {
 			console.log('App Launch')
 			console.log('App Launch')

+ 13 - 60
main.js

@@ -3,78 +3,31 @@ import Vue from 'vue'
 import getOpenId from './apis/utils/init.js'
 import getOpenId from './apis/utils/init.js'
 import getALIOpenId from './apis/utils/initALI.js'
 import getALIOpenId from './apis/utils/initALI.js'
 import './assets/font/font.css'
 import './assets/font/font.css'
-var IS_WEIXIN = /MicroMessenger/.test(window.navigator.userAgent)
-var IS_ALI = /AlipayClient/.test(window.navigator.userAgent)
+// var IS_WEIXIN = /MicroMessenger/.test(window.navigator.userAgent)
+// var IS_ALI = /AlipayClient/.test(window.navigator.userAgent)
 
 
-if (IS_ALI) {
+// if (IS_ALI) {
 
 
-	getALIOpenId.init()
-} else {
-	getOpenId.init()
-}
+// 	getALIOpenId.init()
+// } else {
+	
+// }
+getOpenId.init()
 
 
 import mixin from './apis/utils/mixin.js'
 import mixin from './apis/utils/mixin.js'
 
 
 Vue.prototype.carhelp = mixin
 Vue.prototype.carhelp = mixin
 
 
-import Vconsole from 'vconsole'
+//import Vconsole from 'vconsole'
 //import uView from "uview-ui";
 //import uView from "uview-ui";
-import uView from '@/uni_modules/uview-ui'
+ import uView from '@/uni_modules/uview-ui'
 
 
-Vue.use(uView);
+ Vue.use(uView);
 
 
 
 
 Vue.mixin({
 Vue.mixin({
 	updated: function() {
 	updated: function() {
-		this.$nextTick(function() {
-
-			var g = '';
-			var aaa = this.carhelp.get("getElderModeClass");
-			if (aaa == "长辈模式") {
-				g = true;
-			} else {
-				g = false;
-			}
-
-			var body = document.getElementsByTagName('uni-page-body')[0].childNodes;
-
-
-
-			classold(g, body);
-
-
-			function classold(g, list) {
-
-				for (var i = 0; i < list.length; i++) {
-					try {
-						var myclass = list[i].getAttribute("class");
-
-						if (myclass) {
-							myclass = myclass.trim().replace("oldTextClassF", "");
-
-						} else {
-							myclass = ""
-						}
-
-						if (g) {
-							myclass = myclass.trim()
-							myclass = " oldTextClassF " + myclass;
-						} else {
-
-						}
-						list[i].setAttribute("class", myclass);
-
-					} catch (e) {
-						console.log("---error--classold--")
-						console.log(list[i])
-					}
-
-
-				}
-			}
-
-
-		})
+		
 	},
 	},
 	onReady() {
 	onReady() {
 
 
@@ -82,7 +35,7 @@ Vue.mixin({
 	},
 	},
 	onLoad(option) {
 	onLoad(option) {
 		if (option.test == 'test') {
 		if (option.test == 'test') {
-			let vConsole = new Vconsole()
+			//let vConsole = new Vconsole()
 		}
 		}
 
 
 	},
 	},

+ 1 - 1
manifest.json

@@ -59,7 +59,7 @@
     "quickapp" : {},
     "quickapp" : {},
     /* 小程序特有相关 */
     /* 小程序特有相关 */
     "mp-weixin" : {
     "mp-weixin" : {
-        "appid" : "",
+        "appid" : "wxccd5542007b7d8ea",
         "setting" : {
         "setting" : {
             "urlCheck" : false
             "urlCheck" : false
         },
         },

+ 20 - 25
package.json

@@ -1,27 +1,24 @@
 {
 {
-
 	"dependencies": {
 	"dependencies": {
 		"compression-webpack-plugin": "^8.0.1",
 		"compression-webpack-plugin": "^8.0.1",
 		"echarts": "^5.3.2",
 		"echarts": "^5.3.2",
 		"hls.js": "^0.14.11",
 		"hls.js": "^0.14.11",
-		"uview-ui": "^1.8.4",
-		"vconsole": "^3.4.0",
+	
+		"vue-cli": "^2.9.6",
 		"vue-cropper": "^0.5.6",
 		"vue-cropper": "^0.5.6",
-		"weixin-js-sdk": "^1.6.0",
-		"vue-cli": "^2.9.6",
-		"vue-cropper": "^0.5.6",
-		"vuex": "^3.6.2"
-	},
-	"devDependencies": {
-	 "@vue/cli-plugin-babel": "^4.0.0",
-	 "@vue/cli-plugin-eslint": "^4.0.0",
-	 "@vue/cli-service": "^4.0.0",
-	 "babel-eslint": "^10.0.3",
-	 "eslint": "^5.16.0",
-	 "eslint-plugin-vue": "^5.0.0",
-	 "node-sass": "^5.0.0",
-	 "sass-loader": "^11.0.1",
-	 "vue-template-compiler": "^2.6.10"
+		"vuex": "^3.6.2",
+		"weixin-js-sdk": "^1.6.0"
+	},
+	"devDependencies": {
+		"@vue/cli-plugin-babel": "^4.0.0",
+		"@vue/cli-plugin-eslint": "^4.0.0",
+		"@vue/cli-service": "^4.0.0",
+		"babel-eslint": "^10.0.3",
+		"eslint": "^5.16.0",
+		"eslint-plugin-vue": "^5.0.0",
+		"node-sass": "^5.0.0",
+		"sass-loader": "^11.0.1",
+		"vue-template-compiler": "^2.6.10"
 	},
 	},
 	"uni-app": {
 	"uni-app": {
 		"scripts": {
 		"scripts": {
@@ -33,7 +30,7 @@
 					"NODE_NAME": "test"
 					"NODE_NAME": "test"
 				},
 				},
 				"define": {
 				"define": {
-					"CUSTOM-CONST": true,
+					"CUSTOM-CONST": true,
 					"NODE_NAME_T": "test"
 					"NODE_NAME_T": "test"
 				}
 				}
 			},
 			},
@@ -42,15 +39,13 @@
 				"BROWSER": "Chrome",
 				"BROWSER": "Chrome",
 				"env": {
 				"env": {
 					"UNI_PLATFORM": "h5",
 					"UNI_PLATFORM": "h5",
-					"NODE_NAME": "production"
-					
+					"NODE_NAME": "production"
 				},
 				},
 				"define": {
 				"define": {
-					"CUSTOM-CONST": true,
-					"NODE_NAME_T": "production"
-					
+					"CUSTOM-CONST": true,
+					"NODE_NAME_T": "production"
 				}
 				}
 			}
 			}
 		}
 		}
 	}
 	}
-}
+}

+ 240 - 277
pages.json

@@ -1,289 +1,252 @@
 {
 {
-
+	
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
-		{
-			"path": "pages/index/index",
-			"style": {
-			}
-		},
-		{
-			"path": "pages/index/homePage",
-			"style": {
-			}
+		{
+			"path": "pages/index/index",
+			"style": {}
 		}
 		}
-     
-        ,{
-            "path" : "pages/storeManagement/equipmentDelivery/equipmentDelivery",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/storeManagement/equipmentDelivery/deliveryDetails",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/storeManagement/equipmentDelivery/deliveryList",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/storeManagement/equipmentDelivery/deliveriedList",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/storeManagement/equipmentEnter/equipmentEnter",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/storeManagement/equipmentEnter/verification",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/storeManagement/equipmentEnter/returnList",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/storeManagement/equipmentEnter/deliveryDetails",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/storeManagement/equipmentInspection/equipmentInspection",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/storeManagement/equipmentInspection/planDetail",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/storeManagement/equipmentInspection/inspectionRecord",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/index/equipmentRetrieval/equipmentRetrieval",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/index/equipmentRetrieval/equipmentDetail",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-		,{
-		    "path" : "pages/index/equipmentRetrieval/equipmentInfo",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
+
+		, {
+			"path": "pages/index/login",
+			"style": {
+				//navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
 		}
 		}
-        ,{
-            "path" : "pages/otherFunctions/messageCenter/messageCenter",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/otherFunctions/messageCenter/messageList",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/index/login",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-       
-        ,{
-            "path" : "pages/projectDepartment/exportApplication/exportApplication",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-
-        }
-		,{
-		    "path" : "pages/projectDepartment/branch/exportApplication/exportApplication",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-		,{
-		    "path" : "pages/projectDepartment/branch/exportApplication/deliveriedList",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-		,{
-		    "path" : "pages/projectDepartment/branch/exportApplication/deliveryFrom",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		},
-		{
-		    "path" : "pages/projectDepartment/branch/exportApplication/deliveryDetails",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		},
-		{
-		    "path" : "pages/projectDepartment/branch/exportProcess/deliveryDetails",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		},
-		{
-		    "path" : "pages/projectDepartment/branch/exportProcess/deliveryInfo",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		},
-		{
-		    "path" : "pages/projectDepartment/branch/exportProcess/exportProcess",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		},
-		{
-		    "path" : "pages/projectDepartment/branch/exportReturn/exportReturn",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		},
-		{
-		    "path" : "pages/projectDepartment/branch/exportReturn/deliveryDetails",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		},
-		{
-		    "path" : "pages/projectDepartment/branch/exportReturn/deliveryFrom",
-		    "style" :                                                                                    
-		    {
-		        //navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
+
+
+
+	],
+	"subPackages": [{
+			"root": "pages/projectDepartment",
+			"pages": [{
+					"path": "exportApplication/exportApplication",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+
+				}, {
+					"path": "branch/exportApplication/exportApplication",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				}, {
+					"path": "branch/exportApplication/deliveriedList",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				}, {
+					"path": "branch/exportApplication/deliveryFrom",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				},
+				{
+					"path": "branch/exportApplication/deliveryDetails",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				},
+				{
+					"path": "branch/exportProcess/deliveryDetails",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				},
+				{
+					"path": "branch/exportProcess/deliveryInfo",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				},
+				{
+					"path": "branch/exportProcess/exportProcess",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				},
+				{
+					"path": "branch/exportReturn/exportReturn",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				},
+				{
+					"path": "branch/exportReturn/deliveryDetails",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				},
+				{
+					"path": "branch/exportReturn/deliveryFrom",
+					"style": {
+						//navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				}
+
+				, {
+					"path": "exportApplication/application",
+					"style": {
+						// "navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+
+				}
+			]
+		},
+		{
+			"root": "pages/otherFunctions",
+			"pages": [{
+				"path": "messageCenter/messageCenter",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "messageCenter/messageList",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			},
+		{
+			"path": "homePage",
+			"style": {}
+		},{
+			"path": "equipmentRetrieval/equipmentRetrieval",
+			"style": {
+				//navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "equipmentRetrieval/equipmentDetail",
+			"style": {
+				//navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "equipmentRetrieval/equipmentInfo",
+			"style": {
+				//navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}]
+		},
+		{
+			"root": "pages/storeManagement",
+			"pages": [{
+				"path": "equipmentDelivery/equipmentDelivery",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "equipmentDelivery/deliveryDetails",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "equipmentDelivery/deliveryList",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "equipmentDelivery/deliveriedList",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "equipmentEnter/equipmentEnter",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "equipmentEnter/verification",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "equipmentEnter/returnList",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "equipmentEnter/deliveryDetails",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "equipmentInspection/equipmentInspection",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "equipmentInspection/planDetail",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "equipmentInspection/inspectionRecord",
+				"style": {
+					//navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}]
 		}
 		}
+	],
 
 
-        ,{
-            "path" : "pages/projectDepartment/exportApplication/application",
-            "style" :                                                                                    
-            {
-               // "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-
-    ],
-
-	
 	"globalStyle": {
 	"globalStyle": {
 		"navigationStyle": "custom", // 隐藏系统导航栏
 		"navigationStyle": "custom", // 隐藏系统导航栏
 		"navigationBarTitleText": "荆力设备管理",
 		"navigationBarTitleText": "荆力设备管理",
 		"enablePullDownRefresh": false
 		"enablePullDownRefresh": false
 	},
 	},
 	"uniIdRouter": {}
 	"uniIdRouter": {}
-}
+}

+ 0 - 0
pages/index/equipmentRetrieval/equipmentDetail.vue → pages/otherFunctions/equipmentRetrieval/equipmentDetail.vue


+ 0 - 0
pages/index/equipmentRetrieval/equipmentInfo.vue → pages/otherFunctions/equipmentRetrieval/equipmentInfo.vue


+ 0 - 0
pages/index/equipmentRetrieval/equipmentRetrieval.vue → pages/otherFunctions/equipmentRetrieval/equipmentRetrieval.vue


+ 0 - 0
pages/index/homePage.vue → pages/otherFunctions/homePage.vue


+ 4 - 3
pages/projectDepartment/branch/exportApplication/deliveryFrom.vue

@@ -152,7 +152,8 @@
 
 
 		</view>
 		</view>
 	 </view>
 	 </view>
-	 <u-popup-sync v-model="showpopup"  mode="bottom" 
+	 <!-- -sync -sync -->
+	 <u-popup  v-model="showpopup"  mode="bottom" 
 	 border-radius="14"
 	 border-radius="14"
 	 :closeable="true"  >
 	 :closeable="true"  >
 	 			<view class="showpopup">添加设备</view>
 	 			<view class="showpopup">添加设备</view>
@@ -177,7 +178,7 @@
 				<equipmentRetrieval  @ckItem="ckItem" :list="list"
 				<equipmentRetrieval  @ckItem="ckItem" :list="list"
 				 ref="equipmentRetrievalRef" :iscomponents="1"></equipmentRetrieval>
 				 ref="equipmentRetrievalRef" :iscomponents="1"></equipmentRetrieval>
 				</scroll-view>
 				</scroll-view>
-	 		</u-popup-sync>
+	 		</u-popup>
 	<!-- 确认出库 -->
 	<!-- 确认出库 -->
 	<view class="bottom" @click="submit()" >
 	<view class="bottom" @click="submit()" >
 		<button>提交出库单</button>
 		<button>提交出库单</button>
@@ -186,7 +187,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-	import equipmentRetrieval from "@/pages/index/equipmentRetrieval/equipmentRetrieval"
+	import equipmentRetrieval from "@/pages/otherFunctions/equipmentRetrieval/equipmentRetrieval"
 	import * as API from '@/apis/pagejs/projectDepartment.js'
 	import * as API from '@/apis/pagejs/projectDepartment.js'
 	
 	
 	export default {
 	export default {