zs 2 年之前
父节点
当前提交
386507758c
共有 1 个文件被更改,包括 11 次插入16 次删除
  1. 11 16
      pagesHome/order/order.vue

+ 11 - 16
pagesHome/order/order.vue

@@ -23,28 +23,28 @@
 								<view class="list_1">
 									<view class="l">
 										<text class="iconfont icon-shangdian"></text>
-										<text>{{shop[0].shop_name}}</text>
+										<text>{{item.shop_name}}</text>
 									</view>
 								</view>
-								<view class="list_2">
+								<view class="list_2" v-for="(tag,index) in item.goods" :key="index">
 									<view class="l">
-										<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''"
+										<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
 											mode=""></image>
 									</view>
 									<view class="c">
 										<view class="name">
-											{{item.goods_name}}
+											{{tag.goods_name}}
 										</view>
 										<view class="Spec">
-											规格:{{item.goodsSpec_name}}
+											规格:{{tag.goodsSpec_name}}
 										</view>
 									</view>
 									<view class="r">
 										<view class="price">
-											¥{{item.money}}
+											¥{{tag.money}}
 										</view>
 										<view class="num">
-											×{{item.num}}
+											×{{tag.num}}
 										</view>
 									</view>
 								</view>
@@ -55,13 +55,13 @@
 									</view>
 									<view class="other">
 										<view class="other_1">运费</view>
-										<view class="other_2" v-if="!item.freight==0">¥{{item.freight}}</view>
+										<view class="other_2" v-if="!item.freight_total==0">¥{{item.freight_total}}</view>
 										<view class="other_2" v-else>包邮</view>
 									</view>
 									<view class="other">
 										<view class="other_1">订单备注</view>
 										<view class="other_3">
-											<input type="text" v-model="item.remarks" placeholder="选填,可填写您与卖家达成一致的要求" />
+											<input type="text" v-model="tag.remarks" placeholder="选填,可填写您与卖家达成一致的要求" />
 										</view>
 									</view>
 								</view>
@@ -214,13 +214,8 @@
 				})
 				if (arr.errcode == '0') {
 					that.$set(that, `address`, arr.data.address);
-					that.$set(that, `orderList`, arr.data.goodsData[0].goods);
-					that.$set(that, `shop`, arr.data.goodsData);
-					var total_freight=0;
-					for (let val of arr.data.goodsData[0].goods) {
-						total_freight=total_freight+val.freight
-					}
-					var total=total_freight+arr.data.orderTotal.goods_total
+					that.$set(that, `orderList`, arr.data.goodsData);
+					var total=arr.data.orderTotal.freight_total+arr.data.orderTotal.goods_total
 					that.$set(that, `goods_total`, total);
 				}
 			},