|
|
|
@ -28,7 +28,7 @@ class Order extends BaseModel |
|
|
|
} |
|
|
|
|
|
|
|
//退款信息
|
|
|
|
public function getRefundInfoAttribute($value) |
|
|
|
public function getRefundInfoAttribute($value): array |
|
|
|
{ |
|
|
|
$value = $value ? json_decode($value, true) : []; |
|
|
|
if (!empty($value['pictures']) && is_array($value['pictures'])) { |
|
|
|
@ -39,11 +39,17 @@ class Order extends BaseModel |
|
|
|
return $value ?? []; |
|
|
|
} |
|
|
|
|
|
|
|
public function getPictureAttribute($value) |
|
|
|
public function getPictureAttribute($value): string |
|
|
|
{ |
|
|
|
return $value ? $this->host . $value : ''; |
|
|
|
} |
|
|
|
|
|
|
|
public function setPictureAttribute($value) |
|
|
|
{ |
|
|
|
//修改器里面$this->host变量为空
|
|
|
|
$this->attributes['picture'] = str_replace(env('APP_URL'), '', $value); |
|
|
|
} |
|
|
|
|
|
|
|
public function agentProduct() |
|
|
|
{ |
|
|
|
return $this->belongsTo(AgentProduct::class); |
|
|
|
|