lilei 2 年之前
父節點
當前提交
e188ce21f3
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      pages/batchShelves/cartList.vue

+ 2 - 4
pages/batchShelves/cartList.vue

@@ -259,10 +259,10 @@
 				this.loading = true
 				queryMapList({ shelfSn: this.shelfSn }).then(res => {
 				  console.log(res.data)
+				  uni.hideLoading()
 				  this.loading = false
 				  if (res.status == 200 && res.data) {
 				    this.shelfPlaceList = JSON.stringify(res.data) == '{}' ? null : res.data
-					
 					// 获取层
 					for(let a in res.data){
 						this.placeTab.push(a)
@@ -270,8 +270,7 @@
 					this.placeTab.sort(function(a,b){ return (a+'').localeCompare(b+'');});
 					console.log(this.placeTab)
 					
-					
-					if(!this.curTab){
+					if(!this.curTab&&this.placeTab.length){
 					  this.curTab = this.placeTab[0]
 					}else{
 						if(!this.shelfPlaceList[this.curTab]){
@@ -287,7 +286,6 @@
 					this.placeTab = []
 					this.curTab = ''
 				  }
-				  uni.hideLoading()
 				})
 			},
 			// 获取统计数据