|
@@ -46,6 +46,18 @@ class Order extends Controller
|
|
|
if (!$detail = $model->getDetail($orderId)) {
|
|
|
return $this->renderError('未找到该订单记录');
|
|
|
}
|
|
|
+
|
|
|
+ foreach ($detail['goods'] as &$goods){
|
|
|
+ $goodsFlavors = json_decode($goods['remark_for_one'],true);
|
|
|
+ $str = '';
|
|
|
+ foreach ($goodsFlavors as $k => $flavor){
|
|
|
+ if ($flavor > 0){
|
|
|
+ $str .= ($k .'×'. $flavor. ',');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $goods['remark_for_one'] = $str;
|
|
|
+
|
|
|
+ }
|
|
|
return $this->renderSuccess(compact('detail'));
|
|
|
}
|
|
|
|