罗世杰修改ShopList和SearchList的api

This commit is contained in:
LuoShijie
2023-11-18 18:07:01 +08:00
parent f3cec1461e
commit fbb6b00cba
7 changed files with 78 additions and 93 deletions

View File

@@ -19,12 +19,18 @@
* @property {Number} showStyle 展示商铺的样式类型(0为首页默认)
* @property {Boolean} isADshow 是否显示推广广告
* @property {Boolean} isEdit 是否显示编辑和删除
* @property {String} adlinkPath 推广广告跳转链接
* @property {Number} listType 获取列表类型传递参数部分
* @property {Object} customQuery 自定义查询参数
*/
export default {
name:"ShowShopList",
data() {
return {
pageSize: 5,
pageNum: 1,
shopInfoList: []
};
},
props: {
@@ -52,32 +58,22 @@
return false
}
},
//获取列表类型传递参数部分
// //获取列表类型传递参数部分
listType:{
type: Number,
default() {
return 1
}
},
pageSize: {
type: Number,
customQuery:{
type: Object,
default() {
return 5
return {}
}
},
pageNum: {
type: Number,
default() {
return 1
}
},
}
},
data() {
return {
shopInfoList: []
}
},
methods: {
handleDel(shopid){
console.log("删除了商铺", shopid);
@@ -90,15 +86,15 @@
const query = this.$u.queryParams({
type: this.listType,
pageSize: this.pageSize,
pageNum: this.pageNum
pageNum: this.pageNum,
...this.customQuery
})
console.log("query",query);
this.$api.getShopList(query).then(res => {
console.log("shoplist",res.data.data);
this.shopInfoList = res.data.data
this.shopInfoList.forEach(item=>{
item.pics =this.$api.imgUrl + item.pics
});
console.log("shoplist",res.data.data);
})
}