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