'warning', static::Goods => 'primary', // static::Wallet => 'blue1', // static::Balance => 'pink', // static::Point => 'success', static::Money => 'danger', static::Coupon => 'orange', }; $background = Admin::color()->get($color, 'dark'); $name = static::options()[$this->value] ?? '其它'; return "{$name}"; } public static function options() { return [ self::None->value => '谢谢参与', self::Goods->value => '实物', // self::Wallet->value => '可提', // self::Balance->value => '余额', // self::Point->value => '积分', self::Money->value => '现金', self::Coupon->value => '优惠券', ]; } }