瀏覽代碼

bug 修复

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

+ 6 - 0
pages/batchShelves/cartList.vue

@@ -271,9 +271,15 @@
 				  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)
 					}
+					this.placeTab.sort(function(a,b){ return (a+'').localeCompare(b+'');});
+					console.log(this.placeTab)
+					
+					
 					if(!this.curTab){
 					  this.curTab = this.placeTab[0]
 					}else{

+ 4 - 0
pages/shelfSetting/shelfSet.vue

@@ -293,9 +293,13 @@
 				  uni.hideLoading()
 				  if (res.status == 200 && res.data) {
 				    this.shelfPlaceList = res.data
+					// 获取层
 					for(let a in res.data){
 						this.placeTab.push(a)
 					}
+					// 排序
+					this.placeTab.sort(function(a,b){ return (a+'').localeCompare(b+'');});
+					console.log(this.placeTab)
 					if(!flag || !this.curTab){
 						this.curTab = this.placeTab[0]
 					}