分类页部分接口对接

This commit is contained in:
”chenxuelian“
2022-12-26 21:27:22 +08:00
parent 3fd749fd2f
commit aef226d3ab
4 changed files with 221 additions and 203 deletions

View File

@@ -38,18 +38,28 @@
export default {
data() {
return {
productList: [{
cover: '/static/products/zhanwei_dg.png',
name: '锅巴',
tag: '无添加剂',
cate_name: '零食铺子',
title: '糯米蟹黄锅巴散装,非油炸绿色健康食品',
pub_time: '2022-12-04'
}, ]
queryParam: {
pageSize: 10,
pageNum: 1
},
queryTitle: null,
productList: []
}
},
onLoad(options) {
this.queryTitle = options.title
this.goSearch()
},
methods: {
goSearch() {
const data = {
...this.queryParam,
title: this.queryTitle
}
this.$apiServe.getProductList(data).then(res => {
this.productList = res.data.data
}).finally(_ => {})
}
}
}
</script>