|
|
@@ -12,7 +12,8 @@
|
|
|
<view class="input-icon s-left">
|
|
|
<uni-icons type="search" size="22" color="#999"></uni-icons>
|
|
|
</view>
|
|
|
- <input v-model="search" type="text" @confirm='searchClick' confirm-type="search" placeholder="请输入商家或者商品名称">
|
|
|
+ <input v-model="search" type="text" @confirm='searchClick' confirm-type="search"
|
|
|
+ placeholder="请输入商家或者商品名称">
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -25,7 +26,8 @@
|
|
|
<view class="input-icon">
|
|
|
<uni-icons type="search" size="22" color="#999"></uni-icons>
|
|
|
</view>
|
|
|
- <input v-model="search" type="text" @confirm='searchClick' confirm-type="search" placeholder="请输入商家或者商品名称">
|
|
|
+ <input v-model="search" type="text" @confirm='searchClick' confirm-type="search"
|
|
|
+ placeholder="请输入商家或者商品名称">
|
|
|
<view class="fs-28 fc-f index-search-box-buttom" @click="searchClick">搜索</view>
|
|
|
</view>
|
|
|
<!-- <view class="p-24 box-border-box">
|
|
|
@@ -38,8 +40,9 @@
|
|
|
<view class="box-border-box plr-24">
|
|
|
<view class="shop-box mb-32 box-border-box p-16">
|
|
|
<image class="shop-box-bg" src="@/static/img/takeout/bg.png" mode="scaleToFill"></image>
|
|
|
- <swiper class="swiper-tj" easing-function="easeInOutCubic" :circular='true' :current='BanenerCurrent'
|
|
|
- @change="onSwiperChange" :autoplay="true" :interval="3000" :duration="500">
|
|
|
+ <swiper class="swiper-tj" easing-function="easeInOutCubic" :circular='true'
|
|
|
+ :current='BanenerCurrent' @change="onSwiperChange" :autoplay="true" :interval="3000"
|
|
|
+ :duration="500">
|
|
|
<swiper-item v-for="(item,i) in topShopData" :key="i" @click="toShop(item)">
|
|
|
<view class="swiper-item display-flex">
|
|
|
<view class="left-img-box">
|
|
|
@@ -97,8 +100,7 @@
|
|
|
</view>
|
|
|
|
|
|
|
|
|
-
|
|
|
- <view class="box-border-box plr-24 mt-24">
|
|
|
+ <scroll-view :scroll-y="true" class="box-border-box plr-24 mt-24" @scrolltolower="scrollList">
|
|
|
<EnBlank :customSrc='true' v-if="listData<= 0">
|
|
|
<template v-slot:blankImg>
|
|
|
<image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
|
|
|
@@ -146,7 +148,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </scroll-view>
|
|
|
+ <!-- <view class="box-border-box plr-24 mt-24">
|
|
|
+
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
@@ -164,7 +169,7 @@
|
|
|
getTakeaway
|
|
|
} from "@/api/category.js"
|
|
|
import {
|
|
|
- shopInfo
|
|
|
+ shopInfo
|
|
|
} from "@/api/shop.js"
|
|
|
import tools from "@/service/tools";
|
|
|
export default {
|
|
|
@@ -181,7 +186,8 @@
|
|
|
topShopData: [],
|
|
|
page: 1,
|
|
|
listData: [],
|
|
|
- navList: []
|
|
|
+ navList: [],
|
|
|
+ listTotal: 0
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -216,7 +222,13 @@
|
|
|
this.isScroll = false;
|
|
|
}
|
|
|
},
|
|
|
+ scrollList() {},
|
|
|
scrolltolower() {
|
|
|
+ console.log(this.listTotal, this.listData.length);
|
|
|
+ if (this.listTotal > this.listData.length) {
|
|
|
+ ++this.page
|
|
|
+ this.getGoodsList()
|
|
|
+ }
|
|
|
console.log('触底');
|
|
|
},
|
|
|
toShop(item) {
|
|
|
@@ -255,6 +267,7 @@
|
|
|
if (res.code == 1) {
|
|
|
if (res.data.items.length > 0) {
|
|
|
this.listData.push(...res.data.items)
|
|
|
+ this.listTotal = res.data.total
|
|
|
}
|
|
|
}
|
|
|
})
|