| xqd
@@ -10,7 +10,7 @@ namespace App\Models;
|
|
|
|
|
|
class Order extends BaseModel
|
|
|
{
|
|
|
- protected $appends = ['is_evaluate', 'order_duration', 'consult_duration', 'callback_phone'];
|
|
|
+ protected $appends = ['is_evaluate', 'consult_duration', 'callback_phone'];
|
|
|
|
|
|
CONST UNPAID = 1, NOTACCEPT = 2, ISING = 3, FINISHED = 4,CANCELED=5,ISOUT=6; //订单状态(1.未支付 2.进行中 3.已完成 4.已取消)
|
|
|
public static $_order_status = [
|
| xqd
@@ -159,21 +159,6 @@ class Order extends BaseModel
|
|
|
return $is_evaluate;
|
|
|
}
|
|
|
|
|
|
- public function getOrderDurationAttribute()
|
|
|
- {
|
|
|
- if (!empty($this->outtime) && !empty($this->receiving_time)) {
|
|
|
- $diff = $this->outtime - $this->receiving_time;
|
|
|
- $hour = round($diff/3600);
|
|
|
- if ($hour == 0) {
|
|
|
- return round($diff/60).'分钟';
|
|
|
- }
|
|
|
-
|
|
|
- return $hour.'小时';
|
|
|
- }
|
|
|
-
|
|
|
- return '';
|
|
|
- }
|
|
|
-
|
|
|
//取消订单,建议是在事务里面去调用
|
|
|
public static function orderCancel($order_id)
|
|
|
{
|