微调
This commit is contained in:
@@ -60,7 +60,7 @@ class ShopController extends AdminController
|
|||||||
$grid->model()->withCount(['versions', 'staffers'])->with(['user.info']);
|
$grid->model()->withCount(['versions', 'staffers'])->with(['user.info']);
|
||||||
|
|
||||||
$grid->column('name', '店铺名称');
|
$grid->column('name', '店铺名称');
|
||||||
$grid->column('所属用户')->display(fn() => $this->user->username . '[' . $this->user->info->nickname . ']');
|
// $grid->column('所属用户')->display(fn() => $this->user->username . '[' . $this->user->info->nickname . ']');
|
||||||
$grid->column('is_self', '类型')
|
$grid->column('is_self', '类型')
|
||||||
->using([
|
->using([
|
||||||
0 => '合作',
|
0 => '合作',
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Mall\Http\Resources\Api\Order;
|
||||||
|
|
||||||
|
use App\Api\Resources\Area\AreaCodeVerifyResource;
|
||||||
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
|
|
||||||
|
class OrderAreaCodeResource extends JsonResource
|
||||||
|
{
|
||||||
|
|
||||||
|
public function toArray($request): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'order_no' => $this->order_no,
|
||||||
|
'amount' => $this->amount,
|
||||||
|
'freight' => $this->freight,
|
||||||
|
'total' => $this->total,
|
||||||
|
'state' => [
|
||||||
|
'value' => $this->state,
|
||||||
|
'text' => $this->state_text,
|
||||||
|
],
|
||||||
|
'can' => $this->getCanAction(),
|
||||||
|
'items' => OrderItemResource::collection($this->items),
|
||||||
|
'area_code' => new AreaCodeVerifyResource($this->areaCode),
|
||||||
|
'remark' => (string) $this->remark,
|
||||||
|
'created_at' => (string) $this->created_at,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user