|
|
|
@ -3,7 +3,7 @@ |
|
|
|
|
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" |
|
|
|
|
:down="{ native: true,auto: true, use: true}" @down="downCallback" :up="upOption" @up="upCallback"> |
|
|
|
|
<!-- 页面头部 --> |
|
|
|
|
<view class="head"> |
|
|
|
|
<view class="head" ref="head"> |
|
|
|
|
<view class="header"> |
|
|
|
|
<view class="search"> |
|
|
|
|
<search :tips="options.search ? options.search : '搜索商品'" @event="handleSearch" /> |
|
|
|
@ -467,14 +467,26 @@ |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
GoodsApi.list(param) |
|
|
|
|
.then(result => { |
|
|
|
|
selectorQuery.selectAll('.head').boundingClientRect((rects) => { |
|
|
|
|
app.blheight = rects[0].height |
|
|
|
|
}).exec(); |
|
|
|
|
const newList = result.data.list |
|
|
|
|
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(result); |
|
|
|
|
try{ |
|
|
|
|
// #ifdef H5 |
|
|
|
|
console.log(this.$refs.head.$el.offsetHeight); |
|
|
|
|
app.blheight = this.$refs.head.$el.offsetHeight; |
|
|
|
|
// #endif |
|
|
|
|
// #ifndef H5 |
|
|
|
|
selectorQuery.selectAll('.head').boundingClientRect((rects) => { |
|
|
|
|
app.blheight = rects[0].height |
|
|
|
|
}).exec(); |
|
|
|
|
// #endif |
|
|
|
|
const newList = result.data.list |
|
|
|
|
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; |
|
|
|
|
}catch(e){ |
|
|
|
|
console.log(e); |
|
|
|
|
//TODO handle the exception |
|
|
|
|
} |
|
|
|
|
resolve(newList) |
|
|
|
|
}) |
|
|
|
|
.catch(reject) |
|
|
|
|