|
@@ -47,7 +47,8 @@
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
goodsListLength() {
|
|
goodsListLength() {
|
|
- return this.goodsList.length
|
|
|
|
|
|
+ let len = this.goodsList.length
|
|
|
|
+ return len
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
@@ -63,6 +64,7 @@
|
|
// 下拉刷新
|
|
// 下拉刷新
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
console.log('refresh')
|
|
console.log('refresh')
|
|
|
|
+ this.noDataText = '正在加载...'
|
|
this.pageInit()
|
|
this.pageInit()
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
uni.stopPullDownRefresh()
|
|
uni.stopPullDownRefresh()
|
|
@@ -85,6 +87,25 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 查询商品
|
|
|
|
+ getGoods(item,index){
|
|
|
|
+ getGoodsList({
|
|
|
|
+ pageNo:1,
|
|
|
|
+ pageSize:item.popularizeGoodsLimit,
|
|
|
|
+ goodsTypeNo:item.goodsTypeNo,
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log(res,'goodsList')
|
|
|
|
+ if(res.status == 200&&res.data.list&&res.data.list.length){
|
|
|
|
+ this.goodsList[index] = {
|
|
|
|
+ type: item,
|
|
|
|
+ list: res.data.list
|
|
|
|
+ }
|
|
|
|
+ this.goodsList.splice()
|
|
|
|
+ }else{
|
|
|
|
+ this.noDataText = '暂无商品'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 点击banner
|
|
// 点击banner
|
|
clickBanner(index){
|
|
clickBanner(index){
|
|
let row = this.imageTopList[index]
|
|
let row = this.imageTopList[index]
|
|
@@ -116,19 +137,6 @@
|
|
url:"/pages/goods/goods?goodsTypeNo="+ item.goodsTypeNo + "&goldLimit="+ item.goldLimit + "&name=" + item.name
|
|
url:"/pages/goods/goods?goodsTypeNo="+ item.goodsTypeNo + "&goldLimit="+ item.goldLimit + "&name=" + item.name
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 查询商品
|
|
|
|
- getGoods(item,index){
|
|
|
|
- getGoodsList({pageNo:1,pageSize:item.popularizeGoodsLimit,goodsTypeNo:item.goodsTypeNo}).then(res => {
|
|
|
|
- console.log(res,'goodsList')
|
|
|
|
- if(res.status == 200&&res.data.list&&res.data.list.length){
|
|
|
|
- this.goodsList[index] = {
|
|
|
|
- type: item,
|
|
|
|
- list: res.data.list
|
|
|
|
- }
|
|
|
|
- this.goodsList.splice()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|