Import the supplied management frontend, including request encryption, withdrawal updates, and vendored dependencies. Use incoming versions for overlapping source files and retain existing environment configuration absent from the supplied directory.
55 lines
1.6 KiB
TypeScript
55 lines
1.6 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
export interface AirlineAccountVO {
|
|
id?: number
|
|
mobile: string
|
|
channel: string
|
|
password?: string
|
|
startTime: string
|
|
endTime: string
|
|
deviceId?: string
|
|
status: number
|
|
remark?: string
|
|
userId?: number
|
|
expired?: boolean
|
|
notStarted?: boolean
|
|
createTime?: string
|
|
}
|
|
|
|
export const channelOptions = [
|
|
{ value: 'CZ', label: '南方航空' },
|
|
{ value: 'MU', label: '东方航空' },
|
|
{ value: 'HU', label: '海南航空' }
|
|
]
|
|
|
|
// 渠道编码 -> 全称(列表页等处展示用;存储值仍为 CZ/MU/HU)
|
|
export const channelLabelMap: Record<string, string> = {
|
|
CZ: '南方航空',
|
|
MU: '东方航空',
|
|
HU: '海南航空'
|
|
}
|
|
|
|
export const getAirlineAccountPage = async (params: any) => {
|
|
return await request.get({ url: `/member/airline-account/page`, params })
|
|
}
|
|
|
|
export const getAirlineAccount = async (id: number) => {
|
|
return await request.get({ url: `/member/airline-account/get?id=` + id })
|
|
}
|
|
|
|
export const createAirlineAccount = async (data: AirlineAccountVO) => {
|
|
return await request.post({ url: `/member/airline-account/create`, data })
|
|
}
|
|
|
|
export const updateAirlineAccount = async (data: AirlineAccountVO) => {
|
|
return await request.put({ url: `/member/airline-account/update`, data })
|
|
}
|
|
|
|
export const deleteAirlineAccount = async (id: number) => {
|
|
return await request.delete({ url: `/member/airline-account/delete?id=` + id })
|
|
}
|
|
|
|
export const unbindAirlineDevice = async (id: number) => {
|
|
return await request.put({ url: `/member/airline-account/unbind-device?id=` + id })
|
|
}
|