调整开通身份
This commit is contained in:
@@ -19,7 +19,7 @@ class IdentityMiddleResource extends JsonResource
|
||||
return [
|
||||
'name' => $this->identity->name,
|
||||
'serial' => $this->identity->serial_prefix.$this->serial,
|
||||
'started_at' => $this->started_at ?? '',
|
||||
'started_at' => (string)$this->started_at ?? '',
|
||||
'ended_at' => $ended_at,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -10,10 +10,17 @@ class UserIdentityBaseResource extends JsonResource
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'cover' => $this->cover_url,
|
||||
'order' => $this->order,
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'cover' => $this->cover_url,
|
||||
'order' => $this->order,
|
||||
'stock' => $this->stock,//多少箱
|
||||
'bottle' => bcmul($this->stock, 24),//多少瓶
|
||||
'price' => $this->getCondition('price', 0),//多少钱
|
||||
'rights' => $this->rights,//可享受权益
|
||||
'rules' => $this->getRules(),//身份权益
|
||||
'not_rules' => $this->getNotRules(),
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user