'待支付', self::ORDER_STATUS_DELIVERY => '待发货', self::ORDER_STATUS_GOODS => '待收货', self::ORDER_STATUS_COMPLETE => '已完成', self::ORDER_STATUS_DOWN => '已关闭' ]; if ($type === true) { return $desc; } return $desc[$type] ?? '未知来源'; } /** * @notes 退款状态 * @param bool $type * @return string|string[] * @author 段誉 * @date 2022/3/3 14:18 */ public static function getRefundStatus($type=true) { $desc = [ self::NO_REFUND => '未退款', self::IS_REFUND => '已退款', ]; if ($type === true) { return $desc; } return $desc[$type] ?? '--'; } }