diff --git a/app/common/enum/OrderEnum.php b/app/common/enum/OrderEnum.php index 6674b96a..8ffae83e 100644 --- a/app/common/enum/OrderEnum.php +++ b/app/common/enum/OrderEnum.php @@ -180,6 +180,10 @@ class OrderEnum */ public static function getOrderType($value = true) { + if($value==-1){ + $status = self::refundStatus($value) ?? ''; + return $status; + } $data = [ self::RECEIVED_GOODS => '已完成', self::WAIT_EVALUATION => '待评价', diff --git a/app/common/model/store_order/StoreOrder.php b/app/common/model/store_order/StoreOrder.php index 81d0cb40..90b1efcc 100644 --- a/app/common/model/store_order/StoreOrder.php +++ b/app/common/model/store_order/StoreOrder.php @@ -40,12 +40,8 @@ class StoreOrder extends BaseModel public function getStatusNameTextAttr($value, $data) { - if($data['status']==-1){ - $status = OrderEnum::refundStatus($data['refund_status']) ?? ''; - }else{ - $status = OrderEnum::getOrderType($data['status']) ?? ''; - } + $status = OrderEnum::getOrderType($data['status']) ?? ''; return $status; }