Jelajahi Sumber

解决前端订单查询的bug

oyq28 2 tahun lalu
induk
melakukan
6c5dbd53e0

+ 4 - 4
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/ucenter/order/order.vue

@@ -202,7 +202,7 @@
 				let oType = page.split('type=')[1]
 				this.getOrderList(oType)
 			},
-			getDeviceList(equId) {
+			getDeviceList(equId, type) {
 				let that = this;
 				util.request(api.DeviceList, {}, 'post', 'application/json').then(function(res) {
 					if (res.code === 0) {
@@ -211,11 +211,11 @@
 						that.totalPages2 = res.pages
 						that.deviceList = that.deviceList.concat(res.data.records)
 					    if(equId){
-					    	that.deviceId = equId;
 					    	that.index2 = that.deviceList.findIndex(function(item){
 					    		return item.id === equId;
 					    	});
 					    }
+						that.getOrderList(type);
 					}
 				});
 			},
@@ -288,8 +288,8 @@
 		onLoad: function(option) {	
 			let type = option.type? option.type : ""
 			let equId = option.equId? option.equId : ""
-			this.getDeviceList(equId);
-			this.getOrderList(type);
+			this.getDeviceList(equId, type);
+			//this.getOrderList(type);
 		}
 	}
 </script>