You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.6 KiB
TypeScript

import request from '@/config/axios'
// 代理服务 VO
export interface FrpcProxyServerVO {
id: number // id
frpcName: string // 代理名称
localIp: string // 内网IP
localPort: number // 内网端口
suffixPath: string // 访问后缀
localStatus: string // 内网状态
frpsId: number // 代理服务器
proxyPort: number // 代理端口
proxyAddress: string // 代理地址
proxyStatus: string // 代理状态
remark: string // 备注
isEnable: boolean // 是否启用
}
// 代理服务 API
export const FrpcProxyServerApi = {
// 查询代理服务分页
getFrpcProxyServerPage: async (params: any) => {
return await request.get({ url: `/iot/frpc-proxy-server/page`, params })
},
// 查询代理服务详情
getFrpcProxyServer: async (id: number) => {
return await request.get({ url: `/iot/frpc-proxy-server/get?id=` + id })
},
// 新增代理服务
createFrpcProxyServer: async (data: FrpcProxyServerVO) => {
return await request.post({ url: `/iot/frpc-proxy-server/create`, data })
},
// 修改代理服务
updateFrpcProxyServer: async (data: FrpcProxyServerVO) => {
return await request.put({ url: `/iot/frpc-proxy-server/update`, data })
},
// 删除代理服务
deleteFrpcProxyServer: async (id: number) => {
return await request.delete({ url: `/iot/frpc-proxy-server/delete?id=` + id })
},
// 导出代理服务 Excel
exportFrpcProxyServer: async (params) => {
return await request.download({ url: `/iot/frpc-proxy-server/export-excel`, params })
},
}