From badafedccb814258fa54156b558458fa04191f8d Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期二, 30 七月 2024 11:42:48 +0800
Subject: [PATCH] update
---
sub_pages/customer/trade/trade.vue | 64 ++++++++++++++++++++++++++-----
1 files changed, 53 insertions(+), 11 deletions(-)
diff --git a/sub_pages/customer/trade/trade.vue b/sub_pages/customer/trade/trade.vue
index 82d0f9a..d32b933 100644
--- a/sub_pages/customer/trade/trade.vue
+++ b/sub_pages/customer/trade/trade.vue
@@ -1,8 +1,8 @@
<template>
<view class="container-trade" :style="{'min-height':hidefooter?'':'calc(100vh - 20rpx)'}">
- <view class="search-container m-t-12 flex" v-if="!(!list||list.length==0)&&true&&!hidefooter">
+ <view class="search-container m-t-12 flex" v-if="!hidefooter">
<view class="flex1 input">
- <u-input placeholder="请输入分类名称" v-model="query.name">
+ <u-input placeholder="请输入分类名称" v-model="query.name" clearable>
<template slot="suffix">
<uni-icons color="#20613D" type="search" size="24" @tap="buttonSearchFlow"></uni-icons>
</template>
@@ -44,15 +44,10 @@
</view>
<view class="cateen_infos list">
<view class="title">{{item.name}}</view>
- <view class="price">¥29.01-30.01</view>
+ <view class="price">¥{{minWeightPrice(item)}}-{{maxWeightPrice(item)}}</view>
- <view class="desc">在售14410扎</view>
- <!-- <view class="icons flex">
- <uni-icons v-if="item.shopnum&&item.shopnum>=1" type="minus" size="32"
- @click="mulnum(item)"></uni-icons>
- <view class="curnums" v-if="item.shopnum&&item.shopnum>=1">{{item.shopnum}}</view>
- <uni-icons type="plus-filled" size="32" @click="addnum(item)"></uni-icons>
- </view> -->
+ <view class="desc">在售 {{item.stock||'-'}} 扎</view>
+
</view>
</view>
@@ -143,6 +138,53 @@
})
},
methods: {
+ maxWeightPrice(item) {
+ var p = 0
+ if (item.weightA && item.weightA > p) {
+ p = item.weightA
+ }
+ if (item.weightB && item.weightB > p) {
+ p = item.weightB
+ }
+ if (item.weightC && item.weightC > p) {
+ p = item.weightC
+ }
+ if (item.weightD && item.weightD > p) {
+ p = item.weightD
+ }
+ if (item.weightE && item.weightE > p) {
+ p = item.weightE
+ }
+ if (item.weightO && item.weightO > p) {
+ p = item.weightO
+ }
+ return p
+ },
+ minWeightPrice(item) {
+ var p = -1
+ if (item.weightA && item.weightA < p) {
+ p = item.weightA
+ }
+ if (item.weightB && item.weightB < p) {
+ p = item.weightB
+ }
+ if (item.weightC && item.weightC < p) {
+ p = item.weightC
+ }
+ if (item.weightD && item.weightD < p) {
+ p = item.weightD
+ }
+ if (item.weightE && item.weightE < p) {
+ p = item.weightE
+ }
+ if (item.weightO && item.weightO < p) {
+ p = item.weightO
+ }
+ if (p < 0) {
+ p = 0
+ }
+ return p
+ },
refInit(catgoryTree) {
this.list = catgoryTree || []
if (this.list.length > 0) {
@@ -334,7 +376,7 @@
font-size: 24rpx;
color: #CF0000;
line-height: 34rpx;
- text-align: center;
+ text-align: left;
}
--
Gitblit v1.9.3