This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* 运营商类型配置
|
||||
*/
|
||||
|
||||
import { CarrierType } from '@/types/api'
|
||||
import { CarrierType, type CarrierRealnameControlEnabled } from '@/types/api'
|
||||
|
||||
// 运营商类型选项
|
||||
export const CARRIER_TYPE_OPTIONS = [
|
||||
@@ -30,3 +30,11 @@ export function getCarrierTypeLabel(type: CarrierType): string {
|
||||
export function getCarrierTypeColor(type: CarrierType): string {
|
||||
return CARRIER_TYPE_MAP[type]?.color || '#666'
|
||||
}
|
||||
|
||||
export function getCarrierRealnameControlLabel(
|
||||
enabled?: CarrierRealnameControlEnabled | null
|
||||
): string {
|
||||
if (enabled === 1) return '管控'
|
||||
if (enabled === 0) return '不管控'
|
||||
return '-'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user