loadmore 7.23

This commit is contained in:
2020-07-23 20:58:56 +08:00
parent be9f2ec1c7
commit 59362ebc7c
12 changed files with 227 additions and 83 deletions

View File

@@ -1,5 +1,5 @@
<template>
<view class="shop">
<scroll-view class="shop" scroll-y @scrolltolower="onreachBottom">
<view class="top">
<image src="/static/image/shop/1.png" class="local"></image>
<view class="add" @click="chooseArea=true">
@@ -7,7 +7,7 @@
<image src="/static/image/shop/2.png"></image>
</view>
<view @click="sousuo">
<u-search placeholder="日照香炉生紫烟" v-model="keyword" :show-action="false" bg-color="#fff" border-color="#999999" :disabled="true"></u-search>
<u-search placeholder="" v-model="keyword" :show-action="false" bg-color="#fff" border-color="#999999" :disabled="true"></u-search>
</view>
<image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
</view>
@@ -48,12 +48,12 @@
<image class="lingquan"></image>
<youhq></youhq>
<view class="hr" style="margin-top:40rpx"></view>
<list></list>
<list ref="recommendGoods"></list>
<view class="cart" @click="toCartPage">
<image src="/static/image/common/3.png"></image>
</view>
<u-picker mode="region" :params="areaParams" v-model="chooseArea" @confirm="setArea"></u-picker>
</view>
</scroll-view>
</template>
<script>
import shopitem from "@/components/shop/shop-item/index"
@@ -63,7 +63,6 @@ import seckill from "@/components/shop/seckill/index"
import group from "@/components/shop/group/index"
import youhq from "@/components/shop/youhq/index"
import list from "../../components/shop/list/index"
export default {
name:"shop",
components:{
@@ -175,7 +174,10 @@ export default {
clickImage(index) {
console.log(index);
console.log(this.list[index]);
},
// 下拉加载更多推荐商品
onreachBottom() {
this.$refs.recommendGoods.loadMore();
},
setArea(e) {
// console.log(e);
@@ -195,7 +197,9 @@ export default {
}
</script>
<style lang="scss" scoped>
.shop{
.shop {
height: calc(100vh - var(--window-top));
box-sizing: border-box;
padding: 0 33rpx 100rpx;
.top{
width: 100%;