This commit is contained in:
2023-01-31 13:41:53 +08:00
parent a0e9eac706
commit 210af680af
2 changed files with 31 additions and 1 deletions

View File

@@ -60,7 +60,7 @@ class ShopController extends AdminController
$grid->model()->withCount(['versions', 'staffers'])->with(['user.info']);
$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', '类型')
->using([
0 => '合作',

View File

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