6
0
Fork 0

调整售后单接口

release
vine_liutk 2021-12-16 21:26:20 +08:00
parent fe7aa0b555
commit d19d2a7724
2 changed files with 10 additions and 2 deletions

View File

@ -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,

View File

@ -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,
];