Merge branch 'fk' into dev
This commit is contained in:
commit
11f1a0df0b
@ -3,8 +3,7 @@
|
|||||||
<view v-if="newData.status && newData.status.status" style="height: 100rpx;"></view>
|
<view v-if="newData.status && newData.status.status" style="height: 100rpx;"></view>
|
||||||
<view class="foot" v-if="newData.status && newData.status.status">
|
<view class="foot" v-if="newData.status && newData.status.status">
|
||||||
<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
|
<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
|
||||||
<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index"
|
<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" @click="goRouter(item)">
|
||||||
@click="goRouter(item)">
|
|
||||||
<block v-if="item.link == activeRouter">
|
<block v-if="item.link == activeRouter">
|
||||||
<image :src="item.imgList[0]"></image>
|
<image :src="item.imgList[0]"></image>
|
||||||
<view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}}
|
<view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}}
|
||||||
@ -65,7 +64,6 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -85,9 +83,11 @@
|
|||||||
box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
|
box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
|
||||||
padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
|
padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
|
||||||
padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
|
padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
|
||||||
|
|
||||||
&.filter {
|
&.filter {
|
||||||
filter: blur(2rpx);
|
filter: blur(2rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot-item {
|
.foot-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
@ -95,6 +95,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.count-num {
|
.count-num {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -111,12 +112,14 @@
|
|||||||
padding: 4rpx;
|
padding: 4rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot-item image {
|
.foot-item image {
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
width: 50rpx;
|
width: 50rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot-item .txt {
|
.foot-item .txt {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
:class="{'no-transition':!openTransition,'show-transition':showTransition&&openTransition}"
|
:class="{'no-transition':!openTransition,'show-transition':showTransition&&openTransition}"
|
||||||
@load="handleImgLoad" @error="handleImgError">
|
@load="handleImgLoad" @error="handleImgError">
|
||||||
</image>
|
</image>
|
||||||
<view class="loadfail-img" v-else-if="isLoadError" :style="{ 'background-image': `url(${domain}/static/images/loadfail.png)`}"></view>
|
<view class="loadfail-img" v-else-if="isLoadError"
|
||||||
<view :class="['loading-img','spin-circle',loadingMode]" v-show="!showImg&&!isLoadError" :style="{ 'background-image': `url(${domain}/static/images/loading.gif)`}"></view>
|
:style="{ 'background-image': `url(${domain}/static/easy-loadimage/loadfail.png)`}"></view>
|
||||||
|
<view :class="['loading-img','spin-circle',loadingMode]" v-show="!showImg&&!isLoadError"
|
||||||
|
:style="{ 'background-image': `url(${domain}/static/easy-loadimage/loading.gif)`}"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -18,14 +20,19 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
import { throttle } from '@/libs/uniApi';
|
import {
|
||||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
throttle
|
||||||
|
} from '@/libs/uniApi';
|
||||||
|
import {
|
||||||
|
HTTP_REQUEST_URL
|
||||||
|
} from '@/config/app';
|
||||||
// 生成全局唯一id
|
// 生成全局唯一id
|
||||||
function generateUUID() {
|
function generateUUID() {
|
||||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
||||||
let r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
|
let r = Math.random() * 16 | 0,
|
||||||
return v.toString(16);
|
v = c == 'x' ? r : (r & 0x3 | 0x8);
|
||||||
})
|
return v.toString(16);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@ -115,6 +122,7 @@ export default{
|
|||||||
image {
|
image {
|
||||||
will-change: transform
|
will-change: transform
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 渐变过渡效果处理 */
|
/* 渐变过渡效果处理 */
|
||||||
image.origin-img {
|
image.origin-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -122,13 +130,16 @@ export default{
|
|||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
max-height: 360rpx;
|
max-height: 360rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
image.origin-img.show-transition {
|
image.origin-img.show-transition {
|
||||||
transition: opacity .5s;
|
transition: opacity .5s;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
image.origin-img.no-transition {
|
image.origin-img.no-transition {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 加载失败、加载中的占位图样式控制 */
|
/* 加载失败、加载中的占位图样式控制 */
|
||||||
.loadfail-img {
|
.loadfail-img {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -136,25 +147,38 @@ export default{
|
|||||||
background-size: 50%;
|
background-size: 50%;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-img {
|
.loading-img {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 转圈 */
|
/* 转圈 */
|
||||||
.spin-circle {
|
.spin-circle {
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 60%;
|
background-size: 60%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 动态灰色若隐若现 */
|
/* 动态灰色若隐若现 */
|
||||||
.looming-gray {
|
.looming-gray {
|
||||||
animation: looming-gray 1s infinite linear;
|
animation: looming-gray 1s infinite linear;
|
||||||
background-color: #e3e3e3;
|
background-color: #e3e3e3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes looming-gray {
|
@keyframes looming-gray {
|
||||||
0% {background-color:#e3e3e3aa;}
|
0% {
|
||||||
50% {background-color:#e3e3e3;}
|
background-color: #e3e3e3aa;
|
||||||
100% {background-color:#e3e3e3aa;}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
background-color: #e3e3e3;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
background-color: #e3e3e3aa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* 骨架屏1 */
|
/* 骨架屏1 */
|
||||||
.skeleton-1 {
|
.skeleton-1 {
|
||||||
background-color: #e3e3e3;
|
background-color: #e3e3e3;
|
||||||
@ -164,11 +188,13 @@ export default{
|
|||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
animation: skeleton-1 .6s infinite;
|
animation: skeleton-1 .6s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes skeleton-1 {
|
@keyframes skeleton-1 {
|
||||||
to {
|
to {
|
||||||
background-position: 200% 0;
|
background-position: 200% 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 骨架屏2 */
|
/* 骨架屏2 */
|
||||||
.skeleton-2 {
|
.skeleton-2 {
|
||||||
background-image: linear-gradient(-90deg, #fefefe 0%, #e6e6e6 50%, #fefefe 100%);
|
background-image: linear-gradient(-90deg, #fefefe 0%, #e6e6e6 50%, #fefefe 100%);
|
||||||
@ -176,10 +202,10 @@ export default{
|
|||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
animation: skeleton-2 1.2s ease-in-out infinite;
|
animation: skeleton-2 1.2s ease-in-out infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes skeleton-2 {
|
@keyframes skeleton-2 {
|
||||||
to {
|
to {
|
||||||
background-position: -135% 0;
|
background-position: -135% 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "pages/whole_sale/index",
|
"path": "pages/whole_sale/index",
|
||||||
"style": {
|
"style": {
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarTitleText": "批发",
|
"navigationBarTitleText": "批发",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
@ -341,7 +341,7 @@
|
|||||||
"path": "market/market",
|
"path": "market/market",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "供销云市场",
|
"navigationBarTitleText": "供销云市场",
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": false,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -349,7 +349,7 @@
|
|||||||
"path": "specialty/specialty",
|
"path": "specialty/specialty",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "名优特产",
|
"navigationBarTitleText": "名优特产",
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": false,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,11 @@
|
|||||||
<view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view>
|
<view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view>
|
||||||
<view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view>
|
<view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view>
|
||||||
<view class="con line1" v-if="item.last && item.last.msn_type == 4">[商品]</view>
|
<view class="con line1" v-if="item.last && item.last.msn_type == 4">[商品]</view>
|
||||||
<view class="con line1" v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
|
<view class="con line1"
|
||||||
|
v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-box">
|
<view class="right-box">
|
||||||
<view class="time">{{item.last && item.last.create_time.split(' ')[1] || ''}}</view>
|
<view class="time">{{item.display_time}}</view>
|
||||||
<view class="num" v-if="item.num>0">{{item.num}}</view>
|
<view class="num" v-if="item.num>0">{{item.num}}</view>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
@ -23,18 +24,21 @@
|
|||||||
<block v-if="type == 1 && list.length>0" v-for="(item,index) in list" :key="index">
|
<block v-if="type == 1 && list.length>0" v-for="(item,index) in list" :key="index">
|
||||||
<div class="item acea-row" @click="goPage(item)">
|
<div class="item acea-row" @click="goPage(item)">
|
||||||
<view class="logo">
|
<view class="logo">
|
||||||
<image :src="(item.user && item.user.avatar) ? item.user.avatar : '/static/images/f.png'" mode=""></image>
|
<image :src="(item.user && item.user.avatar) ? item.user.avatar : '/static/images/f.png'"
|
||||||
|
mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="name">{{item.user && item.user.nickname}}</view>
|
<view class="name">{{item.user && item.user.nickname}}</view>
|
||||||
<view class="con line1" v-if="item.last && item.last.msn_type == 1">{{item.last.msn}}</view>
|
<view class="con line1" v-if="item.last && item.last.msn_type == 1">{{item.last.msn}}</view>
|
||||||
<view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view>
|
<view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view>
|
||||||
<view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view>
|
<view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view>
|
||||||
<view class="con line1" v-if="item.last && (item.last.msn_type == 4 || item.last.msn_type == 7)">[商品]</view>
|
<view class="con line1"
|
||||||
<view class="con line1" v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
|
v-if="item.last && (item.last.msn_type == 4 || item.last.msn_type == 7)">[商品]</view>
|
||||||
|
<view class="con line1"
|
||||||
|
v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-box">
|
<view class="right-box">
|
||||||
<view class="time">{{item.last && item.last.create_time.split(' ')[1]}}</view>
|
<view class="time">{{item.display_time}}</view>
|
||||||
<view class="num" v-if="item.num>0">{{item.num}}</view>
|
<view class="num" v-if="item.num>0">{{item.num}}</view>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
@ -57,9 +61,16 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
import emptyPage from '@/components/emptyPage.vue'
|
import emptyPage from '@/components/emptyPage.vue'
|
||||||
|
|
||||||
import { serviceList, serviceUserList } from "@/api/user";
|
import {
|
||||||
import { toLogin } from '@/libs/login.js';
|
serviceList,
|
||||||
import { mapGetters } from "vuex";
|
serviceUserList
|
||||||
|
} from "@/api/user";
|
||||||
|
import {
|
||||||
|
toLogin
|
||||||
|
} from '@/libs/login.js';
|
||||||
|
import {
|
||||||
|
mapGetters
|
||||||
|
} from "vuex";
|
||||||
export default {
|
export default {
|
||||||
name: "CustomerList",
|
name: "CustomerList",
|
||||||
components: {
|
components: {
|
||||||
@ -207,6 +218,7 @@
|
|||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popupn {
|
.popupn {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -217,17 +229,20 @@
|
|||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
max-width: 560rpx;
|
max-width: 560rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 4rpx;
|
top: 4rpx;
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mer_logo {
|
.mer_logo {
|
||||||
width: 34rpx;
|
width: 34rpx;
|
||||||
height: 34rpx;
|
height: 34rpx;
|
||||||
@ -235,36 +250,44 @@
|
|||||||
top: 6rpx;
|
top: 6rpx;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mer_name {
|
.mer_name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
max-width: 650rpx;
|
max-width: 650rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invoice-content {
|
.invoice-content {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.list_count {
|
.list_count {
|
||||||
margin-top: 104rpx;
|
margin-top: 104rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.logo image {
|
.logo image {
|
||||||
width: 88rpx;
|
width: 88rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
width: 334rpx;
|
width: 334rpx;
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
|
|
||||||
.con {
|
.con {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-box {
|
.right-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -272,9 +295,11 @@
|
|||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
color: #BBBBBB;
|
color: #BBBBBB;
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.num {
|
.num {
|
||||||
min-width: 6px;
|
min-width: 6px;
|
||||||
background-color: var(--view-theme);
|
background-color: var(--view-theme);
|
||||||
|
@ -6,68 +6,31 @@
|
|||||||
.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;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 100;
|
z-index: 9;
|
||||||
margin-bottom: 20rpx;
|
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 {
|
.wholeSale-section {
|
||||||
position: relative;
|
position: sticky;
|
||||||
font-weight: bold;
|
top: calc(82rpx + var(--status-bar-height));
|
||||||
font-size: 36rpx;
|
padding: 0rpx 20rpx;
|
||||||
color: #FFFFFF;
|
background-color: #fff;
|
||||||
|
transition: height .5s;
|
||||||
&::after {
|
overflow: hidden;
|
||||||
content: "";
|
margin-bottom: 20rpx;
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
bottom: -6rpx;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
width: 100%;
|
|
||||||
height: 6rpx;
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.wholeSale-con {
|
|
||||||
margin: 0 20rpx;
|
|
||||||
padding-bottom: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wholeSale-nav {
|
.wholeSale-nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 40rpx;
|
padding-bottom: 20rpx;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.search_content {
|
.search_content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@ -103,15 +66,18 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.category {
|
.category {
|
||||||
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
padding-right: 70rpx;
|
||||||
|
|
||||||
.category-wrap {
|
.category-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 10rpx;
|
||||||
|
|
||||||
.category-item {
|
.category-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -152,6 +118,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.category-all {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
height: 100%;
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
z-index: 10;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
font-size: 24rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
width: 70rpx;
|
||||||
|
color: #919191;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cate {
|
.cate {
|
||||||
@ -181,41 +165,83 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.comprehensive {
|
.popup-wrap {
|
||||||
display: flex;
|
background-color: #fff;
|
||||||
justify-content: space-between;
|
padding: 20rpx;
|
||||||
align-items: center;
|
|
||||||
padding: 0 50rpx;
|
|
||||||
|
|
||||||
[class^=comprehensive-] {
|
.popup-wrap-title {
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap-category {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.popup-wrap-category-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.popup-wrap-category-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin: 0 20rpx 20rpx 0;
|
||||||
|
|
||||||
|
&:nth-child(5n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
text {
|
text {
|
||||||
margin-right: 12rpx;
|
margin-top: 16rpx;
|
||||||
font-size: 26rpx;
|
font-size: 24rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
image {
|
.popup-wrap-category-item-text {
|
||||||
width: 28rpx;
|
width: 120rpx;
|
||||||
height: 28rpx;
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.loudou {
|
.popup-wrap-category-item-active {
|
||||||
width: 24rpx;
|
position: relative;
|
||||||
height: 24rpx;
|
|
||||||
|
.popup-wrap-category-item-img {
|
||||||
|
border: 2px solid #40AE36;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
background-color: #40AE36;
|
||||||
|
color: #fff;
|
||||||
|
padding: 2rpx 10rpx 6rpx 10rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wholeSale-con {
|
||||||
|
height: 100vh;
|
||||||
|
margin: 0 20rpx;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<view class="wholeSale">
|
<view class="wholeSale">
|
||||||
<!-- 顶部 -->
|
<!-- 顶部 -->
|
||||||
<view class="wholeSale-header">
|
<view class="wholeSale-header">
|
||||||
<view class="wholeSale-header-wrap">
|
|
||||||
<!-- 适配不同机 -->
|
<!-- 适配不同机 -->
|
||||||
<view style="height: var(--status-bar-height);background-color: #40af37;"></view>
|
<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;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;">
|
||||||
@ -224,7 +250,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="wholeSale-header-search-wrap">
|
<!-- 分类区域 -->
|
||||||
|
<view class="wholeSale-section" :style="{height:wrapHeight + 'rpx'}">
|
||||||
<view class="wholeSale-nav">
|
<view class="wholeSale-nav">
|
||||||
<view @click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}`)"
|
<view @click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}`)"
|
||||||
hover-class="none" class="search_content flex_a_c_j_sb">
|
hover-class="none" class="search_content flex_a_c_j_sb">
|
||||||
@ -254,6 +281,11 @@
|
|||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</scroll-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>
|
||||||
|
|
||||||
<!-- 商品小分类 -->
|
<!-- 商品小分类 -->
|
||||||
@ -270,14 +302,43 @@
|
|||||||
</scroll-view>
|
</scroll-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%;"
|
||||||
|
@scrolltoupper="scrolltoupper" :refresher-threshold="0">
|
||||||
|
<view>
|
||||||
<!-- 流水瀑布 -->
|
<!-- 流水瀑布 -->
|
||||||
<WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" />
|
<WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" />
|
||||||
<loadmore :type="isLoading"></loadmore>
|
<loadmore :type="isLoading" style="margin-bottom:20rpx ;"></loadmore>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -310,23 +371,56 @@
|
|||||||
keyword: '',
|
keyword: '',
|
||||||
deduction_rate: '', //抵扣比例
|
deduction_rate: '', //抵扣比例
|
||||||
rand: 1
|
rand: 1
|
||||||
}
|
},
|
||||||
|
wrapHeight: 300,
|
||||||
|
isShowSmall: false,
|
||||||
|
scrollTop: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.getStoreCategory();
|
this.getStoreCategory();
|
||||||
this.getProductslist(true);
|
this.getProductslist(true);
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
|
||||||
this.getProductslist();
|
onPageScroll(e) {
|
||||||
},
|
|
||||||
onPageScroll() {
|
|
||||||
uni.$emit('scroll');
|
uni.$emit('scroll');
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
|
||||||
this.getProductslist(true);
|
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: {
|
methods: {
|
||||||
|
onAllCategory() {
|
||||||
|
this.$refs.popup.open();
|
||||||
|
},
|
||||||
|
|
||||||
|
scrolltoupper() {
|
||||||
|
this.getProductslist(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
onScrollBottom(e) {
|
||||||
|
this.getProductslist();
|
||||||
|
},
|
||||||
|
|
||||||
|
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) {
|
navTo(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url,
|
url: url,
|
||||||
@ -340,12 +434,11 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
navBack() {
|
navBack() {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
},
|
},
|
||||||
tabsChange(e) {
|
|
||||||
this.tabsCurr = e;
|
|
||||||
},
|
|
||||||
changeCate(e) {
|
changeCate(e) {
|
||||||
this.cate_change = e;
|
this.cate_change = e;
|
||||||
this.store_category_children = [];
|
this.store_category_children = [];
|
||||||
@ -357,6 +450,8 @@
|
|||||||
this.cate_change_children = 0;
|
this.cate_change_children = 0;
|
||||||
this.where.cate_pid = this.store_category[e].store_category_id;
|
this.where.cate_pid = this.store_category[e].store_category_id;
|
||||||
this.getProductslist(true);
|
this.getProductslist(true);
|
||||||
|
|
||||||
|
this.$refs.popup && this.$refs.popup.close();
|
||||||
},
|
},
|
||||||
changeChildrenCate(e) {
|
changeChildrenCate(e) {
|
||||||
this.cate_change_children = e;
|
this.cate_change_children = e;
|
||||||
@ -387,6 +482,7 @@
|
|||||||
}
|
}
|
||||||
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.where.limit = res.data.limit
|
this.where.limit = res.data.limit
|
||||||
this.where.page = res.data.page
|
this.where.page = res.data.page
|
||||||
|
@ -1,346 +1,8 @@
|
|||||||
<style lang="scss" scoped>
|
|
||||||
page {
|
|
||||||
background-color: #f8fafb !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wholeSale {
|
|
||||||
background-color: #f8fafb !important;
|
|
||||||
|
|
||||||
.wholeSale-header-wrap {
|
|
||||||
background-color: #40AE36;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wholeSale-header-search-wrap {
|
|
||||||
padding: 30rpx 20rpx 0;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wholeSale-header {
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 100;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
|
|
||||||
.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-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 {
|
|
||||||
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: 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 {
|
|
||||||
padding-bottom: 30rpx;
|
|
||||||
|
|
||||||
.goods {
|
|
||||||
width: 710rpx;
|
|
||||||
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: 500rpx;
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.score {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 1;
|
|
||||||
color: #000;
|
|
||||||
|
|
||||||
.score-title {
|
|
||||||
margin-right: 15rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.score_text {
|
|
||||||
color: #fd5d2e;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.position-address {
|
|
||||||
position: absolute;
|
|
||||||
top: 70rpx;
|
|
||||||
right: -10rpx;
|
|
||||||
z-index: 101;
|
|
||||||
width: 250rpx;
|
|
||||||
padding: 20rpx;
|
|
||||||
padding-top: 30rpx;
|
|
||||||
font-size: 26rpx;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
background-image: url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/39cd0202404171145486922.png);
|
|
||||||
background-size: 100% 100%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
position: absolute;
|
|
||||||
right: 10rpx;
|
|
||||||
top: 25rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
background-color: #40AE36;
|
|
||||||
width: 100%;
|
|
||||||
height: 40rpx;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<template>
|
<template>
|
||||||
<view class="wholeSale">
|
<view class="wholeSale">
|
||||||
|
|
||||||
<!-- 顶部 -->
|
|
||||||
<view class="wholeSale-header">
|
|
||||||
<view class="wholeSale-header-wrap">
|
|
||||||
<!-- 适配不同机 -->
|
<!-- 适配不同机 -->
|
||||||
|
<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>
|
||||||
<view
|
<view
|
||||||
style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;justify-content: space-between;">
|
style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;justify-content: space-between;">
|
||||||
@ -364,7 +26,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="wholeSale-header-search-wrap">
|
<!-- 分类区域 -->
|
||||||
|
<view class="wholeSale-section" :style="{height:wrapHeight + 'rpx'}">
|
||||||
<view class="wholeSale-nav">
|
<view class="wholeSale-nav">
|
||||||
<view
|
<view
|
||||||
@click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}&shop=true`)"
|
@click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}&shop=true`)"
|
||||||
@ -395,12 +58,18 @@
|
|||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</scroll-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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view class="goods_list">
|
<view class="goods_list" :style="{height:'calc(100vh - '+wrapHeight+'rpx - 142rpx)'}">
|
||||||
|
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom" @scroll="onScroll" style="height: 100%;"
|
||||||
|
@scrolltoupper="scrolltoupper" :refresher-threshold="0">
|
||||||
<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">
|
||||||
@ -412,7 +81,8 @@
|
|||||||
<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;" v-if="item.sales>=100">月销{{item.sales}}</text>
|
<text style="font-size: 21.03rpx;color: #aaa;"
|
||||||
|
v-if="item.sales>=100">月销{{item.sales}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="content-two">
|
<view class="content-two">
|
||||||
<view class="score">
|
<view class="score">
|
||||||
@ -444,7 +114,33 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<loadmore :type="isLoading"></loadmore>
|
<loadmore :type="isLoading"></loadmore>
|
||||||
|
</scroll-view>
|
||||||
</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="{'popup-wrap-category-item-active': index==cate_change}"
|
||||||
|
@click="changeCate(index)">
|
||||||
|
<u--image class="popup-wrap-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="popup-wrap-category-item-text">{{item.category_name}}</text>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -494,7 +190,9 @@
|
|||||||
type_id: '10,12,21,24',
|
type_id: '10,12,21,24',
|
||||||
merchant_category_id: '',
|
merchant_category_id: '',
|
||||||
location: ''
|
location: ''
|
||||||
}
|
},
|
||||||
|
wrapHeight: 300,
|
||||||
|
scrollTop: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -522,15 +220,36 @@
|
|||||||
this.storeMerchantList();
|
this.storeMerchantList();
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.storeMerchantList();
|
// this.storeMerchantList();
|
||||||
},
|
},
|
||||||
onPageScroll() {
|
onPageScroll() {
|
||||||
uni.$emit('scroll');
|
uni.$emit('scroll');
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.storeMerchantList(true);
|
// this.storeMerchantList(true);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onAllCategory() {
|
||||||
|
this.$refs.popup.open();
|
||||||
|
},
|
||||||
|
|
||||||
|
scrolltoupper() {
|
||||||
|
this.storeMerchantList(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
onScrollBottom(e) {
|
||||||
|
this.storeMerchantList();
|
||||||
|
},
|
||||||
|
|
||||||
|
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,
|
||||||
@ -547,13 +266,14 @@
|
|||||||
navBack() {
|
navBack() {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
},
|
},
|
||||||
tabsChange(e) {
|
|
||||||
this.tabsCurr = e;
|
|
||||||
},
|
|
||||||
changeCate(e) {
|
changeCate(e) {
|
||||||
this.cate_change = e;
|
this.cate_change = e;
|
||||||
this.where.merchant_category_id = this.store_category[e].merchant_category_id;
|
this.where.merchant_category_id = this.store_category[e].merchant_category_id;
|
||||||
this.storeMerchantList(true);
|
this.storeMerchantList(true);
|
||||||
|
|
||||||
|
this.$refs.popup && this.$refs.popup.close();
|
||||||
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
// 进店
|
// 进店
|
||||||
goStore(id) {
|
goStore(id) {
|
||||||
@ -683,3 +403,343 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background-color: #f8fafb !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wholeSale {
|
||||||
|
|
||||||
|
.wholeSale-header-search-wrap {
|
||||||
|
padding: 30rpx 20rpx 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wholeSale-header {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 90;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
background-color: #40AE36;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wholeSale-section {
|
||||||
|
position: sticky;
|
||||||
|
top: calc(82rpx + var(--status-bar-height));
|
||||||
|
padding: 0rpx 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
transition: height .5s;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-bottom: 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 {
|
||||||
|
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 {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
padding-right: 70rpx;
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-all {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
height: 100%;
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
z-index: 10;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
font-size: 24rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
width: 70rpx;
|
||||||
|
color: #919191;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
|
||||||
|
.popup-wrap-title {
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap-category {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.popup-wrap-category-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.popup-wrap-category-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin: 0 20rpx 20rpx 0;
|
||||||
|
|
||||||
|
&:nth-child(5n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
margin-top: 16rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666666;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap-category-item-text {
|
||||||
|
width: 120rpx;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap-category-item-active {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.popup-wrap-category-item-img {
|
||||||
|
border: 2px solid #40AE36;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
background-color: #40AE36;
|
||||||
|
color: #fff;
|
||||||
|
padding: 2rpx 10rpx 6rpx 10rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wholeSale-con {
|
||||||
|
margin: 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods_list {
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
background-color: #f8fafb;
|
||||||
|
|
||||||
|
.goods {
|
||||||
|
width: 710rpx;
|
||||||
|
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: 500rpx;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.score {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 1;
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
.score-title {
|
||||||
|
margin-right: 15rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.score_text {
|
||||||
|
color: #fd5d2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.position-address {
|
||||||
|
position: absolute;
|
||||||
|
top: 70rpx;
|
||||||
|
right: -10rpx;
|
||||||
|
z-index: 101;
|
||||||
|
width: 250rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-image: url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/39cd0202404171145486922.png);
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
position: absolute;
|
||||||
|
right: 10rpx;
|
||||||
|
top: 25rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background-color: #40AE36;
|
||||||
|
width: 100%;
|
||||||
|
height: 40rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,225 +1,7 @@
|
|||||||
<style lang="scss" scoped>
|
|
||||||
page {
|
|
||||||
background-color: #f8fafb !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wholeSale {
|
|
||||||
background-color: #f8fafb !important;
|
|
||||||
|
|
||||||
.wholeSale-header-wrap {
|
|
||||||
background-color: #40AE36;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wholeSale-header-search-wrap {
|
|
||||||
padding: 30rpx 20rpx 0;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wholeSale-header {
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 100;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
|
|
||||||
.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-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 {
|
|
||||||
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;
|
|
||||||
pic: #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: 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>
|
|
||||||
<template>
|
<template>
|
||||||
<view class="wholeSale">
|
<view class="wholeSale">
|
||||||
<!-- 顶部 -->
|
|
||||||
<view class="wholeSale-header">
|
|
||||||
<view class="wholeSale-header-wrap">
|
|
||||||
<!-- 适配不同机 -->
|
<!-- 适配不同机 -->
|
||||||
|
<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>
|
||||||
<view style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;">
|
<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;"
|
<view style="display: flex;font-weight: bold;font-size: 32rpx;"><u-icon style="margin-right: 20rpx;"
|
||||||
@ -227,7 +9,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="wholeSale-header-search-wrap">
|
<view class="wholeSale-section" :style="{height:wrapHeight + 'rpx'}">
|
||||||
<view class="wholeSale-nav">
|
<view class="wholeSale-nav">
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<view @click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}`)"
|
<view @click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}`)"
|
||||||
@ -258,6 +40,11 @@
|
|||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</scroll-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>
|
||||||
|
|
||||||
<!-- 商品小分类 -->
|
<!-- 商品小分类 -->
|
||||||
@ -274,14 +61,43 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<view class="wholeSale-con">
|
<view class="wholeSale-con" :style="{height:'calc(100vh - '+wrapHeight+'rpx - 142rpx )'}">
|
||||||
|
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom" @scroll="onScroll" style="height: 100%;"
|
||||||
|
@scrolltoupper="scrolltoupper" :refresher-threshold="0">
|
||||||
|
<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>
|
||||||
|
</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="{'popup-wrap-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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -313,7 +129,9 @@
|
|||||||
keyword: '',
|
keyword: '',
|
||||||
mer_type: 3, //1-里海云仓, 2-云市场, 3-名优特产
|
mer_type: 3, //1-里海云仓, 2-云市场, 3-名优特产
|
||||||
sale_type: 1, //1-零售, 2-批发
|
sale_type: 1, //1-零售, 2-批发
|
||||||
}
|
},
|
||||||
|
wrapHeight: 300,
|
||||||
|
scrollTop: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@ -321,15 +139,36 @@
|
|||||||
this.getProductslist(true);
|
this.getProductslist(true);
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.getProductslist();
|
// this.getProductslist();
|
||||||
},
|
},
|
||||||
onPageScroll() {
|
onPageScroll() {
|
||||||
uni.$emit('scroll');
|
uni.$emit('scroll');
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.getProductslist(true);
|
// this.getProductslist(true);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onAllCategory() {
|
||||||
|
this.$refs.popup.open();
|
||||||
|
},
|
||||||
|
|
||||||
|
scrolltoupper() {
|
||||||
|
this.getProductslist(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
onScrollBottom(e) {
|
||||||
|
this.getProductslist();
|
||||||
|
},
|
||||||
|
|
||||||
|
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,
|
||||||
@ -346,9 +185,7 @@
|
|||||||
navBack() {
|
navBack() {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
},
|
},
|
||||||
tabsChange(e) {
|
|
||||||
this.tabsCurr = e;
|
|
||||||
},
|
|
||||||
changeCate(e) {
|
changeCate(e) {
|
||||||
this.cate_change = e;
|
this.cate_change = e;
|
||||||
this.store_category_children = [{
|
this.store_category_children = [{
|
||||||
@ -361,6 +198,9 @@
|
|||||||
this.cate_change_children = 0;
|
this.cate_change_children = 0;
|
||||||
this.where.cate_pid = this.store_category[e].store_category_id;
|
this.where.cate_pid = this.store_category[e].store_category_id;
|
||||||
this.getProductslist(true);
|
this.getProductslist(true);
|
||||||
|
|
||||||
|
this.$refs.popup && this.$refs.popup.close();
|
||||||
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
changeChildrenCate(e) {
|
changeChildrenCate(e) {
|
||||||
this.cate_change_children = e;
|
this.cate_change_children = e;
|
||||||
@ -369,6 +209,7 @@
|
|||||||
.store_category_id; // 如若选中全部, 则取父级id
|
.store_category_id; // 如若选中全部, 则取父级id
|
||||||
this.getProductslist(true);
|
this.getProductslist(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
getCategoryIndexList() {
|
getCategoryIndexList() {
|
||||||
getCategoryIndexList({
|
getCategoryIndexList({
|
||||||
mer_type: this.where.mer_type,
|
mer_type: this.where.mer_type,
|
||||||
@ -427,3 +268,215 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background-color: #f8fafb !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wholeSale {
|
||||||
|
|
||||||
|
.wholeSale-header {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 90;
|
||||||
|
background-color: #40AE36;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wholeSale-section {
|
||||||
|
position: sticky;
|
||||||
|
top: calc(82rpx + var(--status-bar-height));
|
||||||
|
padding: 0rpx 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
transition: height .5s;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
z-index: 20;
|
||||||
|
|
||||||
|
.wholeSale-nav {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search_content {
|
||||||
|
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 {
|
||||||
|
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;
|
||||||
|
pic: #40AE36;
|
||||||
|
border-radius: 100px;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.category {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
padding-right: 70rpx;
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-all {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
height: 100%;
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
z-index: 10;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
font-size: 24rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
width: 70rpx;
|
||||||
|
color: #919191;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
|
||||||
|
.popup-wrap-title {
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap-category {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.popup-wrap-category-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.popup-wrap-category-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin: 0 20rpx 20rpx 0;
|
||||||
|
|
||||||
|
&:nth-child(5n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
margin-top: 16rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666666;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap-category-item-text {
|
||||||
|
width: 120rpx;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap-category-item-active {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.popup-wrap-category-item-img {
|
||||||
|
border: 2px solid #40AE36;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
background-color: #40AE36;
|
||||||
|
color: #fff;
|
||||||
|
padding: 2rpx 10rpx 6rpx 10rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wholeSale-con {
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
margin: 0 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -41,7 +41,7 @@
|
|||||||
</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'>{{(sale_type==1?orderData.refund:orderData.mer_refund) || 0}}</view>
|
<view class='num'>{{(sale_type==1?orderData.elseRefund:orderData.mer_elseRefund) || 0}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="wholeSale-header-search-wrap">
|
<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" activeColor="#40ae36" fontSize="14" style="margin-bottom: 24rpx;"></u-subsection>
|
mode="subsection" activeColor="#40ae36" fontSize="14" style="margin-bottom: 24rpx;"></u-subsection>
|
||||||
|
|
||||||
@ -38,7 +38,6 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 商品大分类 -->
|
<!-- 商品大分类 -->
|
||||||
|
|
||||||
<view class="category">
|
<view class="category">
|
||||||
<scroll-view scroll-x="true">
|
<scroll-view scroll-x="true">
|
||||||
<view class="category-wrap">
|
<view class="category-wrap">
|
||||||
@ -67,6 +66,10 @@
|
|||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</scroll-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>
|
||||||
|
|
||||||
<!-- 商品小分类 -->
|
<!-- 商品小分类 -->
|
||||||
@ -133,12 +136,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 内容 style="padding-top: calc(var(--status-bar-height) + 120rpx);" -->
|
<!-- 内容 -->
|
||||||
<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%;"
|
||||||
|
@scrolltoupper="scrolltoupper" :refresher-threshold="0">
|
||||||
<!-- 流水瀑布 -->
|
<!-- 流水瀑布 -->
|
||||||
<WaterfallsFlow v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)" :wfList='hostProduct' @itemTap="goDetail"
|
<WaterfallsFlow v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)" :wfList='hostProduct'
|
||||||
:type="0" :sale_type="2" />
|
@itemTap="goDetail" :type="0" :sale_type="2" />
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view class="goods_list" v-else>
|
<view class="goods_list" v-else>
|
||||||
@ -177,7 +182,8 @@
|
|||||||
<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 v-if="item.mer_take_time">{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}</text>
|
<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"
|
||||||
@ -188,14 +194,52 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<loadmore :type="isLoading" v-if="isLoading || hostProduct.length > 0" style="padding: 40rpx 0 150rpx; 0">
|
<loadmore :type="isLoading" v-if="isLoading || hostProduct.length > 0"
|
||||||
|
style="padding: 40rpx 0 150rpx; 0">
|
||||||
</loadmore>
|
</loadmore>
|
||||||
<view class='pictrue' v-if="!isLoading && hostProduct.length == 0">
|
<view class='pictrue' v-if="!isLoading && hostProduct.length == 0">
|
||||||
<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>
|
||||||
|
|
||||||
|
<!-- 弹框大分类 -->
|
||||||
|
<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="{'popup-wrap-category-item-active': index==cate_change}"
|
||||||
|
@click="changeCate(index)">
|
||||||
|
<block v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)">
|
||||||
|
<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>
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<u--image class="popup-wrap-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="popup-wrap-category-item-text">{{item.category_name}}</text>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
<!--自定义底部tab栏-->
|
<!--自定义底部tab栏-->
|
||||||
<customTab :newData="newData" :activeRouter="activeRouter"></customTab>
|
<customTab :newData="newData" :activeRouter="activeRouter"></customTab>
|
||||||
</view>
|
</view>
|
||||||
@ -276,6 +320,9 @@
|
|||||||
bigTypeDomInfo: null,
|
bigTypeDomInfo: null,
|
||||||
smallTypeDomInfo: null,
|
smallTypeDomInfo: null,
|
||||||
categoryWrapHeight: 0,
|
categoryWrapHeight: 0,
|
||||||
|
wrapHeight: 332,
|
||||||
|
isShowSmall: false,
|
||||||
|
scrollTop: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -321,20 +368,49 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
// onPullDownRefresh() {
|
||||||
|
// this.initData(true, true);
|
||||||
|
// },
|
||||||
|
// onReachBottom() {
|
||||||
|
// this.initData(false, true);
|
||||||
|
// },
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
'where.cate_pid'(newVal, oldVal) {
|
||||||
|
if (newVal && !oldVal) {
|
||||||
|
this.wrapHeight = this.tabsCurr == 2 ? 400 : (332 + 48);
|
||||||
|
this.isShowSmall = true;
|
||||||
|
}
|
||||||
|
if (!newVal && oldVal) {
|
||||||
|
this.wrapHeight = this.tabsCurr == 2 ? 400 : 332;
|
||||||
|
this.isShowSmall = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onAllCategory() {
|
||||||
|
this.$refs.popup.open();
|
||||||
|
},
|
||||||
|
|
||||||
|
scrolltoupper() {
|
||||||
this.initData(true, true);
|
this.initData(true, true);
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
|
||||||
|
onScrollBottom(e) {
|
||||||
this.initData(false, true);
|
this.initData(false, true);
|
||||||
},
|
},
|
||||||
onReady() {
|
|
||||||
// 获取dom信息
|
onScroll(e) {
|
||||||
// this.$util.getDom(this, '.category', (res) => {
|
if (this.scrollTop >= e.target.scrollTop) { //上拉
|
||||||
// this.bigTypeDomInfo = res;
|
this.wrapHeight = this.tabsCurr == 2 ? 400 : 332;
|
||||||
// this.categoryWrapHeight = res.height;
|
if (this.where.cate_pid) this.wrapHeight = this.wrapHeight + 48;
|
||||||
// });
|
} else {
|
||||||
|
this.wrapHeight = 0;
|
||||||
|
}
|
||||||
|
this.scrollTop = e.target.scrollTop;
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
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);
|
||||||
@ -405,6 +481,7 @@
|
|||||||
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.initData(true);
|
this.initData(true);
|
||||||
},
|
},
|
||||||
changeCate(e) {
|
changeCate(e) {
|
||||||
@ -429,10 +506,8 @@
|
|||||||
}
|
}
|
||||||
this.getProductslist(true);
|
this.getProductslist(true);
|
||||||
|
|
||||||
// 获取小分类高度 为了上下滑动隐藏分类
|
// 关闭popup
|
||||||
// this.$util.getDom(this, '.cate', (res) => {
|
this.$refs.popup && this.$refs.popup.close();
|
||||||
// if (res) this.smallTypeDomInfo = res.data;
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
changeChildrenCate(e) {
|
changeChildrenCate(e) {
|
||||||
this.cate_change_children = e;
|
this.cate_change_children = e;
|
||||||
@ -551,7 +626,7 @@
|
|||||||
.wholeSale-header {
|
.wholeSale-header {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 100;
|
z-index: 90;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
.wholeSale-header-wrap {
|
.wholeSale-header-wrap {
|
||||||
@ -559,6 +634,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wholeSale-header-search-wrap {
|
.wholeSale-header-search-wrap {
|
||||||
|
position: sticky;
|
||||||
|
top: calc(82rpx + var(--status-bar-height));
|
||||||
|
transition: height .5s;
|
||||||
|
overflow: hidden;
|
||||||
padding: 30rpx 20rpx 0;
|
padding: 30rpx 20rpx 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
@ -635,15 +714,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.category_wrap {
|
|
||||||
overflow: hidden;
|
|
||||||
// transition: height 1s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.category {
|
.category {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
margin-bottom: 20rpx;
|
position: relative;
|
||||||
|
padding-right: 70rpx;
|
||||||
|
|
||||||
.category-wrap {
|
.category-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -689,6 +764,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.category-all {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
height: 100%;
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
z-index: 10;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
font-size: 24rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
width: 70rpx;
|
||||||
|
color: #919191;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cate {
|
.cate {
|
||||||
@ -719,6 +812,70 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.popup-wrap {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
|
||||||
|
.popup-wrap-title {
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap-category {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.popup-wrap-category-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.popup-wrap-category-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin: 0 20rpx 20rpx 0;
|
||||||
|
|
||||||
|
&:nth-child(5n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
margin-top: 16rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666666;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap-category-item-text {
|
||||||
|
width: 120rpx;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-wrap-category-item-active {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.popup-wrap-category-item-img {
|
||||||
|
border: 2px solid #40AE36;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
background-color: #40AE36;
|
||||||
|
color: #fff;
|
||||||
|
padding: 2rpx 10rpx 6rpx 10rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.comprehensive {
|
.comprehensive {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -772,7 +929,6 @@
|
|||||||
|
|
||||||
.goods_list {
|
.goods_list {
|
||||||
.goods {
|
.goods {
|
||||||
// width: 690rpx;
|
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
margin: 20rpx auto;
|
margin: 20rpx auto;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
BIN
static/images/loading.gif
Normal file
BIN
static/images/loading.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
29
utils/mixin.js
Normal file
29
utils/mixin.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
const mixins = {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
wrapHeight: 'auto',
|
||||||
|
clientY: 0,
|
||||||
|
maxHeight: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
// 移动
|
||||||
|
onTouchMove(e) {
|
||||||
|
console.log(e);
|
||||||
|
const moveDistance = e.changedTouches[0].clientY - this.clientY;
|
||||||
|
if (moveDistance > 5) {
|
||||||
|
this.wrapHeight = '352rpx';
|
||||||
|
} else {
|
||||||
|
this.wrapHeight = 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 开始触摸屏幕
|
||||||
|
onTouchStart(e) {
|
||||||
|
this.clientY = e.changedTouches[0].clientY;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default mixins;
|
Loading…
x
Reference in New Issue
Block a user