优化商品搜索 空数据显示
parent
f90807ebc6
commit
3aa5b21d49
|
@ -129,18 +129,6 @@
|
|||
<uni-load-more :status="loadingType" @loadmore="loadmore()"></uni-load-more>
|
||||
</scroll-view>
|
||||
</div>
|
||||
<div class="empty" v-if="goodsList == [] || goodsList == '' || goodsList == null">
|
||||
<view>
|
||||
<image style="width: 320rpx; height: 240rpx" src="/static/nodata.png">
|
||||
|
||||
</image>
|
||||
</view>
|
||||
<view>
|
||||
<p>没有找到相关的商品信息</p>
|
||||
<p>请换一个关键词试试吧</p>
|
||||
</view>
|
||||
</div>
|
||||
|
||||
<!-- 一行两个商品展示 -->
|
||||
<div v-if="
|
||||
!isSWitch &&
|
||||
|
@ -272,6 +260,17 @@
|
|||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<div class="empty" v-if="empty">
|
||||
<view>
|
||||
<image style="width: 320rpx; height: 240rpx" src="/static/nodata.png">
|
||||
|
||||
</image>
|
||||
</view>
|
||||
<view>
|
||||
<p>没有找到相关的商品信息</p>
|
||||
<p>请换一个关键词试试吧</p>
|
||||
</view>
|
||||
</div>
|
||||
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -285,6 +284,7 @@ import storage from "@/utils/storage";
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
empty:false,
|
||||
scrollTop: 0,
|
||||
loadIndex: 10,
|
||||
oldKeywordIndex: "",
|
||||
|
@ -714,6 +714,9 @@ export default {
|
|||
|
||||
if (goodsList.data.result.content.length < 10) {
|
||||
this.loadingType = "noMore";
|
||||
this.empty = true
|
||||
} else {
|
||||
this.empty = false
|
||||
}
|
||||
this.goodsList.push(...goodsList.data.result.content);
|
||||
this.initSortGoods();
|
||||
|
|
Loading…
Reference in New Issue