This commit is contained in:
1154079537 2024-05-10 18:06:31 +08:00
parent c5437b487a
commit 8f7ba8ba4e
3 changed files with 221 additions and 210 deletions

View File

@ -6,20 +6,18 @@
.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;
position: fixed;
width: 100%;
top: 0;
left: 0;
background-color: #40AE36;
z-index: 100;
margin-bottom: 20rpx;
.scrollview {
display: flex;
@ -54,12 +52,13 @@
}
}
.wholeSale-con {
margin: 0 20rpx;
padding-bottom: 30rpx;
}
.wholeSale-category {
margin: 0 20rpx 20rpx;
background-color: #fff;
border-radius: 10rpx;
padding: 20rpx 20rpx 1rpx 20rpx;
.wholeSale-nav {
.wholeSale-search {
display: flex;
align-items: center;
margin-bottom: 40rpx;
@ -106,8 +105,9 @@
.category {
width: 100%;
overflow: auto;
overflow: hidden;
margin-bottom: 20rpx;
transition: height .8s;
.category-wrap {
display: flex;
@ -181,42 +181,18 @@
}
}
}
.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;
padding-bottom: 30rpx;
}
}
</style>
<template>
<view class="wholeSale">
<!-- 顶部 -->
<!-- 顶部导航栏适配不同机 -->
<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="display: flex;font-weight: bold;font-size: 32rpx;"><u-icon style="margin-right: 20rpx;"
@ -224,8 +200,10 @@
</view>
</view>
<view class="wholeSale-header-search-wrap">
<view class="wholeSale-nav">
<view class="wholeSale-category-wrap" :style="{height:'65px'}"></view>
<view class="wholeSale-category">
<view class="wholeSale-search">
<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">
@ -270,7 +248,6 @@
</scroll-view>
</view>
</view>
</view>
<!-- 内容 -->
<view class="wholeSale-con">
@ -310,7 +287,9 @@
keyword: '',
deduction_rate: '', //
rand: 1
}
},
distance: 20,
scrollTop: 0
}
},
onLoad(option) {
@ -320,8 +299,13 @@
onReachBottom() {
this.getProductslist();
},
onPageScroll() {
onPageScroll(e) {
uni.$emit('scroll');
this.scrollTop = e.scrollTop;
},
onPullDownRefresh() {
this.getProductslist(true);
@ -378,6 +362,13 @@
store_category_id: ''
})
})
//
this.$nextTick(() => {
this.$util.getDom(this, '.wholeSale-category', (res) => {
this.categoryHeight = res.height;
})
})
},
getProductslist(reLoad = false) {
if (reLoad) {

View File

@ -41,7 +41,7 @@
</view>
<view class='item' :class='orderStatus==4 ? "on": ""' @click="statusClick(4)">
<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>

20
utils/mixin.js Normal file
View File

@ -0,0 +1,20 @@
const mixins = {
data() {
return {
totalHeight: 0,
scrollInfo: undefined,
userMoney: undefined
}
},
// 顶部导航栏透明滚动
onPageScroll(e) {
this.scrollInfo = e;
},
methods: {
getPageScroll() {
this.$utils.getDom();
}
}
}
export default mixins;