fanfan 5 months ago
parent afe344afb2
commit ff7604a3d6
  1. 34
      pages/goods/list.vue
  2. 2
      pages/merchantTutorial/tutorial.vue
  3. 2
      pages/shopList/shopPage.vue

@ -263,7 +263,7 @@
options: {}, //
list: [], //
// list: getEmptyPaginateObj(), //
isFirstLoad: true, //
//
upOption: {
//
@ -314,11 +314,14 @@
//
this.setWxofficialShareData()
if (options.categoryId != 'undefined') {
this.upOption.auto = false
this.isFirstLoad = false;
this.getGoodsTypeList(options.categoryId)
} else {
this.upOption.auto = true
this.isFirstLoad = true;
this.mescroll.resetUpScroll()
}
},
methods: {
@ -344,6 +347,7 @@
that.isBanrdActive = 0
that.list = [];
if (this.options.categoryId) {
this.list.data = []
that.onChage(that.tabbar[0], 1, 0)
} else {
// this.$refs.uWaterfall1.clear();
@ -400,14 +404,18 @@
*/
upCallback(page) {
const app = this
//
app.getGoodsList(page.num)
.then(list => {
const curPageLen = list.data.length
const totalSize = list.data.total
app.mescroll.endBySize(curPageLen, totalSize)
})
.catch(() => app.mescroll.endErr())
if (app.isFirstLoad) {
//
app.getGoodsList(page.num)
.then(list => {
const curPageLen = list.data.length
const totalSize = list.data.total
app.mescroll.endBySize(curPageLen, totalSize)
})
.catch(() => app.mescroll.endErr())
} else {
app.isFirstLoad = true
}
},
//
@ -449,23 +457,17 @@
keyword: app.options.search || '',
// goods_source: this.multiIndex > -1 ? this.multiArray[this.multiIndex].value : ''
}
console.log(param)
return new Promise((resolve, reject) => {
GoodsApi.list(param)
.then(result => {
selectorQuery.selectAll('.head').boundingClientRect((rects) => {
console.log("rects", rects)
app.blheight = rects[0].height
}).exec();
//
console.log(app.list)
const newList = result.data.list
console.log(newList)
let arr = getMoreListData(newList, app.list, pageNo);
// app.list.data = app.arrayUnique(arr, 'goods_id')
app.list.data = arr;
app.total = result.data.list.total;
console.log(newList)
resolve(newList)
})
.catch(reject)

@ -66,7 +66,7 @@
loadText: {
loadmore: '上拉加载更多',
loading: '正在加载',
nomore: '没有更多了 '
nomore: '亲,没有更多了 '
}
}
},

@ -582,7 +582,7 @@
transform: translateY(-50%);
left: 0;
width: 4rpx;
height: calc(100% - 60rpx);
height: calc(100% - 40rpx);
background: #F34A40;
}
}

Loading…
Cancel
Save