正在显示
1 个修改的文件
包含
4 行增加
和
12 行删除
@@ -49,22 +49,14 @@ class Order extends Api | @@ -49,22 +49,14 @@ class Order extends Api | ||
49 | "receipt_status": "10", 10未收货20已收货 | 49 | "receipt_status": "10", 10未收货20已收货 |
50 | "order_status": "10", 10进行中20已取消30已完成 | 50 | "order_status": "10", 10进行中20已取消30已完成 |
51 | "total_sum": 0, 商品总数量 | 51 | "total_sum": 0, 商品总数量 |
52 | - "goods": [ | ||
53 | - { | 52 | + "goods": [{ |
53 | + "goods_id": 1, 商品ID | ||
54 | "goods_name": "asdasd", 商品名 | 54 | "goods_name": "asdasd", 商品名 |
55 | "goods_attr": "1", 规格名 | 55 | "goods_attr": "1", 规格名 |
56 | "total_num": 0, 数量 | 56 | "total_num": 0, 数量 |
57 | "total_price": "0.00", 价格 | 57 | "total_price": "0.00", 价格 |
58 | "image_text": "" 图片 | 58 | "image_text": "" 图片 |
59 | - }, | ||
60 | - { | ||
61 | - "goods_name": "asdasd", | ||
62 | - "goods_attr": "1", | ||
63 | - "total_num": 0, | ||
64 | - "total_price": "0.00", | ||
65 | - "image_text": "" | ||
66 | - } | ||
67 | - ], | 59 | + }], |
68 | "createtime_text": "" 时间 | 60 | "createtime_text": "" 时间 |
69 | } | 61 | } |
70 | ] | 62 | ] |
@@ -128,7 +120,7 @@ class Order extends Api | @@ -128,7 +120,7 @@ class Order extends Api | ||
128 | $sum = 0; | 120 | $sum = 0; |
129 | foreach ($item->getRelation('goods')as $key => $value){ | 121 | foreach ($item->getRelation('goods')as $key => $value){ |
130 | $sum += $value['total_num']; | 122 | $sum += $value['total_num']; |
131 | - $value->visible(['goods_name','goods_attr','total_num','total_price']); | 123 | + $value->visible(['goods_id','goods_name','goods_attr','total_num','total_price']); |
132 | } | 124 | } |
133 | $item['total_sum'] = $sum; | 125 | $item['total_sum'] = $sum; |
134 | $item->visible([ | 126 | $item->visible([ |
-
请 注册 或 登录 后发表评论