'待使用', self::used => '已使用', self::expire => '已过期', self::close => '已关闭', ]; if($status) return $list[$status] ?? ''; return $list; } const all = 1; const selected = 2; const selected_out = 3; const category_selected = 4; const category_selected_out = 5; public static function getGoodsType($type = ''){ $list = [ self::all => '全部商品参与', self::selected => '指定商品参与', self::selected_out => '指定商品不参与', self::category_selected => '指定分类参与', self::category_selected_out => '指定分类不参与', ]; if($type) return $list[$type] ?? ''; return $list; } const channel_all = 'all'; const channel_online = 'online'; const channel_offline = 'offline'; /** * @param $type * @return string|string[] */ public static function getUseChannelType($type = ''){ $list = [ self::channel_all => '线上线下使用', self::channel_online => '线上使用', self::channel_offline => '线下使用' ]; if($type) return $list[$type] ?? ''; return $list; } const store_all = 'all'; const store_selected = ''; public static function getUseStoreType($type = ''){ $list = [ self::store_all => '全部门店', self::store_selected => '部分门店', ]; if($type) return $list[$type] ?? ''; return $list; } }