|
|
@ -57,6 +57,7 @@ class OrderMain extends Model |
|
|
'pay_time_text', |
|
|
'pay_time_text', |
|
|
'pay_type_text', |
|
|
'pay_type_text', |
|
|
'shipping_type_text', |
|
|
'shipping_type_text', |
|
|
|
|
|
'complete_time_text' |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
protected $casts = [ |
|
|
protected $casts = [ |
|
|
@ -73,6 +74,11 @@ class OrderMain extends Model |
|
|
return date('Y-m-d H:i:s', $this->attributes['pay_time']); |
|
|
return date('Y-m-d H:i:s', $this->attributes['pay_time']); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getCompleteTimeTextAttribute() |
|
|
|
|
|
{ |
|
|
|
|
|
return date('Y-m-d H:i:s', $this->attributes['complete_time']); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public function getStateTextAttribute() |
|
|
public function getStateTextAttribute() |
|
|
{ |
|
|
{ |
|
|
if ($this->attributes['state'] == OrderState::DELIVERY) { |
|
|
if ($this->attributes['state'] == OrderState::DELIVERY) { |
|
|
|