'物流订单', self::store => '自提订单', self::local => '外卖订单', self::virtual => '虚拟订单', self::cashier => '收银订单', ]; $temp_list = array_filter(event('GetOrderType')); if(!empty($temp_list)){ foreach($temp_list as $k => $v){ $list = array_merge($list, $v); } } if($type) return $list[$type] ?? ''; return $list; } const scene_online = 'online'; const scene_cashier = 'cashier'; /** * 订单创建场景 * @param $type * @return string|string[] */ public static function getOrderScene($type = ''){ $list = [ self::scene_online => '线上订单', self::scene_cashier => '自收银台订单', ]; if($type) return $list[$type] ?? ''; return $list; } const evaluate_wait = 0; const evaluated = 1; const evaluate_again = 2; /** * 订单评价状态 * @param $status * @return string|string[] */ public static function getEvaluateStatus($status = ''){ $list = [ self::evaluate_wait => '待评价', self::evaluated => '已评价', self::evaluate_again => '已追评', ]; if($status !== '') return $list[$status] ?? ''; return $list; } }