tianyi 1 month ago
parent
commit
c91df53270
  1. 41
      package1/order/orderList.vue

41
package1/order/orderList.vue

@ -151,30 +151,20 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else style="display: flex;padding: 20rpx;background: #F5F5F5;border-radius: 20rpx;" v-for="(item1,index1) in item.goodsList" :key="index1" v-if="item.goodsList != null && item.goodsList.length > 0"> <view style="display: flex;background: #f5f5f5;border-radius: 10px;align-items: center;">
<view class="goods-img"> <view v-else style="width: 80%;overflow: scroll;display: flex;padding: 20rpx;background: #F5F5F5;border-radius: 20rpx;" v-for="(item1,index1) in item.goodsList" :key="index1" v-if="item.goodsList != null && item.goodsList.length > 0">
<img :src="item1.productPicture" alt=""> <view class="goods-img">
<img :src="item1.productPicture" alt="">
</view>
</view> </view>
<view class="goods-content"> <view class="goods-content">
<view class="goods-name"> <view class="goods-name">
{{item1.productName}} <view><text style="font-size: 32rpx;">{{item.totalAmount}}</text></view>
</view> <view style="color:#777;">{{item.num}}</view>
<view class="goods-content-center">
<view>
{{item1.specs == null ? '' : item1.specs}}
</view>
</view>
<view class="goods-content-bottom">
<view style="width: 45%;">
X{{item1.quantity}}
</view>
<view class="pintuan-left-price">
{{item1.price}}
</view>
</view> </view>
</view> </view>
</view> </view>
<view style="height: 100rpx;border-bottom: 1px solid #F5F5F5;display: flex;line-height: 100rpx;"> <view style="height: 80rpx;border-bottom: 1px solid #F5F5F5;display: flex;line-height: 80rpx;">
<view v-if="item.otherOrder == null" style="flex: 1;font-weight: 700;"> <view v-if="item.otherOrder == null" style="flex: 1;font-weight: 700;">
<text v-if="tab1Checked != 'fantuan'">下单时间:</text>{{item.createTime | formatTime}} <text v-if="tab1Checked != 'fantuan'">下单时间:</text>{{item.createTime | formatTime}}
</view> </view>
@ -494,6 +484,12 @@
that.orderList = [...that.orderList, ...res.result.records] that.orderList = [...that.orderList, ...res.result.records]
} }
console.log(that.orderList) console.log(that.orderList)
for(let i=0;i<that.orderList.length;i++){
that.orderList[i].num = 0
for(let m=0;m<that.orderList[i].goodsList.length;m++){
that.orderList[i].num += that.orderList[i].goodsList[m].quantity
}
}
that.totalPages = res.result.pages; // pages = that.totalPages = res.result.pages; // pages =
that.$forceUpdate(); that.$forceUpdate();
} else { } else {
@ -707,21 +703,22 @@
position: relative; position: relative;
background: #fff; background: #fff;
border-radius: 20rpx; border-radius: 20rpx;
margin-right: 10px;
img { img {
width: 100%; width: 160rpx;
background-size: 100%; background-size: 100%;
height: 100%; height: 100%;
border-radius: 10px;
} }
} }
.goods-content { .goods-content {
flex: 1; padding: 0 20rpx;
padding-left: 20rpx; text-align: center;
} }
.goods-name { .goods-name {
font-size: 32rpx;
font-weight: 900; font-weight: 900;
} }

Loading…
Cancel
Save