|
@@ -70,7 +70,10 @@
|
|
|
//如果希望先请求其他接口,再触发upCallback,可参考以下写法
|
|
|
if(!this.hasTypeId){
|
|
|
this.$u.api.shopGoodsType().then(res=>{
|
|
|
- this.tabsList = res.data.rows;
|
|
|
+ // this.tabsList = res.data;
|
|
|
+ this.tabsList = res.data.map(item=>{
|
|
|
+ return {name:item.dictLabel,id:item.dictValue}
|
|
|
+ });
|
|
|
this.hasTypeId = true
|
|
|
this.mescroll.resetUpScroll() // 重新触发upCallback
|
|
|
}).catch(()=>{
|
|
@@ -120,14 +123,18 @@
|
|
|
reloadList() {
|
|
|
this.mescroll.resetUpScroll();
|
|
|
},
|
|
|
- shopGoodsType(){
|
|
|
- this.$u.api.shopGoodsType().then(res=>{
|
|
|
- this.tabsList = res.data.rows;
|
|
|
- // console.log('shopGoodsType',res);
|
|
|
- }).catch(err=>{
|
|
|
- // console.log('err11111',err);
|
|
|
- })
|
|
|
- },
|
|
|
+ // shopGoodsType(){
|
|
|
+ // this.$u.api.shopGoodsType().then(res=>{
|
|
|
+ // console.log('shopGoodsType',res.data);
|
|
|
+ // this.tabsList = res.data.map(item=>{
|
|
|
+ // return {name:item.dictLabel,id:item.dictValue}
|
|
|
+ // });
|
|
|
+ // console.log('shopGoodsType',res.data);
|
|
|
+ // console.log('tabsList',this.tabsList);
|
|
|
+ // }).catch(err=>{
|
|
|
+ // // console.log('err11111',err);
|
|
|
+ // })
|
|
|
+ // },
|
|
|
tabsClick(item){
|
|
|
this.activeIndex = item.index;
|
|
|
this.reloadList()
|