|
|
@@ -40,7 +40,7 @@ export default {
|
|
|
return {
|
|
|
classData:[],
|
|
|
categoryId: '',
|
|
|
- totalItemData:[],
|
|
|
+ allItemInfo:[],
|
|
|
itemInfoList:[],
|
|
|
currentJobType:'bill',
|
|
|
currentJobId:0
|
|
|
@@ -92,15 +92,12 @@ export default {
|
|
|
let { data } = await showClass()
|
|
|
this.classData = data
|
|
|
this.categoryId = this.classData[0].id
|
|
|
- this.getShowList()
|
|
|
+ let { data:{list} } = await showList()
|
|
|
+ this.allItemInfo = list
|
|
|
+ this.showCatItem()
|
|
|
},
|
|
|
- async getShowList(){
|
|
|
- let { data:{list} } = await showList({})
|
|
|
- this.totalItemData = list
|
|
|
- this.updateCurrentShop()
|
|
|
- },
|
|
|
- updateCurrentShop(){
|
|
|
- this.itemInfoList = this.totalItemData[this.categoryId]
|
|
|
+ showCatItem(){
|
|
|
+ this.itemInfoList = this.allItemInfo[this.categoryId]
|
|
|
},
|
|
|
changeCategory(item){
|
|
|
this.$util.hitRemind()
|
|
|
@@ -108,7 +105,7 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
this.categoryId = item.id
|
|
|
- this.updateCurrentShop()
|
|
|
+ this.showCatItem()
|
|
|
}
|
|
|
}
|
|
|
}
|