| | |
| | | </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="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;
|
| | | }
|
| | |
|
| | |
|