|
@@ -121,13 +121,13 @@
|
|
|
onPageScroll(e) {
|
|
|
this.scrollTop = e.scrollTop;
|
|
|
},
|
|
|
- onReachBottom() { //上拉触底函数
|
|
|
- if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
|
- this.isLoadMore = true
|
|
|
- this.pages += 1
|
|
|
- this.getIndexSaleData()
|
|
|
- }
|
|
|
- },
|
|
|
+ // onReachBottom() { //上拉触底函数
|
|
|
+ // if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
|
+ // this.isLoadMore = true
|
|
|
+ // this.pages += 1
|
|
|
+ // this.getIndexSaleData()
|
|
|
+ // }
|
|
|
+ // },
|
|
|
onPullDownRefresh() {
|
|
|
this.pages = 1
|
|
|
this.isLoadMore = false
|
|
@@ -229,45 +229,7 @@
|
|
|
})
|
|
|
},
|
|
|
getIndexSaleData() {
|
|
|
- // const that = this
|
|
|
- // var pages = that.pages
|
|
|
- // var limit = that.limit
|
|
|
- // uni.showLoading({
|
|
|
- // title: '正在加载'
|
|
|
- // })
|
|
|
- // that.$api.request('integral', 'getIndexSaleData', {
|
|
|
- // page: pages,
|
|
|
- // limit: limit
|
|
|
- // }, failres => {
|
|
|
- // that.$api.msg(failres.errmsg)
|
|
|
- // that.isLoadMore = false
|
|
|
- // that.loadStatus = 'nomore'
|
|
|
- // if (that.pages > 1) {
|
|
|
- // that.pages -= 1
|
|
|
- // }
|
|
|
- // uni.hideLoading()
|
|
|
- // }).then(res => {
|
|
|
- // let data = res.data
|
|
|
- // //销售信息
|
|
|
- // if (data.saleInfo.length > 0 ) {
|
|
|
- // that.saleInfo = that.saleInfo.concat(data.saleInfo)
|
|
|
- // that.isLoadMore = false
|
|
|
- // } else {
|
|
|
- // if (that.pages > 1) {
|
|
|
- // that.pages -= 1
|
|
|
- // }
|
|
|
- // that.isLoadMore = true
|
|
|
- // that.loadStatus = 'nomore'
|
|
|
- // }
|
|
|
- // if(data.saleInfo.length < that.limit){
|
|
|
- // if (that.pages > 1) {
|
|
|
- // that.pages -= 1
|
|
|
- // }
|
|
|
- // that.isLoadMore = true
|
|
|
- // that.loadStatus = 'nomore'
|
|
|
- // }
|
|
|
- // uni.hideLoading()
|
|
|
- // })
|
|
|
+
|
|
|
const that = this
|
|
|
var pages=that.pages
|
|
|
var limit=that.limit
|
|
@@ -276,7 +238,7 @@
|
|
|
title: '正在加载',
|
|
|
mask:true
|
|
|
})
|
|
|
- that.$api.request('news', 'getNewsInfo', {
|
|
|
+ that.$api.request('news', 'getFactoryPriceInfo', {
|
|
|
category:this.category,
|
|
|
page: pages,
|
|
|
limit:limit
|