分类页部分接口对接
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user