| | |
| | | <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>
|
| | |
| | | </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>
|
| | |
| | | })
|
| | | },
|
| | | 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) {
|
| | |
| | | font-size: 24rpx;
|
| | | color: #CF0000;
|
| | | line-height: 34rpx;
|
| | | text-align: center;
|
| | | text-align: left;
|
| | | }
|
| | |
|
| | |
|