'未发货', self::SHIPPED => '已发货', ]; if (true === $value) { return $data; } return $data[$value]; } /** * @notes 配送方式 * @param bool $value * @return string|string[] * @author 段誉 * @date 2022/4/1 14:31 */ public static function getSendTypeDesc($value = true) { $data = [ self::EXPRESS => '快递配送', self::NO_EXPRESS => '无需快递', ]; if (true === $value) { return $data; } return $data[$value]; } }