上拉置顶 苹果空白

This commit is contained in:
1154079537 2024-05-08 16:45:36 +08:00
parent 160347e77a
commit 67345721c1
7 changed files with 1240 additions and 1194 deletions

View File

@ -63,7 +63,7 @@
</view> </view>
<!-- tab导航 --> <!-- tab导航 -->
<view class="tabs" v-if="showTab"> <view class="tabs" v-if="showTab" :style="{top:'calc(98rpx + var(--status-bar-height))'}">
<block v-for="(item,indx) in tabsArr" :key="indx"> <block v-for="(item,indx) in tabsArr" :key="indx">
<view v-if="indx>0" style="width: 3rpx;height: 36rpx;background-color: #ccc;"></view> <view v-if="indx>0" style="width: 3rpx;height: 36rpx;background-color: #ccc;"></view>
<view :class="{'tabs-item-active':item.val==currTabs}" class="tabs-item" @click="changeTab(item.val)"> <view :class="{'tabs-item-active':item.val==currTabs}" class="tabs-item" @click="changeTab(item.val)">
@ -166,6 +166,18 @@
}, },
mounted() { mounted() {
this.getArticleList(); this.getArticleList();
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this);
query
.select(".my-main")
.boundingClientRect((data) => {
console.log("得到布局位置信息" + JSON.stringify(data));
console.log("节点离页面顶部的距离为" + data.top);
})
.exec();
})
}, },
methods: { methods: {
changeTab(e) { changeTab(e) {
@ -280,6 +292,11 @@
} }
.tabs { .tabs {
position: sticky;
top: 0;
z-index: 900;
background: #fff;
padding-bottom: 20rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;

View File

@ -6,9 +6,20 @@
.wholeSale { .wholeSale {
background-color: #f8fafb !important; background-color: #f8fafb !important;
.wholeSale-header-wrap {
background-color: #40AE36;
}
.wholeSale-header-search-wrap {
padding: 30rpx 20rpx 0;
background-color: #fff;
}
.wholeSale-header { .wholeSale-header {
position: sticky;
top: 0;
z-index: 100;
margin-bottom: 20rpx; margin-bottom: 20rpx;
// background-color: #40AE36;
.scrollview { .scrollview {
display: flex; display: flex;
@ -45,239 +56,224 @@
.wholeSale-con { .wholeSale-con {
margin: 0 20rpx; margin: 0 20rpx;
padding-bottom: 30rpx;
}
.wholeSale-nav { .wholeSale-nav {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 40rpx; margin-bottom: 40rpx;
.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; border-radius: 80rpx;
border-radius: 80rpx; background: #EDEFF2;
background: #EDEFF2; position: relative;
position: relative; box-sizing: border-box;
box-sizing: border-box;
.search_content_wrap { .search_content_wrap {
width: 100%;
.icon-sousuo {
font-size: 26.32rpx;
font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
input {
width: 80%;
}
}
.search_btn {
width: 106rpx;
height: 60rpx;
line-height: 60rpx;
background: #40AE36;
border-radius: 100px;
font-size: 28rpx;
color: #fff;
}
}
.category {
width: 100%; width: 100%;
overflow: auto;
margin-bottom: 20rpx;
.category-wrap { .icon-sousuo {
display: flex; font-size: 26.32rpx;
padding-bottom: 20rpx; font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
.category-item { input {
display: flex; width: 80%;
flex-direction: column;
justify-content: center;
align-items: center;
margin-right: 38rpx;
text {
margin-top: 16rpx;
font-size: 24rpx;
color: #666666;
white-space: nowrap;
}
.category-item-text {
width: 120rpx;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.category-item-active {
position: relative;
.category-item-img {
border: 2px solid #40AE36;
border-radius: 50%;
}
text {
background-color: #40AE36;
color: #fff;
padding: 2rpx 10rpx 6rpx 10rpx;
border-radius: 50rpx;
}
}
} }
} }
.cate { .search_btn {
width: 100%; width: 106rpx;
overflow: auto; height: 60rpx;
margin-bottom: 30rpx; line-height: 60rpx;
background: #40AE36;
.cate-wrap { border-radius: 100px;
display: flex; font-size: 28rpx;
padding-bottom: 8rpx; color: #fff;
.cate-item {
text {
padding: 4rpx 16rpx;
white-space: nowrap;
font-size: 30rpx;
color: #333;
}
}
.cate-item-active {
text {
color: #40AE36;
font-weight: bold;
}
}
}
} }
}
.comprehensive { .category {
width: 100%;
overflow: auto;
margin-bottom: 20rpx;
.category-wrap {
display: flex; display: flex;
justify-content: space-between; padding-bottom: 20rpx;
align-items: center;
padding: 0 50rpx;
[class^=comprehensive-] { .category-item {
display: flex; display: flex;
flex-direction: column;
justify-content: center;
align-items: center; align-items: center;
margin-right: 38rpx;
text { text {
margin-right: 12rpx; margin-top: 16rpx;
font-size: 26rpx; font-size: 24rpx;
color: #666666; color: #666666;
white-space: nowrap;
} }
image { .category-item-text {
width: 28rpx; width: 120rpx;
height: 28rpx; text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.category-item-active {
position: relative;
.category-item-img {
border: 2px solid #40AE36;
border-radius: 50%;
} }
.loudou { text {
width: 24rpx; background-color: #40AE36;
height: 24rpx; color: #fff;
padding: 2rpx 10rpx 6rpx 10rpx;
border-radius: 50rpx;
} }
} }
} }
} }
.cate {
width: 100%;
overflow: auto;
margin-bottom: 30rpx;
.cate-wrap {
display: flex;
padding-bottom: 8rpx;
.cate-item {
text {
padding: 4rpx 16rpx;
white-space: nowrap;
font-size: 30rpx;
color: #333;
}
}
.cate-item-active {
text {
color: #40AE36;
font-weight: bold;
}
}
}
}
.comprehensive {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 50rpx;
[class^=comprehensive-] {
display: flex;
align-items: center;
text {
margin-right: 12rpx;
font-size: 26rpx;
color: #666666;
}
image {
width: 28rpx;
height: 28rpx;
}
.loudou {
width: 24rpx;
height: 24rpx;
}
}
}
} }
</style> </style>
<template> <template>
<view class="wholeSale"> <view class="wholeSale">
<!-- 顶部 --> <!-- 顶部 -->
<view class="wholeSale-header" style="position: fixed;top: 0;left: 0;width: 100%;z-index: 999;"> <view class="wholeSale-header">
<!-- 适配不同机 --> <view class="wholeSale-header-wrap">
<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="height: var(--status-bar-height);background-color: #40af37;"></view>
<view style="display: flex;font-weight: bold;font-size: 32rpx;"><u-icon style="margin-right: 20rpx;" <view style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;">
name="arrow-left" size="20" color="#fff" @click="navBack"></u-icon>里海云仓</view> <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-header-search-wrap">
<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>
<!-- 商品小分类 -->
<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>
</view> </view>
<!-- 内容 --> <!-- 内容 -->
<view class="wholeSale-con" style="padding-top: calc(var(--status-bar-height) + 100rpx);"> <view class="wholeSale-con">
<view class="wholeSale-nav">
<!-- <u-icon class="icon" name="arrow-left" size="20" @click="navBack"></u-icon> -->
<!-- 搜索 -->
<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>
<!-- <button class="search_btn">搜索</button> -->
</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>
<!-- 商品小分类 -->
<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 class="comprehensive">
<view class="comprehensive-price">
<text>价格</text>
<image src="@/static/new_define/priceChange.png"></image>
</view>
<view class="comprehensive-sales_num">
<text>销量</text>
</view>
<view class="comprehensive-discount">
<text>抵扣</text>
<image class="loudou" src="@/static/new_define/loudou.png"></image>
</view>
</view> -->
<!-- 流水瀑布 --> <!-- 流水瀑布 -->
<WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" /> <WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" />
<loadmore :type="isLoading"></loadmore> <loadmore :type="isLoading"></loadmore>

View File

@ -6,9 +6,20 @@
.wholeSale { .wholeSale {
background-color: #f8fafb !important; background-color: #f8fafb !important;
.wholeSale-header-wrap {
background-color: #40AE36;
}
.wholeSale-header-search-wrap {
padding: 30rpx 20rpx 0;
background-color: #fff;
}
.wholeSale-header { .wholeSale-header {
position: sticky;
top: 0;
z-index: 100;
margin-bottom: 20rpx; margin-bottom: 20rpx;
// background-color: #40AE36;
.scrollview { .scrollview {
display: flex; display: flex;
@ -43,164 +54,165 @@
} }
} }
.wholeSale-con { .wholeSale-nav {
margin: 0 20rpx; display: flex;
align-items: center;
margin-bottom: 40rpx;
.wholeSale-nav { .icon {
display: flex; margin-right: 20rpx;
align-items: center;
margin-bottom: 40rpx;
.icon {
margin-right: 20rpx;
}
} }
}
.search_content { .search_content {
// margin-bottom: 40rpx; // margin-bottom: 40rpx;
flex: 1; flex: 1;
height: 70rpx; height: 70rpx;
padding: 2px 2px 2px 21.05rpx; padding: 2px 2px 2px 21.05rpx;
border-radius: 80rpx; border-radius: 80rpx;
background: #EDEFF2; background: #EDEFF2;
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
.search_content_wrap { .search_content_wrap {
width: 100%;
.icon-sousuo {
font-size: 26.32rpx;
font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
input {
width: 80%;
}
}
.search_btn {
width: 106rpx;
height: 60rpx;
line-height: 60rpx;
background: #40AE36;
border-radius: 100px;
font-size: 28rpx;
color: #fff;
}
}
.category {
width: 100%; width: 100%;
overflow: auto;
margin-bottom: 20rpx;
.category-wrap { .icon-sousuo {
display: flex; font-size: 26.32rpx;
padding-bottom: 20rpx; font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
.category-item { input {
display: flex; width: 80%;
flex-direction: column;
justify-content: center;
align-items: center;
margin-right: 38rpx;
text {
margin-top: 16rpx;
font-size: 24rpx;
color: #666666;
white-space: nowrap;
}
.category-item-text {
width: 120rpx;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.category-item-active {
position: relative;
.category-item-img {
border: 2px solid #40AE36;
border-radius: 50%;
}
text {
background-color: #40AE36;
color: #fff;
padding: 2rpx 10rpx 6rpx 10rpx;
border-radius: 50rpx;
}
}
} }
} }
.cate { .search_btn {
width: 100%; width: 106rpx;
overflow: auto; height: 60rpx;
margin-bottom: 30rpx; line-height: 60rpx;
background: #40AE36;
.cate-wrap { border-radius: 100px;
display: flex; font-size: 28rpx;
padding-bottom: 8rpx; color: #fff;
.cate-item {
text {
padding: 4rpx 16rpx;
white-space: nowrap;
font-size: 30rpx;
color: #333;
}
}
.cate-item-active {
text {
color: #40AE36;
font-weight: bold;
}
}
}
} }
}
.comprehensive { .category {
width: 100%;
overflow: auto;
margin-bottom: 20rpx;
.category-wrap {
display: flex; display: flex;
justify-content: space-between; padding-bottom: 20rpx;
align-items: center;
padding: 0 50rpx;
[class^=comprehensive-] { .category-item {
display: flex; display: flex;
flex-direction: column;
justify-content: center;
align-items: center; align-items: center;
margin-right: 38rpx;
text { text {
margin-right: 12rpx; margin-top: 16rpx;
font-size: 26rpx; font-size: 24rpx;
color: #666666; color: #666666;
white-space: nowrap;
} }
image { .category-item-text {
width: 28rpx; width: 120rpx;
height: 28rpx; text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.category-item-active {
position: relative;
.category-item-img {
border: 2px solid #40AE36;
border-radius: 50%;
} }
.loudou { text {
width: 24rpx; background-color: #40AE36;
height: 24rpx; color: #fff;
padding: 2rpx 10rpx 6rpx 10rpx;
border-radius: 50rpx;
} }
} }
} }
}
.cate {
width: 100%;
overflow: auto;
margin-bottom: 30rpx;
.cate-wrap {
display: flex;
padding-bottom: 8rpx;
.cate-item {
text {
padding: 4rpx 16rpx;
white-space: nowrap;
font-size: 30rpx;
color: #333;
}
}
.cate-item-active {
text {
color: #40AE36;
font-weight: bold;
}
}
}
}
.comprehensive {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 50rpx;
[class^=comprehensive-] {
display: flex;
align-items: center;
text {
margin-right: 12rpx;
font-size: 26rpx;
color: #666666;
}
image {
width: 28rpx;
height: 28rpx;
}
.loudou {
width: 24rpx;
height: 24rpx;
}
}
}
.wholeSale-con {
margin: 0 20rpx;
} }
.goods_list { .goods_list {
padding-bottom: 30rpx;
.goods { .goods {
width: 710rpx; width: 710rpx;
height: 200rpx; height: 200rpx;
@ -296,7 +308,7 @@
position: absolute; position: absolute;
top: 70rpx; top: 70rpx;
right: -10rpx; right: -10rpx;
// background-color: rgba(#000, 0.7); z-index: 101;
width: 250rpx; width: 250rpx;
padding: 20rpx; padding: 20rpx;
padding-top: 30rpx; padding-top: 30rpx;
@ -326,66 +338,64 @@
<view class="wholeSale"> <view class="wholeSale">
<!-- 顶部 --> <!-- 顶部 -->
<view class="wholeSale-header" style="position: fixed;top: 0;left: 0;width: 100%;z-index: 999;"> <view class="wholeSale-header">
<!-- 适配不同机 --> <view class="wholeSale-header-wrap">
<view style="height: var(--status-bar-height);background-color: #40af37;"></view> <!-- 适配不同机 -->
<view <view style="height: var(--status-bar-height);background-color: #40af37;"></view>
style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;justify-content: space-between;">
<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 style="display: flex;position: relative;" @click="changeMap">
<view
style="width: 250rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;text-align: right;">
{{street}}
</view>
<u-icon name="arrow-down" size="14" color="#fff"></u-icon>
<view class="position-address" v-if="isShowAddress" @click.stop="">
<u-icon class="icon" name="close" size="14" @click="closeShowAddress" color="#fff"></u-icon>
<view class="title">
<view>开启定位服务</view>
<view>查看附近商铺</view>
</view>
<view class="btn" @click.stop="getLocation">立即开启</view>
</view>
</view>
</view>
</view>
<!-- 内容 -->
<view class="wholeSale-con" style="padding-top: calc(var(--status-bar-height) + 100rpx);">
<view class="wholeSale-nav">
<!-- <u-icon class="icon" name="arrow-left" size="20" @click="navBack"></u-icon> -->
<!-- 搜索 -->
<view <view
@click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}&shop=true`)" style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;justify-content: space-between;">
hover-class="none" class="search_content flex_a_c_j_sb"> <view style="display: flex;font-weight: bold;font-size: 32rpx;"><u-icon style="margin-right: 20rpx;"
<view class="flex_a_c search_content_wrap"> name="arrow-left" size="20" color="#fff" @click="navBack"></u-icon>供销综合云市场</view>
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view> <view style="display: flex;position: relative;" @click="changeMap">
<input type="text" placeholder="搜索店铺名称" :value="where.keyword" <view
placeholder-style="font-size: 30rpx;color:#999;" disabled style="pointer-events: none;"> style="width: 250rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;text-align: right;">
{{street}}
</view>
<u-icon name="arrow-down" size="14" color="#fff"></u-icon>
<view class="position-address" v-if="isShowAddress" @click.stop="">
<u-icon class="icon" name="close" size="14" @click="closeShowAddress" color="#fff"></u-icon>
<view class="title">
<view>开启定位服务</view>
<view>查看附近商铺</view>
</view>
<view class="btn" @click.stop="getLocation">立即开启</view>
</view>
</view> </view>
<!-- <button class="search_btn">搜索</button> -->
</view> </view>
</view> </view>
<!-- 商品大分类 --> <view class="wholeSale-header-search-wrap">
<view class="category"> <view class="wholeSale-nav">
<scroll-view scroll-x="true"> <view
<view class="category-wrap"> @click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}&shop=true`)"
<block v-for="(item,index) in store_category" :key="index"> hover-class="none" class="search_content flex_a_c_j_sb">
<view class="category-item" :class="{'category-item-active': index==cate_change}" <view class="flex_a_c search_content_wrap">
@click="changeCate(index)"> <view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
<u--image class="category-item-img" width="108rpx" :src="item.background" <input type="text" placeholder="搜索店铺名称" :value="where.keyword"
height="108rpx" shape="circle"> placeholder-style="font-size: 30rpx;color:#999;" disabled style="pointer-events: none;">
<template v-slot:loading> </view>
<u-loading-icon color="#999" size="15" />
</template>
</u--image>
<text class="category-item-text">{{item.category_name}}</text>
</view>
</block>
</view> </view>
</scroll-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.background"
height="108rpx" shape="circle">
<template v-slot:loading>
<u-loading-icon color="#999" size="15" />
</template>
</u--image>
<text class="category-item-text">{{item.category_name}}</text>
</view>
</block>
</view>
</scroll-view>
</view>
</view> </view>
</view> </view>
@ -393,8 +403,6 @@
<view class="goods_list"> <view class="goods_list">
<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">
<!-- <image style="width: 100%;height: 100%;" :src="item.mer_avatar" mode="aspectFill" lazy-load>
</image> -->
<u--image width="160rpx" height="160rpx" :src="item.mer_avatar" mode="aspectFill"> <u--image width="160rpx" height="160rpx" :src="item.mer_avatar" mode="aspectFill">
<template v-slot:loading> <template v-slot:loading>
<u-loading-icon color="#999" size="15" /> <u-loading-icon color="#999" size="15" />
@ -637,19 +645,19 @@
uni.$emit('getLocation_succees', { uni.$emit('getLocation_succees', {
street_id, street_id,
}); });
uni.$emit('changeAddress', { uni.$emit('changeAddress', {
addr:{ addr: {
address: res.data.address, address: res.data.address,
location: `${res.data.location.lat},${res.data.location.lng}` location: `${res.data.location.lat},${res.data.location.lng}`
}, },
area: res.data.ad_info.adcode, area: res.data.ad_info.adcode,
latitude: res.data.location.lat, latitude: res.data.location.lat,
longitude: res.data.location.lng, longitude: res.data.location.lng,
street:{ street: {
code: street_id, code: street_id,
name: town name: town
} }
}) })
this.where.location = `${latitude},${longitude}`; this.where.location = `${latitude},${longitude}`;
this.$nextTick(() => { this.$nextTick(() => {
setTimeout(() => { setTimeout(() => {

View File

@ -4,10 +4,22 @@
} }
.wholeSale { .wholeSale {
background-color: #f8fafb !important; background-color: #f8fafb !important;
.wholeSale-header-wrap {
background-color: #40AE36;
}
.wholeSale-header-search-wrap {
padding: 30rpx 20rpx 0;
background-color: #fff;
}
.wholeSale-header { .wholeSale-header {
position: sticky;
top: 0;
z-index: 100;
margin-bottom: 20rpx; margin-bottom: 20rpx;
// background-color: #40AE36;
.scrollview { .scrollview {
display: flex; display: flex;
@ -42,239 +54,233 @@
} }
} }
.wholeSale-con {
margin: 0 20rpx;
.wholeSale-nav{
display: flex;
align-items: center;
margin-bottom: 40rpx;
.icon{
margin-right: 20rpx;
}
}
.search_content {
// margin-bottom: 40rpx;
flex: 1;
height: 70rpx;
padding: 2px 2px 2px 21.05rpx;
border-radius: 80rpx;
background: #EDEFF2;
position: relative;
box-sizing: border-box;
.search_content_wrap {
width: 100%;
.icon-sousuo { .wholeSale-nav {
font-size: 26.32rpx; display: flex;
font-weight: bold; align-items: center;
color: #c8c7c6; margin-bottom: 40rpx;
margin-right: 17.54rpx;
}
input { .icon {
width: 80%; margin-right: 20rpx;
}
}
.search_btn {
width: 106rpx;
height: 60rpx;
line-height: 60rpx;
pic: #40AE36;
border-radius: 100px;
font-size: 28rpx;
color: #fff;
}
} }
}
.category { .search_content {
// margin-bottom: 40rpx;
flex: 1;
height: 70rpx;
padding: 2px 2px 2px 21.05rpx;
border-radius: 80rpx;
background: #EDEFF2;
position: relative;
box-sizing: border-box;
.search_content_wrap {
width: 100%; width: 100%;
overflow: auto;
margin-bottom: 20rpx;
.category-wrap { .icon-sousuo {
display: flex; font-size: 26.32rpx;
padding-bottom: 20rpx; font-weight: bold;
color: #c8c7c6;
.category-item { margin-right: 17.54rpx;
display: flex; }
flex-direction: column;
justify-content: center; input {
align-items: center; width: 80%;
margin-right: 38rpx;
text {
margin-top: 16rpx;
font-size: 24rpx;
color: #666666;
white-space: nowrap;
}
.category-item-text {
width: 120rpx;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.category-item-active {
position: relative;
.category-item-img {
border: 2px solid #40AE36;
border-radius: 50%;
}
text {
background-color: #40AE36;
color: #fff;
padding: 2rpx 10rpx 6rpx 10rpx;
border-radius: 50rpx;
}
}
} }
} }
.cate { .search_btn {
width: 100%; width: 106rpx;
overflow: auto; height: 60rpx;
margin-bottom: 30rpx; line-height: 60rpx;
pic: #40AE36;
.cate-wrap { border-radius: 100px;
display: flex; font-size: 28rpx;
padding-bottom: 8rpx; color: #fff;
.cate-item {
text {
padding: 4rpx 16rpx;
white-space: nowrap;
font-size: 30rpx;
color: #333;
}
}
.cate-item-active {
text {
color: #40AE36;
font-weight: bold;
}
}
}
} }
}
.comprehensive { .category {
width: 100%;
overflow: auto;
margin-bottom: 20rpx;
.category-wrap {
display: flex; display: flex;
justify-content: space-between; padding-bottom: 20rpx;
align-items: center;
padding: 0 50rpx;
[class^=comprehensive-] { .category-item {
display: flex; display: flex;
flex-direction: column;
justify-content: center;
align-items: center; align-items: center;
margin-right: 38rpx;
text { text {
margin-right: 12rpx; margin-top: 16rpx;
font-size: 26rpx; font-size: 24rpx;
color: #666666; color: #666666;
white-space: nowrap;
} }
image { .category-item-text {
width: 28rpx; width: 120rpx;
height: 28rpx; text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.category-item-active {
position: relative;
.category-item-img {
border: 2px solid #40AE36;
border-radius: 50%;
} }
.loudou { text {
width: 24rpx; background-color: #40AE36;
height: 24rpx; color: #fff;
padding: 2rpx 10rpx 6rpx 10rpx;
border-radius: 50rpx;
} }
} }
} }
} }
.cate {
width: 100%;
overflow: auto;
margin-bottom: 30rpx;
.cate-wrap {
display: flex;
padding-bottom: 8rpx;
.cate-item {
text {
padding: 4rpx 16rpx;
white-space: nowrap;
font-size: 30rpx;
color: #333;
}
}
.cate-item-active {
text {
color: #40AE36;
font-weight: bold;
}
}
}
}
.comprehensive {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 50rpx;
[class^=comprehensive-] {
display: flex;
align-items: center;
text {
margin-right: 12rpx;
font-size: 26rpx;
color: #666666;
}
image {
width: 28rpx;
height: 28rpx;
}
.loudou {
width: 24rpx;
height: 24rpx;
}
}
}
.wholeSale-con {
padding-bottom: 30rpx;
margin: 0 20rpx;
}
} }
</style> </style>
<template> <template>
<view class="wholeSale"> <view class="wholeSale">
<!-- 顶部 --> <!-- 顶部 -->
<view class="wholeSale-header" style="position: fixed;top: 0;left: 0;width: 100%;z-index: 999;"> <view class="wholeSale-header">
<!-- 适配不同机 --> <view class="wholeSale-header-wrap">
<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="height: var(--status-bar-height);background-color: #40af37;"></view>
<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 style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;">
</view> <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-header-search-wrap">
<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>
<!-- 商品小分类 -->
<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> </view>
<!-- 内容 --> <!-- 内容 -->
<view class="wholeSale-con" style="padding-top: calc(var(--status-bar-height) + 100rpx);"> <view class="wholeSale-con">
<view class="wholeSale-nav">
<!-- <u-icon class="icon" name="arrow-left" size="20" @click="navBack"></u-icon> -->
<!-- 搜索 -->
<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>
<!-- <button class="search_btn">搜索</button> -->
</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>
<!-- 商品小分类 -->
<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 class="comprehensive">
<view class="comprehensive-price">
<text>价格</text>
<image src="@/static/new_define/priceChange.png"></image>
</view>
<view class="comprehensive-sales_num">
<text>销量</text>
</view>
<view class="comprehensive-discount">
<text>抵扣</text>
<image class="loudou" src="@/static/new_define/loudou.png"></image>
</view>
</view> -->
<!-- 流水瀑布 --> <!-- 流水瀑布 -->
<WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" /> <WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" />
<loadmore :type="isLoading"></loadmore> <loadmore :type="isLoading"></loadmore>
</view> </view>
</view> </view>
</template> </template>
@ -284,108 +290,114 @@
goShopDetail goShopDetail
} from '@/libs/order.js' } from '@/libs/order.js'
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue' import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
import { import {
getCategoryIndexList, getCategoryIndexList,
getProductslist getProductslist
} from "@/api/store.js" } from "@/api/store.js"
export default { export default {
components: { components: {
WaterfallsFlow WaterfallsFlow
}, },
data() { data() {
return { return {
hostProduct: [], hostProduct: [],
store_category: [], // store_category: [], //
store_category_children: [], // store_category_children: [], //
cate_change: 0, cate_change: 0,
cate_change_children: 0, cate_change_children: 0,
isLoading: 0, isLoading: 0,
where: { where: {
page: 1, page: 1,
limit: 20, limit: 20,
cate_pid: '', cate_pid: '',
keyword: '', keyword: '',
mer_type: 3, //1-, 2-, 3- mer_type: 3, //1-, 2-, 3-
sale_type: 1, //1-, 2- sale_type: 1, //1-, 2-
} }
} }
}, },
onLoad(option){ onLoad(option) {
this.getCategoryIndexList(); this.getCategoryIndexList();
this.getProductslist(true); this.getProductslist(true);
}, },
onReachBottom() { onReachBottom() {
this.getProductslist(); this.getProductslist();
}, },
onPageScroll() { onPageScroll() {
uni.$emit('scroll'); uni.$emit('scroll');
}, },
methods: { methods: {
navTo(url){ navTo(url) {
uni.navigateTo({ uni.navigateTo({
url:url, url: url,
success: () => { success: () => {
uni.$once('searchValue', (e)=>{ uni.$once('searchValue', (e) => {
this.$nextTick(()=>{ this.$nextTick(() => {
this.where.keyword = e; this.where.keyword = e;
this.getProductslist(true); this.getProductslist(true);
}) })
}) })
} }
}) })
}, },
navBack(){ navBack() {
uni.navigateBack(); uni.navigateBack();
}, },
tabsChange(e) { tabsChange(e) {
this.tabsCurr = e; this.tabsCurr = e;
}, },
changeCate(e){ changeCate(e) {
this.cate_change = e; this.cate_change = e;
this.store_category_children = [{ this.store_category_children = [{
cate_name: '全部', cate_name: '全部',
store_category_id: '' store_category_id: ''
}]; }];
if(this.store_category[e].children) this.store_category_children = [...this.store_category_children, ...this.store_category[e].children]; if (this.store_category[e].children) this.store_category_children = [...this.store_category_children, ...
this.cate_change_children = 0; this.store_category[e].children
this.where.cate_pid = this.store_category[e].store_category_id; ];
this.getProductslist(true); this.cate_change_children = 0;
}, this.where.cate_pid = this.store_category[e].store_category_id;
changeChildrenCate(e){ this.getProductslist(true);
this.cate_change_children = e; },
this.where.cate_pid = this.store_category_children[e].store_category_id; changeChildrenCate(e) {
if(e==0) this.where.cate_pid = this.store_category[this.cate_change].store_category_id; // , id this.cate_change_children = e;
this.getProductslist(true); 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]
getCategoryIndexList(){ .store_category_id; // , id
getCategoryIndexList({mer_type: this.where.mer_type, sale_type: this.where.sale_type}).then(res=>{ this.getProductslist(true);
this.store_category = [{ },
cate_name: '全部', getCategoryIndexList() {
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/0bc7a202404021652194310.png', getCategoryIndexList({
store_category_id: '' mer_type: this.where.mer_type,
}, ...res.data]; sale_type: this.where.sale_type
this.store_category_children = this.store_category[0].children || []; }).then(res => {
this.store_category_children.unshift({ this.store_category = [{
cate_name: '全部', cate_name: '全部',
store_category_id: '' 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 || [];
getProductslist(reLoad=false){ this.store_category_children.unshift({
if(reLoad){ cate_name: '全部',
this.where.page = 1; store_category_id: ''
this.hostProduct = []; })
this.isLoading = 0; })
} },
if(this.isLoading==-1)return; getProductslist(reLoad = false) {
this.isLoading = 1; if (reLoad) {
getProductslist(this.where).then(res=>{ this.where.page = 1;
this.hostProduct = [...this.hostProduct, ...res.data.list]; this.hostProduct = [];
this.where.page++; this.isLoading = 0;
this.isLoading = 0; }
if(res.data.list.length<this.where.limit) this.isLoading = -1; if (this.isLoading == -1) return;
}) this.isLoading = 1;
}, getProductslist(this.where).then(res => {
this.hostProduct = [...this.hostProduct, ...res.data.list];
this.where.page++;
this.isLoading = 0;
if (res.data.list.length < this.where.limit) this.isLoading = -1;
})
},
goDetail(item) { goDetail(item) {
goShopDetail(item, this.uid).then(res => { goShopDetail(item, this.uid).then(res => {
if (this.isLogin) { if (this.isLogin) {

View File

@ -481,7 +481,7 @@
this.getNav(); this.getNav();
if (that.isLogin) { if (that.isLogin) {
this.getUserInfo(); this.getUserInfo();
this.orderNum();
} else { } else {
// this.userInfo = { // this.userInfo = {
// is_svip: 0 // is_svip: 0
@ -642,39 +642,54 @@
that.is_promoter = res.data.is_promoter; that.is_promoter = res.data.is_promoter;
that.extension_status = res.data.extension_status; that.extension_status = res.data.extension_status;
that.getMyMenus(); that.getMyMenus();
this.orderNum();
}); });
}, },
// //
orderNum() { orderNum() {
let openType = '';
orderData().then(({ orderData().then(({
data data
}) => { }) => {
this.orderMenu.forEach((item, index) => { this.orderMenu.forEach((item, index) => {
switch (item.title) { switch (item.title) {
case '待付款': case '待付款':
item.num = data.noPay item.num = Number(data.noPay) + Number(data.mer_noPay);
if ((data.noPay >= data.mer_noPay) || data.noPay) {
openType = 1;
} else {
openType = 2;
}
item.url = '/pages/users/order_list/index?status=0&openType=' + openType
break break
case '待发货': case '待发货':
item.num = data.noPostage item.num = Number(data.noPostage) + Number(data.mer_noPostage);
if ((data.noPostage >= data.mer_noPostage) || data.noPostage) {
openType = 1;
} else {
openType = 2;
}
item.url = '/pages/users/order_list/index?status=1&openType=' + openType
break break
case '待收货': case '待收货':
let openType = ''; item.num = Number(data.noDeliver) + Number(data.mer_noDeliver);
item.num = Number(data.noDeliver) + Number(data.mer_noDeliver)
if (data.noDeliver > data.mer_noDeliver) if ((data.noDeliver >= data.mer_noDeliver) || data.noDeliver) {
openType = 1; openType = 1;
else } else {
openType = 2; openType = 2;
//
let user = this.$store.state.app.userInfo;
if (!user.mer_info || !user.mer_info.mer_settlement_agree_status || user
.mer_info.mer_settlement_agree_status != 1) {
openType = 1;
} }
item.url = '/pages/users/order_list/index?status=2&openType=' + openType item.url = '/pages/users/order_list/index?status=2&openType=' + openType
break break
case '待评价': case '待评价':
item.num = data.noComment item.num = Number(data.noComment) + Number(data.mer_noComment);
if ((data.noComment >= data.mer_noComment) || data.noComment) {
openType = 1;
} else {
openType = 2;
}
item.url = '/pages/users/order_list/index?status=3&openType=' + openType
break break
case '售后/退款': case '售后/退款':
item.num = data.refund item.num = data.refund

View File

@ -9,8 +9,9 @@
<view class="btn_tab"> <view class="btn_tab">
<view class="tab_item" :class="{'tab_item_active': sale_type==1}" @click="changeSaleType(1)"> <view class="tab_item" :class="{'tab_item_active': sale_type==1}" @click="changeSaleType(1)">
用户订单</view> 用户订单</view>
<view v-if="mer_info.mer_settlement_agree_status||sale_type==2" class="tab_item" <view v-if="(mer_info && mer_info.mer_settlement_agree_status==1)||sale_type==2"
:class="{'tab_item_active': sale_type==2}" @click="changeSaleType(2)">商户订单</view> class="tab_item" :class="{'tab_item_active': sale_type==2}" @click="changeSaleType(2)">商户订单
</view>
</view> </view>
<view class="btn_car" @click="toGwc"> <view class="btn_car" @click="toGwc">
<text class="iconfont icon-gouwuche" style="font-size: 36rpx;"></text> <text class="iconfont icon-gouwuche" style="font-size: 36rpx;"></text>
@ -19,15 +20,15 @@
<view class='nav acea-row row-around new-nav-tab'> <view class='nav acea-row row-around new-nav-tab'>
<view class='item' :class='orderStatus==-1 ? "on": ""' @click="statusClick(-1)"> <view class='item' :class='orderStatus==-1 ? "on": ""' @click="statusClick(-1)">
<view>全部</view> <view>全部</view>
<view class='num'>{{orderData.all || 0}}</view> <view class='num'>{{(sale_type==1?orderData.all:orderData.mer_all) || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==0 ? "on": ""' @click="statusClick(0)"> <view class='item' :class='orderStatus==0 ? "on": ""' @click="statusClick(0)">
<view>待付款</view> <view>待付款</view>
<view class='num'>{{orderData.noPay || 0}}</view> <view class='num'>{{(sale_type==1?orderData.noPay:orderData.mer_noPay) || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==1 ? "on": ""' @click="statusClick(1)"> <view class='item' :class='orderStatus==1 ? "on": ""' @click="statusClick(1)">
<view>待发货</view> <view>待发货</view>
<view class='num'>{{orderData.noPostage || 0}}</view> <view class='num'>{{(sale_type==1?orderData.noPostage:orderData.mer_noPostage) || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==2 ? "on": ""' @click="statusClick(2)"> <view class='item' :class='orderStatus==2 ? "on": ""' @click="statusClick(2)">
<view>待收货</view> <view>待收货</view>
@ -36,11 +37,11 @@
</view> </view>
<view class='item' :class='orderStatus==3 ? "on": ""' @click="statusClick(3)"> <view class='item' :class='orderStatus==3 ? "on": ""' @click="statusClick(3)">
<view>待评价</view> <view>待评价</view>
<view class='num'>{{orderData.noComment || 0}}</view> <view class='num'>{{(sale_type==1?orderData.noComment:orderData.mer_noComment) || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==4 ? "on": ""' @click="statusClick(4)"> <view class='item' :class='orderStatus==4 ? "on": ""' @click="statusClick(4)">
<view>退款/售后</view> <view>退款/售后</view>
<view class='num'>{{orderData.refund || 0}}</view> <view class='num'>{{(sale_type==1?orderData.refund:orderData.mer_refund) || 0}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -83,6 +84,7 @@
<text class="iconfont icon-sousuo"></text> <text class="iconfont icon-sousuo"></text>
搜索我的订单 搜索我的订单
</navigator> </navigator>
<!--定金预售订单--> <!--定金预售订单-->
<view v-if="presellProList.length > 0" class="event_container" <view v-if="presellProList.length > 0" class="event_container"
:style="{ 'background-image': `url(${domain}/static/images/presell_orderBg.png)`}"> :style="{ 'background-image': `url(${domain}/static/images/presell_orderBg.png)`}">
@ -587,17 +589,13 @@
onLoad(options) { onLoad(options) {
if (options.sale_type) this.sale_type = options.sale_type; if (options.sale_type) this.sale_type = options.sale_type;
if (options.status) this.orderStatus = options.status; if (options.status) this.orderStatus = options.status;
if (options.openType && options.openType == 2) this.changeSaleType(2);
let user = this.$store.state.app.userInfo;
if (user.mer_info) this.initMerInfo(user);
if (this.isLogin) { if (this.isLogin) {
this.page = 1; this.page = 1;
this.loadend = false; this.loadend = false;
this.loading = false; this.loading = false;
this.getOrderData(); this.getOrderData();
this.getOrderList(); this.getOrderList();
this.getUserInfo(); this.getUserInfo(options);
this.getpreSellOrderList(); this.getpreSellOrderList();
} else { } else {
toLogin() toLogin()
@ -636,7 +634,7 @@
}, },
methods: { methods: {
// //
handleCopy() { handleCopy() {
let that = this; let that = this;
uni.setClipboardData({ uni.setClipboardData({
@ -664,28 +662,17 @@
navBack() { navBack() {
uni.navigateBack(); uni.navigateBack();
}, },
initMerInfo(user) {
this.mer_info = user;
if (this.mer_info.mer_settlement_agree_status) {
this.payMode.forEach(item => {
if (item.value == 'merBalance') {
item.payStatus = 1;
item.number = this.mer_info.mer_money;
}
})
}
},
changeSaleType(type = 1) { changeSaleType(type = 1) {
this.loadend = false; this.loadend = false;
this.loading = false; this.loading = false;
this.$set(this, 'orderList', []); this.$set(this, 'orderList', []);
if (type != this.sale_type) {
if (this.orderStatus == 4) { if (this.orderStatus == 4) {
this.refundParam.identity = type; this.refundParam.identity = type;
this.refundParam.page = 1; this.refundParam.page = 1;
this.getRefundList(); this.getRefundList();
} else { } else {
if (type != this.sale_type) {
this.sale_type = type; this.sale_type = type;
this.page = 1; this.page = 1;
this.getOrderData(); this.getOrderData();
@ -717,24 +704,34 @@
* 获取用户信息 * 获取用户信息
* *
*/ */
getUserInfo: function() { getUserInfo: function(options) {
let that = this; let that = this;
getUserInfo().then(res => { getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money; that.payMode[2].number = res.data.now_money;
if (res.data.mer_info) that.initMerInfo(res.data.mer_info); if (res.data.mer_info) that.initMerInfo(res.data.mer_info, options);
}); });
}, },
/**
* 关闭支付组件 initMerInfo(user, options) {
* this.mer_info = user;
*/ if (user && user.mer_settlement_agree_status) {
this.payMode.forEach(item => {
if (item.value == 'merBalance') {
item.payStatus = 1;
item.number = this.mer_info.mer_money;
}
});
//opentype=2
if (options && options.openType && options.openType == 2) this.changeSaleType(2);
}
},
//
payClose: function() { payClose: function() {
this.pay_close = false; this.pay_close = false;
}, },
/**
* 获取订单统计数据 //
*
*/
getOrderData: function() { getOrderData: function() {
let that = this; let that = this;
orderData({ orderData({
@ -743,10 +740,8 @@
that.$set(that, 'orderData', res.data); that.$set(that, 'orderData', res.data);
}) })
}, },
/**
* 取消订单 //
*
*/
cancelOrder: function(index, order_id) { cancelOrder: function(index, order_id) {
let that = this; let that = this;
if (!order_id) return that.$util.Tips({ if (!order_id) return that.$util.Tips({
@ -768,10 +763,8 @@
}); });
}); });
}, },
/**
* 打开支付组件 //
*
*/
goPay: function(pay_price, order_id) { goPay: function(pay_price, order_id) {
this.$set(this, 'pay_close', true); this.$set(this, 'pay_close', true);
this.order_id = order_id; this.order_id = order_id;
@ -797,10 +790,7 @@
}); });
}, },
/** //
* 支付成功回调
*
*/
pay_complete: function() { pay_complete: function() {
this.loadend = false; this.loadend = false;
this.page = 1; this.page = 1;
@ -810,18 +800,14 @@
this.getOrderData(); this.getOrderData();
this.getOrderList(); this.getOrderList();
}, },
/**
* 支付失败回调 //
*
*/
pay_fail: function() { pay_fail: function() {
this.pay_close = false; this.pay_close = false;
this.pay_order_id = ''; this.pay_order_id = '';
}, },
/** //
* 去订单详情
*/
goOrderDetails: function(order_id) { goOrderDetails: function(order_id) {
let self = this let self = this
if (!order_id) return that.$util.Tips({ if (!order_id) return that.$util.Tips({
@ -861,9 +847,7 @@
// #endif // #endif
}, },
/** //
* 点击去评价
*/
goOrderDetails_Evaluation: function(order_id) { goOrderDetails_Evaluation: function(order_id) {
let self = this let self = this
if (!order_id) return that.$util.Tips({ if (!order_id) return that.$util.Tips({
@ -893,9 +877,7 @@
// #endif // #endif
}, },
/** //
* 切换类型
*/
statusClick: function(status) { statusClick: function(status) {
this.loadend = false; this.loadend = false;
this.loading = false; this.loading = false;
@ -919,21 +901,23 @@
// 退 // 退
getRefundList() { getRefundList() {
let that = this; let that = this;
console.log(that.loadend);
console.log(that.loading);
if (that.loadend) return; if (that.loadend) return;
if (that.loading) return; if (that.loading) return;
that.loading = true; that.loading = true;
that.loadTitle = "加载更多"; that.loadTitle = "加载更多";
refundListNew(this.refundParam).then(res => { refundListNew(this.refundParam).then(res => {
let list = res.data.list || []; let list = res.data.list || [];
let loadend = list.length < that.limit; let loadend = list.length < that.refundParam.limit;
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that that.orderList = that.refundParam.page == 1 ? list : that.$util.SplitArray(list, that
.orderList); .orderList);
that.$set(that, 'orderList', that.orderList); that.$set(that, 'orderList', that.orderList);
that.getProductCount(); that.getProductCount();
that.loadend = loadend; that.loadend = loadend;
that.loading = false; that.loading = false;
that.loadTitle = loadend ? "我也是有底线的" : '加载更多'; that.loadTitle = loadend ? "我也是有底线的" : '加载更多';
that.page = that.page + 1; that.refundParam.page = that.refundParam.page + 1;
that.isReady = true; that.isReady = true;
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}).catch(err => { }).catch(err => {
@ -971,9 +955,7 @@
}); });
}, },
/** //
* 获取订单列表
*/
getOrderList: function() { getOrderList: function() {
let that = this; let that = this;
if (that.loadend) return; if (that.loadend) return;
@ -1028,9 +1010,8 @@
} }
} }
}, },
/**
* 获取定金预售订单列表 //
*/
getpreSellOrderList: function() { getpreSellOrderList: function() {
let that = this; let that = this;
getOrderList({ getOrderList({
@ -1044,9 +1025,8 @@
that.$set(that, 'presellProList', list); that.$set(that, 'presellProList', list);
}) })
}, },
/**
* 获取单个订单商品数量 //
*/
getProductCount: function() { getProductCount: function() {
if (this.orderStatus !== 0) { if (this.orderStatus !== 0) {
this.orderList.forEach((item, i) => { this.orderList.forEach((item, i) => {
@ -1060,9 +1040,8 @@
}) })
} }
}, },
/**
* 删除订单 //
*/
delOrder: function(order_id, index) { delOrder: function(order_id, index) {
let that = this; let that = this;
orderDel(order_id).then(res => { orderDel(order_id).then(res => {
@ -1080,6 +1059,7 @@
}); });
}) })
}, },
// //
confirmOrder: function(item, index) { confirmOrder: function(item, index) {
let that = this; let that = this;
@ -1105,6 +1085,7 @@
} }
}) })
}, },
/*申请开票*/ /*申请开票*/
applyInvoice(order_id) { applyInvoice(order_id) {
let that = this; let that = this;
@ -1114,11 +1095,13 @@
that.$refs.addInvoicing.getInvoiceDefault(); that.$refs.addInvoicing.getInvoiceDefault();
that.$refs.addInvoicing.getInvoiceList(); that.$refs.addInvoicing.getInvoiceList();
}, },
// //
changeInvoiceClose: function(data) { changeInvoiceClose: function(data) {
if (data) this.getInvoiceData(data); if (data) this.getInvoiceData(data);
this.$set(this.invoice, 'invoice', false); this.$set(this.invoice, 'invoice', false);
}, },
// //
getInvoiceData(data) { getInvoiceData(data) {
let that = this let that = this

View File

@ -1,428 +1,145 @@
<style lang="scss" scoped>
page {
background-color: #F8F9FA;
}
.wholeSale {
.wholeSale-header {
margin-bottom: 20rpx;
background-color: #40AE36;
.scrollview {
display: flex;
align-items: center;
height: 98rpx;
padding-left: 32rpx;
.scrollview-item {
margin-right: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
}
.scrollview-active {
position: relative;
font-weight: bold;
font-size: 36rpx;
color: #FFFFFF;
&::after {
content: "";
display: inline-block;
position: absolute;
bottom: -6rpx;
left: 50%;
transform: translateX(-50%);
width: 100%;
height: 6rpx;
background-color: #FFFFFF;
}
}
}
}
.wholeSale-con {
margin: 0 10px;
.search_content {
margin-bottom: 40rpx;
height: 70rpx;
padding: 2px 2px 2px 21.05rpx;
border-radius: 80rpx;
background: #EDEFF2;
position: relative;
box-sizing: border-box;
.search_content_wrap {
width: 100%;
.icon-sousuo {
font-size: 26.32rpx;
font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
input {
width: 80%;
}
}
.search_btn {
width: 106rpx;
height: 60rpx;
line-height: 60rpx;
background: #40AE36;
border-radius: 100px;
font-size: 28rpx;
color: #fff;
}
}
.category {
width: 100%;
overflow: auto;
margin-bottom: 20rpx;
.category-wrap {
display: flex;
padding-bottom: 20rpx;
.category-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-right: 38rpx;
text {
margin-top: 16rpx;
font-size: 24rpx;
color: #666666;
white-space: nowrap;
}
.category-item-text {
width: 120rpx;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.category-item-active {
position: relative;
.category-item-img {
border: 2px solid #40AE36;
border-radius: 50%;
}
text {
background-color: #40AE36;
color: #fff;
padding: 2rpx 10rpx 6rpx 10rpx;
border-radius: 50rpx;
}
}
}
}
.cate {
width: 100%;
overflow: auto;
margin-bottom: 30rpx;
.cate-wrap {
display: flex;
padding-bottom: 8rpx;
.cate-item {
text {
padding: 4rpx 16rpx;
white-space: nowrap;
font-size: 30rpx;
color: #333;
}
}
.cate-item-active {
text {
color: #40AE36;
font-weight: bold;
}
}
}
}
.comprehensive {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 50rpx;
[class^=comprehensive-] {
display: flex;
align-items: center;
text {
margin-right: 12rpx;
font-size: 26rpx;
color: #666666;
}
image {
width: 28rpx;
height: 28rpx;
}
.loudou {
width: 24rpx;
height: 24rpx;
}
}
.comp-color {
text {
margin-right: 12rpx;
font-size: 26rpx;
color: #40ae36 !important;
}
}
}
}
}
.pictrue {
display: flex;
flex-direction: column;
align-items: center;
color: #999;
image {
width: 414rpx;
height: 305rpx;
}
}
.goods_list {
.goods {
// width: 690rpx;
height: 200rpx;
margin: 20rpx auto;
margin-top: 0;
background-color: #fff;
border-radius: 24rpx;
display: flex;
.avatar {
height: 160rpx;
width: 160rpx;
margin: 20rpx;
border-radius: 12rpx;
overflow: hidden;
position: relative;
}
.content {
margin: 20rpx 0;
width: 520rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.content-head {
width: 500rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
font-size: 28rpx;
color: #333;
.title {
width: 360rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.content-two {
display: flex;
font-size: 24rpx;
color: #666;
align-items: center;
.star {
position: relative;
width: 111rpx;
height: 19rpx;
margin-right: 10rpx;
background: url(../columnGoods/images/star.png) left top/100% 100% no-repeat;
overflow: hidden;
view {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(../columnGoods/images/star_active.png) left top/111rpx 19rpx no-repeat;
&.star_purple {
background: url(../columnGoods/images/star_active_purple.png) left top/111rpx 19rpx no-repeat;
}
}
}
}
}
}
}
</style>
<template> <template>
<view class="wholeSale"> <view class="wholeSale">
<!-- 顶部 --> <!-- 顶部 -->
<view class="wholeSale-header" style="position: fixed;top: 0;left: 0;width: 100%;z-index: 999;"> <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>
<!-- 滚动tab --> <!-- 滚动tab -->
<scroll-view scroll-x="true" :scroll-top="100" :show-scrollbar="false" scroll-into-view="a1"> <scroll-view scroll-x="true" :scroll-top="100" :show-scrollbar="false" scroll-into-view="a1">
<view class="scrollview"> <view class="scrollview">
<block v-for="(item,indx) in tabsArr" :key="indx"> <block v-for="(item,indx) in tabsArr" :key="indx">
<view class="scrollview-item" :id="'a' + indx" <view class="scrollview-item" :id="'a' + indx"
:class="{'scrollview-active':tabsCurr == item.val}" @click="tabsChange(item.val)"> :class="{'scrollview-active':tabsCurr == item.val}" @click="tabsChange(item.val)">
{{item.name}} {{item.name}}
</view>
</block>
</view>
</scroll-view>
</view>
<view class="wholeSale-header-search-wrap">
<u-subsection v-if="tabsCurr==2" :list="subList" @change="changeSub" :current="subCurr"
mode="subsection" activeColor="#40ae36" fontSize="14" style="margin-bottom: 24rpx;"></u-subsection>
<view class="wholeSale-nav">
<view
@click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}&shop=${subCurr!=1 || (subCurr==1 && tabsCurr!=2) ? false : true}`)"
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="subCurr!=1 || (subCurr==1 && tabsCurr!=2) ? '搜索您需要批发进货的产品名称': '搜索店铺名称'"
:value="where.keyword" placeholder-style="font-size: 30rpx;color:#999;" disabled
style="pointer-events: none;">
</view> </view>
</block> <!-- <button class="search_btn">搜索</button> -->
</view>
</view> </view>
</scroll-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)">
<block v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)">
<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>
</block>
<block v-else>
<u--image class="category-item-img" width="108rpx" :src="item.background"
height="108rpx" shape="circle">
<template v-slot:loading>
<u-loading-icon color="#999" size="15" />
</template>
</u--image>
<text class="category-item-text">{{item.category_name}}</text>
</block>
</view>
</block>
</view>
</scroll-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 class="comprehensive" v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)">
<view class="comprehensive-price" :class="{'comp-color': orderCurr==1}"
@click="toOrder('price', 1)">
<text>价格</text>
<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'">
</image>
<view v-else style="width: 15rpx;height: 21rpx;"></view>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': orderCurr==2}"
@click="toOrder('sales', 2)">
<text>销量</text>
</view>
<view class="comprehensive-discount" :class="{'comp-color': orderCurr==3}" v-if="tabsCurr!=1"
@click="toOrder('', 3)">
<text>综合</text>
</view>
<view class="comprehensive-discount" v-else @click="deduction_rate=!deduction_rate;">
<text>抵扣</text>
<image class="loudou" src="@/static/new_define/loudou.png"></image>
</view>
</view>
<!-- 综合查询 -->
<view class="comprehensive" v-if="deduction_rate && tabsCurr==1">
<view class="comprehensive-sales_num" :class="{'comp-color': where.deduction_rate==''}"
@click="changeDeduction('')">
<text>全部</text>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': where.deduction_rate=='10'}"
@click="changeDeduction('10')">
<text>1:9</text>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': where.deduction_rate=='15'}"
@click="changeDeduction('15')">
<text>2:8</text>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': where.deduction_rate=='20'}"
@click="changeDeduction('20')">
<text>3:7</text>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': where.deduction_rate=='25'}"
@click="changeDeduction('25')">
<text>4:6</text>
</view>
</view>
</view>
</view> </view>
<!-- 内容 --> <!-- 内容 style="padding-top: calc(var(--status-bar-height) + 120rpx);" -->
<view class="wholeSale-con" style="padding-top: calc(var(--status-bar-height) + 120rpx);"> <view class="wholeSale-con">
<u-subsection v-if="tabsCurr==2" :list="subList" @change="changeSub" :current="subCurr" mode="subsection"
activeColor="#40ae36" fontSize="14" style="margin-bottom: 24rpx;"></u-subsection>
<view class="wholeSale-nav">
<!-- <u-icon class="icon" name="arrow-left" size="20" @click="navBack"></u-icon> -->
<!-- 搜索 -->
<view
@click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}&shop=${subCurr!=1 || (subCurr==1 && tabsCurr!=2) ? false : true}`)"
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="subCurr!=1 || (subCurr==1 && tabsCurr!=2) ? '搜索您需要批发进货的产品名称': '搜索店铺名称'"
:value="where.keyword" placeholder-style="font-size: 30rpx;color:#999;" disabled
style="pointer-events: none;">
</view>
<!-- <button class="search_btn">搜索</button> -->
</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)">
<block v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)">
<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>
</block>
<block v-else>
<u--image class="category-item-img" width="108rpx" :src="item.background"
height="108rpx" shape="circle">
<template v-slot:loading>
<u-loading-icon color="#999" size="15" />
</template>
</u--image>
<text class="category-item-text">{{item.category_name}}</text>
</block>
</view>
</block>
</view>
</scroll-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 class="comprehensive" v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)">
<view class="comprehensive-price" :class="{'comp-color': orderCurr==1}" @click="toOrder('price', 1)">
<text>价格</text>
<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'">
</image>
<view v-else style="width: 15rpx;height: 21rpx;"></view>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': orderCurr==2}"
@click="toOrder('sales', 2)">
<text>销量</text>
</view>
<view class="comprehensive-discount" :class="{'comp-color': orderCurr==3}" v-if="tabsCurr!=1"
@click="toOrder('', 3)">
<text>综合</text>
</view>
<view class="comprehensive-discount" v-else @click="deduction_rate=!deduction_rate;">
<text>抵扣</text>
<image class="loudou" src="@/static/new_define/loudou.png"></image>
</view>
</view>
<!-- 综合查询 -->
<view class="comprehensive" v-if="deduction_rate && tabsCurr==1">
<view class="comprehensive-sales_num" :class="{'comp-color': where.deduction_rate==''}"
@click="changeDeduction('')">
<text>全部</text>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': where.deduction_rate=='10'}"
@click="changeDeduction('10')">
<text>1:9</text>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': where.deduction_rate=='15'}"
@click="changeDeduction('15')">
<text>2:8</text>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': where.deduction_rate=='20'}"
@click="changeDeduction('20')">
<text>3:7</text>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': where.deduction_rate=='25'}"
@click="changeDeduction('25')">
<text>4:6</text>
</view>
</view>
<!-- 流水瀑布 --> <!-- 流水瀑布 -->
<WaterfallsFlow v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)" :wfList='hostProduct' @itemTap="goDetail" <WaterfallsFlow v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)" :wfList='hostProduct' @itemTap="goDetail"
:type="0" :sale_type="2" /> :type="0" :sale_type="2" />
<!-- 列表 --> <!-- 列表 -->
<view class="goods_list" v-else> <view class="goods_list" v-else>
<view class="goods" v-for="(item, index) in shopList" :key="index" @click="goStore(item.mer_id)"> <view class="goods" v-for="(item, index) in shopList" :key="index" @click="goStore(item.mer_id)">
@ -608,7 +325,7 @@
this.initData(true, true); this.initData(true, true);
}, },
onReachBottom() { onReachBottom() {
this.initData(); this.initData(false, true);
}, },
methods: { methods: {
initData(re = false, stop = false) { initData(re = false, stop = false) {
@ -807,4 +524,302 @@
}, },
} }
} }
</script> </script>
<style lang="scss" scoped>
page {
background-color: #F8F9FA;
}
.wholeSale {
.wholeSale-header {
position: sticky;
top: 0;
z-index: 100;
margin-bottom: 20rpx;
.wholeSale-header-wrap {
background-color: #40AE36;
}
.wholeSale-header-search-wrap {
padding: 30rpx 20rpx 0;
background-color: #fff;
}
.scrollview {
display: flex;
align-items: center;
height: 98rpx;
padding-left: 32rpx;
.scrollview-item {
margin-right: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
}
.scrollview-active {
position: relative;
font-weight: bold;
font-size: 36rpx;
color: #FFFFFF;
&::after {
content: "";
display: inline-block;
position: absolute;
bottom: -6rpx;
left: 50%;
transform: translateX(-50%);
width: 100%;
height: 6rpx;
background-color: #FFFFFF;
}
}
}
}
.wholeSale-con {
margin: 0 10px;
}
.search_content {
margin-bottom: 40rpx;
height: 70rpx;
padding: 2px 2px 2px 21.05rpx;
border-radius: 80rpx;
background: #EDEFF2;
position: relative;
box-sizing: border-box;
.search_content_wrap {
width: 100%;
.icon-sousuo {
font-size: 26.32rpx;
font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
input {
width: 80%;
}
}
.search_btn {
width: 106rpx;
height: 60rpx;
line-height: 60rpx;
background: #40AE36;
border-radius: 100px;
font-size: 28rpx;
color: #fff;
}
}
.category {
width: 100%;
overflow: auto;
margin-bottom: 20rpx;
.category-wrap {
display: flex;
padding-bottom: 20rpx;
height: 192rpx;
.category-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-right: 38rpx;
text {
margin-top: 16rpx;
font-size: 24rpx;
color: #666666;
white-space: nowrap;
}
.category-item-text {
width: 120rpx;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.category-item-active {
position: relative;
.category-item-img {
border: 2px solid #40AE36;
border-radius: 50%;
}
text {
background-color: #40AE36;
color: #fff;
padding: 2rpx 10rpx 6rpx 10rpx;
border-radius: 50rpx;
}
}
}
}
.cate {
width: 100%;
overflow: auto;
margin-bottom: 30rpx;
.cate-wrap {
display: flex;
padding-bottom: 8rpx;
.cate-item {
text {
padding: 4rpx 16rpx;
white-space: nowrap;
font-size: 30rpx;
color: #333;
}
}
.cate-item-active {
text {
color: #40AE36;
font-weight: bold;
}
}
}
}
.comprehensive {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 50rpx;
[class^=comprehensive-] {
display: flex;
align-items: center;
text {
margin-right: 12rpx;
font-size: 26rpx;
color: #666666;
}
image {
width: 28rpx;
height: 28rpx;
}
.loudou {
width: 24rpx;
height: 24rpx;
}
}
.comp-color {
text {
margin-right: 12rpx;
font-size: 26rpx;
color: #40ae36 !important;
}
}
}
}
.pictrue {
display: flex;
flex-direction: column;
align-items: center;
color: #999;
image {
width: 414rpx;
height: 305rpx;
}
}
.goods_list {
.goods {
// width: 690rpx;
height: 200rpx;
margin: 20rpx auto;
margin-top: 0;
background-color: #fff;
border-radius: 24rpx;
display: flex;
.avatar {
height: 160rpx;
width: 160rpx;
margin: 20rpx;
border-radius: 12rpx;
overflow: hidden;
position: relative;
}
.content {
margin: 20rpx 0;
width: 520rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.content-head {
width: 500rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
font-size: 28rpx;
color: #333;
.title {
width: 360rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.content-two {
display: flex;
font-size: 24rpx;
color: #666;
align-items: center;
.star {
position: relative;
width: 111rpx;
height: 19rpx;
margin-right: 10rpx;
background: url(../columnGoods/images/star.png) left top/100% 100% no-repeat;
overflow: hidden;
view {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(../columnGoods/images/star_active.png) left top/111rpx 19rpx no-repeat;
&.star_purple {
background: url(../columnGoods/images/star_active_purple.png) left top/111rpx 19rpx no-repeat;
}
}
}
}
}
}
}
</style>