调整售后单接口
parent
fe7aa0b555
commit
d19d2a7724
|
|
@ -17,7 +17,12 @@ class AfterSaleResource extends JsonResource
|
|||
return [
|
||||
'id' => $this->id,
|
||||
'order_sn' => $this->order->sn,
|
||||
'order_product'=> OrderProductResource::make($this->orderProduct),
|
||||
'product'=>[
|
||||
'name' => $this->orderProduct->name,
|
||||
'cover' => $this->orderProduct->cover,
|
||||
'sell_price' => bcdiv($this->orderProduct->total_amount, $this->orderProduct->quantity * 100, 2),
|
||||
'num'=> $this->num,
|
||||
],
|
||||
'state' => $this->state,
|
||||
'type' => $this->type,
|
||||
'images' => $this->images,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ class AfterSaleSimpleResource extends JsonResource
|
|||
return [
|
||||
'id' => $this->id,
|
||||
'order_sn' => $this->whenLoaded('order')?->sn,
|
||||
'order_product'=> OrderProductResource::make($this->whenLoaded('orderProduct')),
|
||||
'product'=>[
|
||||
'name' => $this->orderProduct->name,
|
||||
'cover' => $this->orderProduct->cover,
|
||||
],
|
||||
'state' => $this->state,
|
||||
'remarks' => $this->remarks,
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue