邓洁 : 修改小程序bug
This commit is contained in:
@@ -45,6 +45,9 @@
|
||||
pageSize: 4, // 每页条数
|
||||
}
|
||||
},
|
||||
props: {
|
||||
reportPageSize: String
|
||||
},
|
||||
created() {
|
||||
// uni.$on("getCurrent", data => {
|
||||
// if (data == 0) {
|
||||
@@ -54,18 +57,24 @@
|
||||
// }
|
||||
// })
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
if (this.reportPageSize == 6) {
|
||||
this.pageSize = this.reportPageSize
|
||||
}
|
||||
this.getProductsByThumb()
|
||||
},
|
||||
methods: {
|
||||
//获取按点赞量排列的产品列表
|
||||
getProductsByThumb() {
|
||||
this.$apiServe.getProducts({
|
||||
sortType: 2,
|
||||
this.$apiServe.getProductList({
|
||||
cateId: 0,
|
||||
tagIds: 0,
|
||||
sortType: 1,
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum
|
||||
}).then(res => {
|
||||
console.log('产品列表2', res.data);
|
||||
|
||||
let tags = res.data.data
|
||||
console.log('企业需求列表', tags);
|
||||
for (const item of tags) {
|
||||
let tag = item.tags
|
||||
this.tagsArray = tag.split(',')
|
||||
@@ -76,16 +85,8 @@
|
||||
this.productList = [...this.productList, ...res.data.data]
|
||||
//这用于上架时间和点赞量的数据切换
|
||||
// this.productList = res.data.data
|
||||
}).finally(_ => {
|
||||
|
||||
})
|
||||
},
|
||||
//点击图片跳转到详情页
|
||||
toDetailPage(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/detail/productsDetail/productsDetail?id=' + item.id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user