首页和滚动优化
This commit is contained in:
parent
a3c032b3e4
commit
1669b9be74
@ -216,17 +216,17 @@
|
|||||||
this.list = res.data.list;
|
this.list = res.data.list;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.getDom(this, '.tabs', res => {
|
this.$util.getDom(this, '.tabs', res => {
|
||||||
|
console.log(res.top);
|
||||||
|
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
this.tabsTop = res.top - 10;
|
this.tabsTop = res.top;
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
this.tabsTop = res.top;
|
this.tabsTop = res.top;
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
console.log(this.tabsTop);
|
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 1000)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goDetail(item) {
|
goDetail(item) {
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "pages/whole_sale/index",
|
"path": "pages/whole_sale/index",
|
||||||
"style": {
|
"style": {
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "批发",
|
"navigationBarTitleText": "批发",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
@ -388,14 +388,14 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "里海云仓",
|
"navigationBarTitleText": "里海云仓",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "market/market",
|
"path": "market/market",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "供销云市场",
|
"navigationBarTitleText": "供销云市场",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": true,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -403,7 +403,7 @@
|
|||||||
"path": "specialty/specialty",
|
"path": "specialty/specialty",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "名优特产",
|
"navigationBarTitleText": "名优特产",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": true,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,287 @@
|
|||||||
|
<template>
|
||||||
|
<view class="wholeSale" @touchstart="onTouchStart" @touchmove="onTouchMove">
|
||||||
|
<!-- 顶部 -->
|
||||||
|
<view class="wholeSale-header">
|
||||||
|
<!-- 适配不同机 -->
|
||||||
|
<view style="height: var(--status-bar-height);background-color: #40af37;"></view>
|
||||||
|
<view style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;">
|
||||||
|
<view style="display: flex;font-weight: bold;font-size: 32rpx;"><u-icon style="margin-right: 20rpx;"
|
||||||
|
name="arrow-left" size="20" color="#fff" @click="navBack"></u-icon>里海云仓</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view :style="{height:'calc(' +wrapHeight+ 'rpx + 92rpx + var(--status-bar-height))'}"></view>
|
||||||
|
|
||||||
|
<!-- 分类区域 -->
|
||||||
|
<view class="wholeSale-section" :style="{height:wrapHeight + 'rpx'}">
|
||||||
|
<view class="wholeSale-nav">
|
||||||
|
<view @click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}`)"
|
||||||
|
hover-class="none" class="search_content flex_a_c_j_sb">
|
||||||
|
<view class="flex_a_c search_content_wrap">
|
||||||
|
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||||
|
<input type="text" placeholder="搜索商品名称" :value="where.keyword"
|
||||||
|
placeholder-style="font-size: 30rpx;color:#999;" disabled style="pointer-events: none;">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 商品大分类 -->
|
||||||
|
<view class="category">
|
||||||
|
<scroll-view scroll-x="true">
|
||||||
|
<view class="category-wrap">
|
||||||
|
<block v-for="(item,index) in store_category" :key="index">
|
||||||
|
<view class="category-item" :class="{'category-item-active': index==cate_change}"
|
||||||
|
@click="changeCate(index)">
|
||||||
|
<u--image class="category-item-img" width="108rpx" :src="item.pic" height="108rpx"
|
||||||
|
shape="circle">
|
||||||
|
<template v-slot:loading>
|
||||||
|
<u-loading-icon color="#999" size="15" />
|
||||||
|
</template>
|
||||||
|
</u--image>
|
||||||
|
<text class="category-item-text">{{item.cate_name}}</text>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<view class="category-all" v-if="store_category.length > 0" @click="onAllCategory">
|
||||||
|
<view style="margin-bottom: 20rpx;">全部</view>
|
||||||
|
<u-icon name="list"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 商品小分类 -->
|
||||||
|
<view class="cate" v-if="store_category_children.length>1">
|
||||||
|
<scroll-view scroll-x="true">
|
||||||
|
<view class="cate-wrap">
|
||||||
|
<block v-for="(item,index) in store_category_children" :key="index">
|
||||||
|
<view class="cate-item" :class="{'cate-item-active':index == cate_change_children}"
|
||||||
|
@click="changeChildrenCate(index)">
|
||||||
|
<text>{{item.cate_name}}</text>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 内容 -->
|
||||||
|
<view class="wholeSale-con">
|
||||||
|
<!-- 流水瀑布 -->
|
||||||
|
<WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" />
|
||||||
|
<loadmore :type="isLoading" style="padding: 12rpx 0;"></loadmore>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 弹框大分类 -->
|
||||||
|
<uni-popup ref="popup" type="top" border-radius="10px 10px 0 0" z-index="1000">
|
||||||
|
<view class="popup-wrap">
|
||||||
|
<view style="height: var(--status-bar-height);"></view>
|
||||||
|
<view class="popup-wrap-title">分类</view>
|
||||||
|
<view class="popup-wrap-category">
|
||||||
|
<view class="popup-wrap-category-wrap">
|
||||||
|
<block v-for="(item,index) in store_category" :key="index">
|
||||||
|
<view class="popup-wrap-category-item" :class="{'category-item-active': index==cate_change}"
|
||||||
|
@click="changeCate(index)">
|
||||||
|
<u--image class="popup-wrap-category-item-img" width="108rpx" :src="item.pic"
|
||||||
|
height="108rpx" shape="circle">
|
||||||
|
<template v-slot:loading>
|
||||||
|
<u-loading-icon color="#999" size="15" />
|
||||||
|
</template>
|
||||||
|
</u--image>
|
||||||
|
<text class="popup-wrap-category-item-text">{{item.cate_name}}</text>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
goShopDetail
|
||||||
|
} from '@/libs/order.js'
|
||||||
|
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
|
||||||
|
import {
|
||||||
|
getStoreCategory,
|
||||||
|
getProductslist
|
||||||
|
} from "@/api/store.js"
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
WaterfallsFlow
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
hostProduct: [],
|
||||||
|
store_category: [], //商品大分类
|
||||||
|
store_category_children: [], //商品小分类
|
||||||
|
cate_change: 0,
|
||||||
|
cate_change_children: 0,
|
||||||
|
isLoading: 0,
|
||||||
|
isScroll: false,
|
||||||
|
where: {
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
mer_type: 1, //1-里海云仓, 2-云市场, 3-名优特产
|
||||||
|
cate_pid: '',
|
||||||
|
keyword: '',
|
||||||
|
deduction_rate: '', //抵扣比例
|
||||||
|
rand: 1
|
||||||
|
},
|
||||||
|
wrapHeight: 300,
|
||||||
|
touchstarty: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.getStoreCategory();
|
||||||
|
this.getProductslist(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
onPageScroll() {
|
||||||
|
uni.$emit('scroll');
|
||||||
|
},
|
||||||
|
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getProductslist(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
this.getProductslist();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
// 开始滑动
|
||||||
|
onTouchStart(e) {
|
||||||
|
this.touchstarty = e.touches[0].clientY;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 开始移动
|
||||||
|
onTouchMove(e) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
let deltaY = e.changedTouches[0].clientY - this.touchstarty;
|
||||||
|
if (deltaY <= 0) {
|
||||||
|
console.log("上滑")
|
||||||
|
this.wrapHeight = 0;
|
||||||
|
} else {
|
||||||
|
console.log('下滑');
|
||||||
|
if (this.where.cate_pid) this.wrapHeight = 360;
|
||||||
|
else this.wrapHeight = 300;
|
||||||
|
}
|
||||||
|
this.$forceUpdate();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
onAllCategory() {
|
||||||
|
this.$refs.popup.open();
|
||||||
|
},
|
||||||
|
|
||||||
|
navTo(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url,
|
||||||
|
success: () => {
|
||||||
|
uni.$once('searchValue', (e) => {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.where.keyword = e;
|
||||||
|
this.getProductslist(true);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
changeCate(e) {
|
||||||
|
this.cate_change = e;
|
||||||
|
this.store_category_children = [];
|
||||||
|
if (this.store_category[e].children) this.store_category_children = [...this.store_category[e].children];
|
||||||
|
this.store_category_children.unshift({
|
||||||
|
cate_name: '全部',
|
||||||
|
store_category_id: ''
|
||||||
|
})
|
||||||
|
this.cate_change_children = 0;
|
||||||
|
this.where.cate_pid = this.store_category[e].store_category_id;
|
||||||
|
this.getProductslist(true);
|
||||||
|
|
||||||
|
if (this.where.cate_pid) this.wrapHeight = 360;
|
||||||
|
else this.wrapHeight = 300;
|
||||||
|
|
||||||
|
this.$refs.popup && this.$refs.popup.close();
|
||||||
|
},
|
||||||
|
|
||||||
|
changeChildrenCate(e) {
|
||||||
|
this.cate_change_children = e;
|
||||||
|
this.where.cate_pid = this.store_category_children[e].store_category_id;
|
||||||
|
if (e == 0) this.where.cate_pid = this.store_category[this.cate_change]
|
||||||
|
.store_category_id; // 如若选中全部, 则取父级id
|
||||||
|
this.getProductslist(true);
|
||||||
|
},
|
||||||
|
getStoreCategory() {
|
||||||
|
getStoreCategory(259).then(res => {
|
||||||
|
this.store_category = [{
|
||||||
|
cate_name: '全部',
|
||||||
|
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/0bc7a202404021652194310.png',
|
||||||
|
store_category_id: ''
|
||||||
|
}, ...res.data];
|
||||||
|
this.store_category_children = this.store_category[0].children || [];
|
||||||
|
this.store_category_children.unshift({
|
||||||
|
cate_name: '全部',
|
||||||
|
store_category_id: ''
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getProductslist(reLoad = false) {
|
||||||
|
if (reLoad) {
|
||||||
|
this.where.page = 1;
|
||||||
|
this.hostProduct = [];
|
||||||
|
this.isLoading = 0;
|
||||||
|
}
|
||||||
|
if (this.isLoading == -1) return;
|
||||||
|
|
||||||
|
this.isLoading = 1;
|
||||||
|
getProductslist(this.where).then(res => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
this.where.limit = res.data.limit
|
||||||
|
this.where.page = res.data.page
|
||||||
|
this.hostProduct = [...this.hostProduct, ...res.data.list];
|
||||||
|
this.isLoading = 0;
|
||||||
|
if (res.data.list.length < this.where.limit) {
|
||||||
|
this.isLoading = -1;
|
||||||
|
}
|
||||||
|
this.where.page++;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
goDetail(item) {
|
||||||
|
goShopDetail(item, this.uid).then(res => {
|
||||||
|
if (this.isLogin) {
|
||||||
|
initiateAssistApi(item.activity_id).then(res => {
|
||||||
|
let id = res.data.product_assist_set_id;
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/activity/assist_detail/index?id=' + id
|
||||||
|
});
|
||||||
|
}).catch((err) => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
toLogin();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
navBack() {
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
page {
|
page {
|
||||||
background-color: #f8fafb !important;
|
background-color: #f8fafb !important;
|
||||||
@ -7,26 +291,28 @@
|
|||||||
background-color: #f8fafb !important;
|
background-color: #f8fafb !important;
|
||||||
|
|
||||||
.wholeSale-header {
|
.wholeSale-header {
|
||||||
position: sticky;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 9;
|
z-index: 98;
|
||||||
|
width: 100%;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
background-color: #40AE36;
|
background-color: #40AE36;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wholeSale-section {
|
.wholeSale-section {
|
||||||
position: sticky;
|
position: fixed;
|
||||||
top: calc(82rpx + var(--status-bar-height));
|
z-index: 97;
|
||||||
|
width: 100%;
|
||||||
|
top: calc(80rpx + var(--status-bar-height));
|
||||||
padding: 0rpx 20rpx;
|
padding: 0rpx 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
transition: height .5s;
|
transition: height .5s;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: 20rpx;
|
|
||||||
|
|
||||||
.wholeSale-nav {
|
.wholeSale-nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-bottom: 20rpx;
|
padding: 20rpx 0;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
@ -238,293 +524,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<template>
|
|
||||||
<view class="wholeSale">
|
|
||||||
<!-- 顶部 -->
|
|
||||||
<view class="wholeSale-header">
|
|
||||||
<!-- 适配不同机 -->
|
|
||||||
<view style="height: var(--status-bar-height);background-color: #40af37;"></view>
|
|
||||||
<view style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;">
|
|
||||||
<view style="display: flex;font-weight: bold;font-size: 32rpx;"><u-icon style="margin-right: 20rpx;"
|
|
||||||
name="arrow-left" size="20" color="#fff" @click="navBack"></u-icon>里海云仓</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 分类区域 -->
|
|
||||||
<view class="wholeSale-section" :style="{height:wrapHeight + 'rpx'}">
|
|
||||||
<view class="wholeSale-nav">
|
|
||||||
<view @click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}`)"
|
|
||||||
hover-class="none" class="search_content flex_a_c_j_sb">
|
|
||||||
<view class="flex_a_c search_content_wrap">
|
|
||||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
|
||||||
<input type="text" placeholder="搜索商品名称" :value="where.keyword"
|
|
||||||
placeholder-style="font-size: 30rpx;color:#999;" disabled style="pointer-events: none;">
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 商品大分类 -->
|
|
||||||
<view class="category">
|
|
||||||
<scroll-view scroll-x="true">
|
|
||||||
<view class="category-wrap">
|
|
||||||
<block v-for="(item,index) in store_category" :key="index">
|
|
||||||
<view class="category-item" :class="{'category-item-active': index==cate_change}"
|
|
||||||
@click="changeCate(index)">
|
|
||||||
<u--image class="category-item-img" width="108rpx" :src="item.pic" height="108rpx"
|
|
||||||
shape="circle">
|
|
||||||
<template v-slot:loading>
|
|
||||||
<u-loading-icon color="#999" size="15" />
|
|
||||||
</template>
|
|
||||||
</u--image>
|
|
||||||
<text class="category-item-text">{{item.cate_name}}</text>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
|
|
||||||
<view class="category-all" v-if="store_category.length > 0" @click="onAllCategory">
|
|
||||||
<view style="margin-bottom: 20rpx;">全部</view>
|
|
||||||
<u-icon name="list"></u-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 商品小分类 -->
|
|
||||||
<view class="cate" v-if="store_category_children.length>1">
|
|
||||||
<scroll-view scroll-x="true">
|
|
||||||
<view class="cate-wrap">
|
|
||||||
<block v-for="(item,index) in store_category_children" :key="index">
|
|
||||||
<view class="cate-item" :class="{'cate-item-active':index == cate_change_children}"
|
|
||||||
@click="changeChildrenCate(index)">
|
|
||||||
<text>{{item.cate_name}}</text>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 内容 -->
|
|
||||||
<view class="wholeSale-con"
|
|
||||||
:style="{height:'calc(100vh - '+wrapHeight+'rpx - 142rpx '+(isShowSmall?' - 48rpx':'')+')'}">
|
|
||||||
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom" @scroll="onScroll" style="height: 100%;"
|
|
||||||
:refresher-enabled="true" :refresher-triggered="isTriggered" @refresherpulling="onPulling"
|
|
||||||
@refresherrefresh="onRefresh" :refresher-threshold="45" :scroll-anchoring='true'>
|
|
||||||
<view>
|
|
||||||
<!-- 流水瀑布 -->
|
|
||||||
<WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" />
|
|
||||||
<loadmore :type="isLoading" style="padding: 12rpx 0;"></loadmore>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 弹框大分类 -->
|
|
||||||
<uni-popup ref="popup" type="top" border-radius="10px 10px 0 0" z-index="1000">
|
|
||||||
<view class="popup-wrap">
|
|
||||||
<view style="height: var(--status-bar-height);"></view>
|
|
||||||
<view class="popup-wrap-title">分类</view>
|
|
||||||
<view class="popup-wrap-category">
|
|
||||||
<view class="popup-wrap-category-wrap">
|
|
||||||
<block v-for="(item,index) in store_category" :key="index">
|
|
||||||
<view class="popup-wrap-category-item" :class="{'category-item-active': index==cate_change}"
|
|
||||||
@click="changeCate(index)">
|
|
||||||
<u--image class="popup-wrap-category-item-img" width="108rpx" :src="item.pic"
|
|
||||||
height="108rpx" shape="circle">
|
|
||||||
<template v-slot:loading>
|
|
||||||
<u-loading-icon color="#999" size="15" />
|
|
||||||
</template>
|
|
||||||
</u--image>
|
|
||||||
<text class="popup-wrap-category-item-text">{{item.cate_name}}</text>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-popup>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
goShopDetail
|
|
||||||
} from '@/libs/order.js'
|
|
||||||
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
|
|
||||||
import {
|
|
||||||
getStoreCategory,
|
|
||||||
getProductslist
|
|
||||||
} from "@/api/store.js"
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
WaterfallsFlow
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
hostProduct: [],
|
|
||||||
store_category: [], //商品大分类
|
|
||||||
store_category_children: [], //商品小分类
|
|
||||||
cate_change: 0,
|
|
||||||
cate_change_children: 0,
|
|
||||||
isLoading: 0,
|
|
||||||
where: {
|
|
||||||
page: 1,
|
|
||||||
limit: 20,
|
|
||||||
mer_type: 1, //1-里海云仓, 2-云市场, 3-名优特产
|
|
||||||
cate_pid: '',
|
|
||||||
keyword: '',
|
|
||||||
deduction_rate: '', //抵扣比例
|
|
||||||
rand: 1
|
|
||||||
},
|
|
||||||
wrapHeight: 300,
|
|
||||||
isShowSmall: false,
|
|
||||||
scrollTop: 0,
|
|
||||||
isTriggered: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(option) {
|
|
||||||
this.getStoreCategory();
|
|
||||||
this.getProductslist(true);
|
|
||||||
},
|
|
||||||
|
|
||||||
onPageScroll(e) {
|
|
||||||
uni.$emit('scroll');
|
|
||||||
},
|
|
||||||
|
|
||||||
watch: {
|
|
||||||
'where.cate_pid'(newVal, oldVal) {
|
|
||||||
if (newVal && !oldVal) {
|
|
||||||
this.wrapHeight = 300 + 48;
|
|
||||||
this.isShowSmall = true;
|
|
||||||
}
|
|
||||||
if (!newVal && oldVal) {
|
|
||||||
this.wrapHeight = 300;
|
|
||||||
this.isShowSmall = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 下拉加载
|
|
||||||
onPulling() {
|
|
||||||
if (!this.isTriggered) {
|
|
||||||
this.isTriggered = true;
|
|
||||||
this.getProductslist(true);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onRefresh(e) {
|
|
||||||
this.isTriggered = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
onScrollBottom(e) {
|
|
||||||
this.getProductslist();
|
|
||||||
},
|
|
||||||
|
|
||||||
onAllCategory() {
|
|
||||||
this.$refs.popup.open();
|
|
||||||
},
|
|
||||||
|
|
||||||
onScroll(e) {
|
|
||||||
if (this.scrollTop > e.target.scrollTop) { //上拉
|
|
||||||
this.wrapHeight = 300;
|
|
||||||
if (this.where.cate_pid) this.wrapHeight = this.wrapHeight + 48;
|
|
||||||
} else {
|
|
||||||
this.wrapHeight = 0;
|
|
||||||
}
|
|
||||||
this.scrollTop = e.target.scrollTop;
|
|
||||||
},
|
|
||||||
|
|
||||||
navTo(url) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: url,
|
|
||||||
success: () => {
|
|
||||||
uni.$once('searchValue', (e) => {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.where.keyword = e;
|
|
||||||
this.getProductslist(true);
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
navBack() {
|
|
||||||
uni.navigateBack();
|
|
||||||
},
|
|
||||||
|
|
||||||
changeCate(e) {
|
|
||||||
this.cate_change = e;
|
|
||||||
this.store_category_children = [];
|
|
||||||
if (this.store_category[e].children) this.store_category_children = [...this.store_category[e].children];
|
|
||||||
this.store_category_children.unshift({
|
|
||||||
cate_name: '全部',
|
|
||||||
store_category_id: ''
|
|
||||||
})
|
|
||||||
this.cate_change_children = 0;
|
|
||||||
this.where.cate_pid = this.store_category[e].store_category_id;
|
|
||||||
this.getProductslist(true);
|
|
||||||
|
|
||||||
this.$refs.popup && this.$refs.popup.close();
|
|
||||||
},
|
|
||||||
|
|
||||||
changeChildrenCate(e) {
|
|
||||||
this.cate_change_children = e;
|
|
||||||
this.where.cate_pid = this.store_category_children[e].store_category_id;
|
|
||||||
if (e == 0) this.where.cate_pid = this.store_category[this.cate_change]
|
|
||||||
.store_category_id; // 如若选中全部, 则取父级id
|
|
||||||
this.getProductslist(true);
|
|
||||||
},
|
|
||||||
getStoreCategory() {
|
|
||||||
getStoreCategory(259).then(res => {
|
|
||||||
this.store_category = [{
|
|
||||||
cate_name: '全部',
|
|
||||||
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/0bc7a202404021652194310.png',
|
|
||||||
store_category_id: ''
|
|
||||||
}, ...res.data];
|
|
||||||
this.store_category_children = this.store_category[0].children || [];
|
|
||||||
this.store_category_children.unshift({
|
|
||||||
cate_name: '全部',
|
|
||||||
store_category_id: ''
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getProductslist(reLoad = false) {
|
|
||||||
if (reLoad) {
|
|
||||||
this.where.page = 1;
|
|
||||||
this.hostProduct = [];
|
|
||||||
this.isLoading = 0;
|
|
||||||
}
|
|
||||||
if (this.isLoading == -1) return;
|
|
||||||
this.isLoading = 1;
|
|
||||||
|
|
||||||
getProductslist(this.where).then(res => {
|
|
||||||
this.where.limit = res.data.limit
|
|
||||||
this.where.page = res.data.page
|
|
||||||
this.isTriggered = false;
|
|
||||||
this.hostProduct = [...this.hostProduct, ...res.data.list];
|
|
||||||
this.isLoading = 0;
|
|
||||||
if (res.data.list.length < this.where.limit) this.isLoading = -1;
|
|
||||||
this.where.page++;
|
|
||||||
}).catch(err => {
|
|
||||||
this.isTriggered = false;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
goDetail(item) {
|
|
||||||
goShopDetail(item, this.uid).then(res => {
|
|
||||||
if (this.isLogin) {
|
|
||||||
initiateAssistApi(item.activity_id).then(res => {
|
|
||||||
let id = res.data.product_assist_set_id;
|
|
||||||
uni.hideLoading();
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/activity/assist_detail/index?id=' + id
|
|
||||||
});
|
|
||||||
}).catch((err) => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
toLogin();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="wholeSale">
|
<view class="wholeSale" @touchstart="onTouchStart" @touchmove="onTouchMove">
|
||||||
|
|
||||||
<!-- 适配不同机 -->
|
<!-- 适配不同机 -->
|
||||||
<view class="wholeSale-header">
|
<view class="wholeSale-header">
|
||||||
@ -26,6 +26,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view :style="{height:'calc(' + wrapHeight + 'rpx + 92rpx + var(--status-bar-height))'}"></view>
|
||||||
|
|
||||||
<!-- 分类区域 -->
|
<!-- 分类区域 -->
|
||||||
<view class="wholeSale-section" :style="{height:wrapHeight + 'rpx'}">
|
<view class="wholeSale-section" :style="{height:wrapHeight + 'rpx'}">
|
||||||
<view class="wholeSale-nav">
|
<view class="wholeSale-nav">
|
||||||
@ -67,10 +69,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view class="goods_list" :style="{height:'calc(100vh - '+wrapHeight+'rpx - 142rpx)'}">
|
<view class="goods_list">
|
||||||
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom" @scroll="onScroll" style="height: 100%;"
|
|
||||||
:refresher-enabled="true" :refresher-triggered="isTriggered" @refresherpulling="onPulling"
|
|
||||||
@refresherrefresh="onRefresh" :refresher-threshold="45" :scroll-anchoring='true'>
|
|
||||||
<view class="goods" v-for="(item, index) in goodsList" :key="index" @click="goStore(item.mer_id)">
|
<view class="goods" v-for="(item, index) in goodsList" :key="index" @click="goStore(item.mer_id)">
|
||||||
<view class="avatar">
|
<view class="avatar">
|
||||||
<u--image width="160rpx" height="160rpx" :src="item.mer_avatar" mode="aspectFill">
|
<u--image width="160rpx" height="160rpx" :src="item.mer_avatar" mode="aspectFill">
|
||||||
@ -82,8 +81,7 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="content-head">
|
<view class="content-head">
|
||||||
<view class="title">{{item.mer_name}}</view>
|
<view class="title">{{item.mer_name}}</view>
|
||||||
<text style="font-size: 21.03rpx;color: #aaa;"
|
<text style="font-size: 21.03rpx;color: #aaa;" v-if="item.sales>=100">月销{{item.sales}}</text>
|
||||||
v-if="item.sales>=100">月销{{item.sales}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="content-two">
|
<view class="content-two">
|
||||||
<view class="score">
|
<view class="score">
|
||||||
@ -115,7 +113,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<loadmore :type="isLoading" style="padding: 12rpx 0;"></loadmore>
|
<loadmore :type="isLoading" style="padding: 12rpx 0;"></loadmore>
|
||||||
</scroll-view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 弹框大分类 -->
|
<!-- 弹框大分类 -->
|
||||||
@ -181,6 +178,7 @@
|
|||||||
cate_change: 0,
|
cate_change: 0,
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
isLoading: 0,
|
isLoading: 0,
|
||||||
|
isScroll: false,
|
||||||
isShowAddress: false,
|
isShowAddress: false,
|
||||||
street: '定位中',
|
street: '定位中',
|
||||||
where: {
|
where: {
|
||||||
@ -193,8 +191,7 @@
|
|||||||
location: ''
|
location: ''
|
||||||
},
|
},
|
||||||
wrapHeight: 300,
|
wrapHeight: 300,
|
||||||
scrollTop: 0,
|
touchstarty: 0,
|
||||||
isTriggered: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -206,6 +203,19 @@
|
|||||||
hide_mer_status: '',
|
hide_mer_status: '',
|
||||||
}, mapGetters(['viewColor', 'keyColor'])),
|
}, mapGetters(['viewColor', 'keyColor'])),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onPageScroll() {
|
||||||
|
uni.$emit('scroll');
|
||||||
|
},
|
||||||
|
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.storeMerchantList(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
this.storeMerchantList();
|
||||||
|
},
|
||||||
|
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
let getAddress = uni.getStorageSync('getAddress');
|
let getAddress = uni.getStorageSync('getAddress');
|
||||||
let closeShow = uni.getStorageSync('closeShow');
|
let closeShow = uni.getStorageSync('closeShow');
|
||||||
@ -221,39 +231,33 @@
|
|||||||
this.merClassifly();
|
this.merClassifly();
|
||||||
this.storeMerchantList();
|
this.storeMerchantList();
|
||||||
},
|
},
|
||||||
onPageScroll() {
|
|
||||||
uni.$emit('scroll');
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 下拉加载
|
|
||||||
onPulling() {
|
// 开始滑动
|
||||||
if (!this.isTriggered) {
|
onTouchStart(e) {
|
||||||
this.isTriggered = true;
|
this.touchstarty = e.touches[0].clientY;
|
||||||
this.storeMerchantList(true);
|
},
|
||||||
|
|
||||||
|
// 开始移动
|
||||||
|
onTouchMove(e) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
let deltaY = e.changedTouches[0].clientY - this.touchstarty;
|
||||||
|
if (deltaY <= 0) {
|
||||||
|
console.log("上滑")
|
||||||
|
this.wrapHeight = 0;
|
||||||
|
} else {
|
||||||
|
console.log('下滑');
|
||||||
|
this.wrapHeight = 300;
|
||||||
}
|
}
|
||||||
},
|
this.$forceUpdate();
|
||||||
|
})
|
||||||
onRefresh(e) {
|
|
||||||
this.isTriggered = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
onScrollBottom(e) {
|
|
||||||
this.storeMerchantList();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onAllCategory() {
|
onAllCategory() {
|
||||||
this.$refs.popup.open();
|
this.$refs.popup.open();
|
||||||
},
|
},
|
||||||
|
|
||||||
onScroll(e) {
|
|
||||||
if (this.scrollTop > e.target.scrollTop) { //上拉
|
|
||||||
this.wrapHeight = 300;
|
|
||||||
} else {
|
|
||||||
this.wrapHeight = 0;
|
|
||||||
}
|
|
||||||
this.scrollTop = e.target.scrollTop;
|
|
||||||
},
|
|
||||||
|
|
||||||
navTo(url) {
|
navTo(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url,
|
url: url,
|
||||||
@ -279,12 +283,14 @@
|
|||||||
this.$refs.popup && this.$refs.popup.close();
|
this.$refs.popup && this.$refs.popup.close();
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
|
|
||||||
// 进店
|
// 进店
|
||||||
goStore(id) {
|
goStore(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/store/home/index?id=${id}`
|
url: `/pages/store/home/index?id=${id}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
merClassifly() {
|
merClassifly() {
|
||||||
merClassifly().then(res => {
|
merClassifly().then(res => {
|
||||||
this.store_category = [{
|
this.store_category = [{
|
||||||
@ -294,6 +300,7 @@
|
|||||||
}, ...res.data];
|
}, ...res.data];
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
storeMerchantList(reLoad = false) {
|
storeMerchantList(reLoad = false) {
|
||||||
if (reLoad) {
|
if (reLoad) {
|
||||||
this.where.page = 1;
|
this.where.page = 1;
|
||||||
@ -303,19 +310,21 @@
|
|||||||
if (this.isLoading == -1) return;
|
if (this.isLoading == -1) return;
|
||||||
this.isLoading = 1;
|
this.isLoading = 1;
|
||||||
storeMerchantList(this.where).then(res => {
|
storeMerchantList(this.where).then(res => {
|
||||||
this.isTriggered = false;
|
uni.stopPullDownRefresh();
|
||||||
this.goodsList = [...this.goodsList, ...res.data.list];
|
this.goodsList = [...this.goodsList, ...res.data.list];
|
||||||
this.isLoading = 0;
|
this.isLoading = 0;
|
||||||
if (res.data.list.length < this.where.limit) this.isLoading = -1;
|
if (res.data.list.length < this.where.limit) this.isLoading = -1;
|
||||||
this.where.page++;
|
this.where.page++;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.isTriggered = false;
|
uni.stopPullDownRefresh();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
closeShowAddress() {
|
closeShowAddress() {
|
||||||
this.isShowAddress = false;
|
this.isShowAddress = false;
|
||||||
uni.setStorageSync('closeShow', true);
|
uni.setStorageSync('closeShow', true);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 选择位置
|
// 选择位置
|
||||||
changeMap() {
|
changeMap() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -347,6 +356,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getLocation() {
|
getLocation() {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'gcj02',
|
type: 'gcj02',
|
||||||
@ -403,7 +413,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -421,33 +431,33 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wholeSale-header {
|
.wholeSale-header {
|
||||||
position: sticky;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 90;
|
z-index: 90;
|
||||||
margin-bottom: 20rpx;
|
width: 100%;
|
||||||
background-color: #40AE36;
|
background-color: #40AE36;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wholeSale-section {
|
.wholeSale-section {
|
||||||
position: sticky;
|
position: fixed;
|
||||||
top: calc(82rpx + var(--status-bar-height));
|
z-index: 10;
|
||||||
|
top: calc(80rpx + var(--status-bar-height));
|
||||||
|
width: 100%;
|
||||||
padding: 0rpx 20rpx;
|
padding: 0rpx 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
transition: height .5s;
|
transition: height .5s;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: 20rpx;
|
|
||||||
|
|
||||||
.wholeSale-nav {
|
.wholeSale-nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 40rpx;
|
padding: 20rpx 0;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_content {
|
.search_content {
|
||||||
// margin-bottom: 40rpx;
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
padding: 2px 2px 2px 21.05rpx;
|
padding: 2px 2px 2px 21.05rpx;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="wholeSale">
|
<view class="wholeSale" @touchstart="onTouchStart" @touchmove="onTouchMove">
|
||||||
<!-- 适配不同机 -->
|
<!-- 适配不同机 -->
|
||||||
<view class="wholeSale-header">
|
<view class="wholeSale-header">
|
||||||
<view style="height: var(--status-bar-height);background-color: #40af37;"></view>
|
<view style="height: var(--status-bar-height);background-color: #40af37;"></view>
|
||||||
@ -9,6 +9,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view :style="{height:'calc(' + wrapHeight + 'rpx + 92rpx + var(--status-bar-height))'}"></view>
|
||||||
|
|
||||||
<view class="wholeSale-section" :style="{height:wrapHeight + 'rpx'}">
|
<view class="wholeSale-section" :style="{height:wrapHeight + 'rpx'}">
|
||||||
<view class="wholeSale-nav">
|
<view class="wholeSale-nav">
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
@ -63,17 +65,11 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<view class="wholeSale-con" :style="{height:'calc(100vh - '+wrapHeight+'rpx - 142rpx )'}">
|
<view class="wholeSale-con">
|
||||||
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom" @scroll="onScroll" style="height: 100%;"
|
|
||||||
:refresher-enabled="true" :refresher-triggered="isTriggered" @refresherpulling="onPulling"
|
|
||||||
@refresherrefresh="onRefresh" :refresher-threshold="45" :scroll-anchoring='true'>
|
|
||||||
<view>
|
|
||||||
<!-- 流水瀑布 -->
|
<!-- 流水瀑布 -->
|
||||||
<WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" />
|
<WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" />
|
||||||
<loadmore :type="isLoading" style="padding: 12rpx 0;"></loadmore>
|
<loadmore :type="isLoading" style="padding: 12rpx 0;"></loadmore>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 弹框大分类 -->
|
<!-- 弹框大分类 -->
|
||||||
<uni-popup ref="popup" type="top" border-radius="10px 10px 0 0" z-index="1000">
|
<uni-popup ref="popup" type="top" border-radius="10px 10px 0 0" z-index="1000">
|
||||||
@ -123,6 +119,7 @@
|
|||||||
cate_change: 0,
|
cate_change: 0,
|
||||||
cate_change_children: 0,
|
cate_change_children: 0,
|
||||||
isLoading: 0,
|
isLoading: 0,
|
||||||
|
isScroll: false,
|
||||||
where: {
|
where: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
@ -132,46 +129,52 @@
|
|||||||
sale_type: 1, //1-零售, 2-批发
|
sale_type: 1, //1-零售, 2-批发
|
||||||
},
|
},
|
||||||
wrapHeight: 300,
|
wrapHeight: 300,
|
||||||
scrollTop: 0,
|
touchstarty: 0
|
||||||
isTriggered: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onPageScroll() {
|
||||||
|
uni.$emit('scroll');
|
||||||
|
},
|
||||||
|
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getProductslist(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
this.getProductslist();
|
||||||
|
},
|
||||||
|
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.getCategoryIndexList();
|
this.getCategoryIndexList();
|
||||||
this.getProductslist(true);
|
this.getProductslist(true);
|
||||||
},
|
},
|
||||||
onPageScroll() {
|
|
||||||
uni.$emit('scroll');
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 下拉加载
|
// 开始滑动
|
||||||
onPulling() {
|
onTouchStart(e) {
|
||||||
if (!this.isTriggered) {
|
this.touchstarty = e.touches[0].clientY;
|
||||||
this.isTriggered = true;
|
|
||||||
this.getProductslist(true);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onRefresh(e) {
|
|
||||||
this.isTriggered = true;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onScrollBottom(e) {
|
// 开始移动
|
||||||
this.getProductslist();
|
onTouchMove(e) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
let deltaY = e.changedTouches[0].clientY - this.touchstarty;
|
||||||
|
if (deltaY <= 0) {
|
||||||
|
console.log("上滑")
|
||||||
|
this.wrapHeight = 0;
|
||||||
|
} else {
|
||||||
|
console.log('下滑');
|
||||||
|
this.wrapHeight = 300;
|
||||||
|
}
|
||||||
|
this.$forceUpdate();
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onAllCategory() {
|
onAllCategory() {
|
||||||
this.$refs.popup.open();
|
this.$refs.popup.open();
|
||||||
},
|
},
|
||||||
|
|
||||||
onScroll(e) {
|
|
||||||
if (this.scrollTop > e.target.scrollTop) { //上拉
|
|
||||||
this.wrapHeight = 300;
|
|
||||||
} else {
|
|
||||||
this.wrapHeight = 0;
|
|
||||||
}
|
|
||||||
this.scrollTop = e.target.scrollTop;
|
|
||||||
},
|
|
||||||
|
|
||||||
navTo(url) {
|
navTo(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url,
|
url: url,
|
||||||
@ -241,13 +244,13 @@
|
|||||||
if (this.isLoading == -1) return;
|
if (this.isLoading == -1) return;
|
||||||
this.isLoading = 1;
|
this.isLoading = 1;
|
||||||
getProductslist(this.where).then(res => {
|
getProductslist(this.where).then(res => {
|
||||||
this.isTriggered = false;
|
uni.stopPullDownRefresh();
|
||||||
this.hostProduct = [...this.hostProduct, ...res.data.list];
|
this.hostProduct = [...this.hostProduct, ...res.data.list];
|
||||||
this.where.page++;
|
this.where.page++;
|
||||||
this.isLoading = 0;
|
this.isLoading = 0;
|
||||||
if (res.data.list.length < this.where.limit) this.isLoading = -1;
|
if (res.data.list.length < this.where.limit) this.isLoading = -1;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.isTriggered = false;
|
uni.stopPullDownRefresh();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goDetail(item) {
|
goDetail(item) {
|
||||||
@ -282,27 +285,27 @@
|
|||||||
.wholeSale {
|
.wholeSale {
|
||||||
|
|
||||||
.wholeSale-header {
|
.wholeSale-header {
|
||||||
position: sticky;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 90;
|
z-index: 90;
|
||||||
|
width: 100%;
|
||||||
background-color: #40AE36;
|
background-color: #40AE36;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wholeSale-section {
|
.wholeSale-section {
|
||||||
position: sticky;
|
position: fixed;
|
||||||
top: calc(82rpx + var(--status-bar-height));
|
top: calc(80rpx + var(--status-bar-height));
|
||||||
|
width: 100%;
|
||||||
padding: 0rpx 20rpx;
|
padding: 0rpx 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
transition: height .5s;
|
transition: height .5s;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: 20rpx;
|
z-index: 89;
|
||||||
padding-top: 20rpx;
|
|
||||||
z-index: 20;
|
|
||||||
|
|
||||||
.wholeSale-nav {
|
.wholeSale-nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 40rpx;
|
padding: 20rpx 0;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
|
@ -576,7 +576,7 @@
|
|||||||
this.isScrolled = false
|
this.isScrolled = false
|
||||||
}
|
}
|
||||||
// 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
|
// 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
|
||||||
uni.$emit('scroll');
|
uni.$emit('scroll', e);
|
||||||
|
|
||||||
if (e.scrollTop >= 100) {
|
if (e.scrollTop >= 100) {
|
||||||
uni.setTabBarItem({
|
uni.setTabBarItem({
|
||||||
@ -662,6 +662,7 @@
|
|||||||
that.isScrolled = res[0].top <= -60
|
that.isScrolled = res[0].top <= -60
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
this.isIndexClick = false;
|
this.isIndexClick = false;
|
||||||
|
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="wholeSale">
|
<view class="wholeSale" @touchstart="onTouchStart" @touchmove="onTouchMove">
|
||||||
<!-- 顶部 -->
|
<!-- 顶部 -->
|
||||||
<view class="wholeSale-header">
|
<view class="wholeSale-header">
|
||||||
<view class="wholeSale-header-wrap">
|
|
||||||
<!-- 适配不同机 -->
|
<!-- 适配不同机 -->
|
||||||
<view style="height: var(--status-bar-height);"></view>
|
<view style="height: var(--status-bar-height);"></view>
|
||||||
|
|
||||||
@ -19,9 +18,12 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 占位 -->
|
||||||
|
<view :style="{height:'calc(' + wrapHeight + 'rpx + 108rpx + var(--status-bar-height))'}"></view>
|
||||||
|
|
||||||
<view class="wholeSale-header-search-wrap" :style="{height:wrapHeight + 'rpx'}">
|
<view class="wholeSale-header-search-wrap" :style="{height:wrapHeight + 'rpx'}">
|
||||||
<u-subsection v-if="tabsCurr==2" :list="subList" @change="changeSub" :current="subCurr"
|
<u-subsection v-if="tabsCurr==2" :list="subList" @change="changeSub" :current="subCurr" mode="subsection"
|
||||||
mode="subsection" activeColor="#40ae36" fontSize="14" style="margin-bottom: 24rpx;"></u-subsection>
|
activeColor="#40ae36" fontSize="14" style="margin-top: 20rpx;"></u-subsection>
|
||||||
|
|
||||||
<view class="wholeSale-nav">
|
<view class="wholeSale-nav">
|
||||||
<view
|
<view
|
||||||
@ -45,8 +47,8 @@
|
|||||||
<view class="category-item" :class="{'category-item-active': index==cate_change}"
|
<view class="category-item" :class="{'category-item-active': index==cate_change}"
|
||||||
@click="changeCate(index)">
|
@click="changeCate(index)">
|
||||||
<block v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)">
|
<block v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)">
|
||||||
<u--image class="category-item-img" width="108rpx" :src="item.pic"
|
<u--image class="category-item-img" width="108rpx" :src="item.pic" height="108rpx"
|
||||||
height="108rpx" shape="circle">
|
shape="circle">
|
||||||
<template v-slot:loading>
|
<template v-slot:loading>
|
||||||
<u-loading-icon color="#999" size="15" />
|
<u-loading-icon color="#999" size="15" />
|
||||||
</template>
|
</template>
|
||||||
@ -88,8 +90,7 @@
|
|||||||
|
|
||||||
<!-- 综合查询 -->
|
<!-- 综合查询 -->
|
||||||
<view class="comprehensive" v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)">
|
<view class="comprehensive" v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)">
|
||||||
<view class="comprehensive-price" :class="{'comp-color': orderCurr==1}"
|
<view class="comprehensive-price" :class="{'comp-color': orderCurr==1}" @click="toOrder('price', 1)">
|
||||||
@click="toOrder('price', 1)">
|
|
||||||
<text>价格</text>
|
<text>价格</text>
|
||||||
<image v-if="orderCurr==1" style="width: 15rpx;height: 21rpx;"
|
<image v-if="orderCurr==1" style="width: 15rpx;height: 21rpx;"
|
||||||
:src="where.order == 'price_asc' ? domain+'/static/diy/up'+keyColor+'.png' : domain+'/static/diy/down'+keyColor+'.png'">
|
:src="where.order == 'price_asc' ? domain+'/static/diy/up'+keyColor+'.png' : domain+'/static/diy/down'+keyColor+'.png'">
|
||||||
@ -134,17 +135,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<view class="wholeSale-con"
|
<view class="wholeSale-con">
|
||||||
:style="{height:'calc(100vh - '+wrapHeight+'rpx - 142rpx '+(isShowSmall?' - 48rpx':'')+')'}">
|
|
||||||
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom" @scroll="onScroll" style="height: 100%;"
|
|
||||||
:refresher-enabled="true" :refresher-triggered="isTriggered" @refresherpulling="onPulling"
|
|
||||||
@refresherrefresh="onRefresh" :refresher-threshold="45" :scroll-anchoring='true'>
|
|
||||||
<!-- 流水瀑布 -->
|
<!-- 流水瀑布 -->
|
||||||
<WaterfallsFlow v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)" :wfList='hostProduct'
|
<WaterfallsFlow v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)" :wfList='hostProduct' @itemTap="goDetail"
|
||||||
@itemTap="goDetail" :type="0" :sale_type="2" />
|
:type="0" :sale_type="2" />
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view class="goods_list" v-else>
|
<view class="goods_list" v-else>
|
||||||
@ -183,8 +179,7 @@
|
|||||||
<text> {{item.service_phone}}</text>
|
<text> {{item.service_phone}}</text>
|
||||||
<u--image style="margin-left: 28rpx;" v-if="item.mer_take_time" :showLoading="true"
|
<u--image style="margin-left: 28rpx;" v-if="item.mer_take_time" :showLoading="true"
|
||||||
src="/static/images/GXSC/SJ.png" width="33.85rpx" height="33.85rpx"></u--image>
|
src="/static/images/GXSC/SJ.png" width="33.85rpx" height="33.85rpx"></u--image>
|
||||||
<text
|
<text v-if="item.mer_take_time">{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}</text>
|
||||||
v-if="item.mer_take_time">{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="content-two">
|
<view class="content-two">
|
||||||
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="33.85rpx"
|
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="33.85rpx"
|
||||||
@ -201,7 +196,6 @@
|
|||||||
<image :src="`${domain}/static/images/noCart.png`"></image>
|
<image :src="`${domain}/static/images/noCart.png`"></image>
|
||||||
<view>暂无商品,看点别的吧</view>
|
<view>暂无商品,看点别的吧</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 弹框大分类 -->
|
<!-- 弹框大分类 -->
|
||||||
@ -320,10 +314,8 @@
|
|||||||
bigTypeDomInfo: null,
|
bigTypeDomInfo: null,
|
||||||
smallTypeDomInfo: null,
|
smallTypeDomInfo: null,
|
||||||
categoryWrapHeight: 0,
|
categoryWrapHeight: 0,
|
||||||
wrapHeight: 332,
|
wrapHeight: 360,
|
||||||
isShowSmall: false,
|
touchstarty: 0
|
||||||
scrollTop: 0,
|
|
||||||
isTriggered: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -366,54 +358,54 @@
|
|||||||
index: 1,
|
index: 1,
|
||||||
text: "批发",
|
text: "批发",
|
||||||
selectedIconPath: "/static/tabbar_icon/b-a.png"
|
selectedIconPath: "/static/tabbar_icon/b-a.png"
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
// watch: {
|
||||||
'where.cate_pid'(newVal, oldVal) {
|
// 'where.cate_pid'(newVal, oldVal) {
|
||||||
if (newVal && !oldVal) {
|
// if (newVal && !oldVal) {
|
||||||
this.wrapHeight = this.tabsCurr == 2 ? 400 : (332 + 48);
|
// this.isShowSmall = true;
|
||||||
this.isShowSmall = true;
|
// }
|
||||||
}
|
// if (!newVal && oldVal) {
|
||||||
if (!newVal && oldVal) {
|
// this.isShowSmall = false;
|
||||||
this.wrapHeight = this.tabsCurr == 2 ? 400 : 332;
|
// }
|
||||||
this.isShowSmall = false;
|
// }
|
||||||
}
|
// },
|
||||||
}
|
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.initData(true, true);
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
this.initData(false, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
// 开始滑动
|
||||||
|
onTouchStart(e) {
|
||||||
|
this.touchstarty = e.touches[0].clientY;
|
||||||
|
},
|
||||||
|
|
||||||
// 下拉加载
|
// 开始移动
|
||||||
onPulling() {
|
onTouchMove(e) {
|
||||||
if (!this.isTriggered) {
|
this.$nextTick(() => {
|
||||||
this.isTriggered = true;
|
let deltaY = e.changedTouches[0].clientY - this.touchstarty;
|
||||||
this.initData(true, true);
|
if (deltaY <= 0) {
|
||||||
|
console.log("上滑")
|
||||||
|
this.wrapHeight = 0;
|
||||||
|
} else {
|
||||||
|
console.log('下滑');
|
||||||
|
this.getHeight();
|
||||||
}
|
}
|
||||||
},
|
this.$forceUpdate();
|
||||||
onRefresh(e) {
|
})
|
||||||
this.isTriggered = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
onScrollBottom(e) {
|
|
||||||
this.initData(false, true);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onAllCategory() {
|
onAllCategory() {
|
||||||
this.$refs.popup.open();
|
this.$refs.popup.open();
|
||||||
},
|
},
|
||||||
|
|
||||||
onScroll(e) {
|
|
||||||
if (this.scrollTop >= e.target.scrollTop) { //上拉
|
|
||||||
this.wrapHeight = this.tabsCurr == 2 ? 400 : 332;
|
|
||||||
if (this.where.cate_pid) this.wrapHeight = this.wrapHeight + 48;
|
|
||||||
} else {
|
|
||||||
this.wrapHeight = 0;
|
|
||||||
}
|
|
||||||
this.scrollTop = e.target.scrollTop;
|
|
||||||
},
|
|
||||||
|
|
||||||
initData(re = false, stop = false) {
|
initData(re = false, stop = false) {
|
||||||
if (!stop) this.getStoreCategory();
|
if (!stop) this.getStoreCategory();
|
||||||
if (this.tabsCurr == 2 && this.subCurr == 1) this.storeMerchantList(re, stop);
|
if (this.tabsCurr == 2 && this.subCurr == 1) this.storeMerchantList(re, stop);
|
||||||
@ -424,6 +416,7 @@
|
|||||||
this.getProductslist(true);
|
this.getProductslist(true);
|
||||||
},
|
},
|
||||||
changeSub(e) {
|
changeSub(e) {
|
||||||
|
console.log(e);
|
||||||
this.subCurr = e;
|
this.subCurr = e;
|
||||||
this.where = {
|
this.where = {
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -435,6 +428,7 @@
|
|||||||
this.cate_change = 0;
|
this.cate_change = 0;
|
||||||
this.cate_change_children = 0;
|
this.cate_change_children = 0;
|
||||||
this.initData(true);
|
this.initData(true);
|
||||||
|
this.getHeight()
|
||||||
},
|
},
|
||||||
toOrder(type, index = -1) {
|
toOrder(type, index = -1) {
|
||||||
if (this.where.order == type) {
|
if (this.where.order == type) {
|
||||||
@ -484,9 +478,30 @@
|
|||||||
this.cate_change = 0;
|
this.cate_change = 0;
|
||||||
this.cate_change_children = 0;
|
this.cate_change_children = 0;
|
||||||
if (this.tabsCurr != 2 || (this.tabsCurr == 2 && this.subCurr != 1)) this.where.mer_type = e;
|
if (this.tabsCurr != 2 || (this.tabsCurr == 2 && this.subCurr != 1)) this.where.mer_type = e;
|
||||||
this.wrapHeight = this.tabsCurr == 2 ? 400 : this.where.cate_pid ? (332 + 48) : 332;
|
|
||||||
|
this.getHeight();
|
||||||
this.initData(true);
|
this.initData(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 高度判断
|
||||||
|
getHeight() {
|
||||||
|
if (this.tabsCurr == 1) {
|
||||||
|
if (this.cate_change) {
|
||||||
|
this.wrapHeight = 410;
|
||||||
|
} else {
|
||||||
|
this.wrapHeight = 360;
|
||||||
|
}
|
||||||
|
} else if (this.tabsCurr == 2) {
|
||||||
|
if (this.subCurr == 1) {
|
||||||
|
this.wrapHeight = 400;
|
||||||
|
} else {
|
||||||
|
this.wrapHeight = 440;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.wrapHeight = 360;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
changeCate(e) {
|
changeCate(e) {
|
||||||
this.cate_change = e;
|
this.cate_change = e;
|
||||||
this.store_category_children = [];
|
this.store_category_children = [];
|
||||||
@ -507,8 +522,11 @@
|
|||||||
this.where.cate_pid = this.store_category[e].store_category_id;
|
this.where.cate_pid = this.store_category[e].store_category_id;
|
||||||
this.where.cate_id = "";
|
this.where.cate_id = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getProductslist(true);
|
this.getProductslist(true);
|
||||||
|
|
||||||
|
this.getHeight();
|
||||||
|
|
||||||
// 关闭popup
|
// 关闭popup
|
||||||
this.$refs.popup && this.$refs.popup.close();
|
this.$refs.popup && this.$refs.popup.close();
|
||||||
},
|
},
|
||||||
@ -564,9 +582,9 @@
|
|||||||
if (this.where.order) this.where.rand = 0;
|
if (this.where.order) this.where.rand = 0;
|
||||||
else this.where.rand = 1;
|
else this.where.rand = 1;
|
||||||
getProductslist(this.where, true).then(res => {
|
getProductslist(this.where, true).then(res => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
this.where.limit = res.data.limit
|
this.where.limit = res.data.limit
|
||||||
this.where.page = res.data.page
|
this.where.page = res.data.page
|
||||||
this.isTriggered = false;
|
|
||||||
if (reLoad) this.hostProduct = [];
|
if (reLoad) this.hostProduct = [];
|
||||||
this.hostProduct = [...this.hostProduct, ...res.data.list];
|
this.hostProduct = [...this.hostProduct, ...res.data.list];
|
||||||
this.isLoading = 0;
|
this.isLoading = 0;
|
||||||
@ -583,7 +601,6 @@
|
|||||||
if (this.isLoading == -1) return;
|
if (this.isLoading == -1) return;
|
||||||
this.isLoading = 1;
|
this.isLoading = 1;
|
||||||
storeMerchantList(this.where).then(res => {
|
storeMerchantList(this.where).then(res => {
|
||||||
this.isTriggered = false;
|
|
||||||
this.shopList = [...this.shopList, ...res.data.list];
|
this.shopList = [...this.shopList, ...res.data.list];
|
||||||
this.isLoading = 0;
|
this.isLoading = 0;
|
||||||
if (res.data.list.length < this.where.limit) this.isLoading = -1;
|
if (res.data.list.length < this.where.limit) this.isLoading = -1;
|
||||||
@ -627,23 +644,11 @@
|
|||||||
|
|
||||||
.wholeSale {
|
.wholeSale {
|
||||||
.wholeSale-header {
|
.wholeSale-header {
|
||||||
position: sticky;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 90;
|
z-index: 90;
|
||||||
margin-bottom: 20rpx;
|
|
||||||
|
|
||||||
.wholeSale-header-wrap {
|
|
||||||
background-color: #40AE36;
|
background-color: #40AE36;
|
||||||
}
|
width: 100%;
|
||||||
|
|
||||||
.wholeSale-header-search-wrap {
|
|
||||||
position: sticky;
|
|
||||||
top: calc(82rpx + var(--status-bar-height));
|
|
||||||
transition: height .5s;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 30rpx 20rpx 0;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scrollview {
|
.scrollview {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -678,12 +683,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wholeSale-header-search-wrap {
|
||||||
|
position: fixed;
|
||||||
|
top: calc(98rpx + var(--status-bar-height));
|
||||||
|
z-index: 89;
|
||||||
|
width: 100%;
|
||||||
|
transition: height .5s;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0rpx 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.wholeSale-con {
|
.wholeSale-con {
|
||||||
|
position: relative;
|
||||||
|
z-index: index;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wholeSale-nav {
|
||||||
|
padding: 20rpx 0;
|
||||||
|
|
||||||
.search_content {
|
.search_content {
|
||||||
margin-bottom: 40rpx;
|
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
padding: 2px 2px 2px 21.05rpx;
|
padding: 2px 2px 2px 21.05rpx;
|
||||||
border-radius: 80rpx;
|
border-radius: 80rpx;
|
||||||
@ -716,6 +736,7 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.category {
|
.category {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -790,7 +811,7 @@
|
|||||||
.cate {
|
.cate {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
margin-bottom: 30rpx;
|
// margin-bottom: 30rpx;
|
||||||
|
|
||||||
.cate-wrap {
|
.cate-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -883,7 +904,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20rpx 50rpx;
|
padding: 10rpx 50rpx;
|
||||||
|
|
||||||
[class^=comprehensive-] {
|
[class^=comprehensive-] {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user