fetch(modify):修复BUG
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 3m27s

This commit is contained in:
sexygoat
2026-02-03 14:39:45 +08:00
parent 2c6fe4375b
commit de9753f42d
28 changed files with 4344 additions and 5092 deletions

View File

@@ -18,7 +18,11 @@ import type {
CardOrder,
BaseResponse,
PaginationResponse,
ListResponse
ListResponse,
GatewayFlowUsageResponse,
GatewayRealnameStatusResponse,
GatewayCardStatusResponse,
GatewayRealnameLinkResponse
} from '@/types/api'
export class CardService extends BaseService {
@@ -367,4 +371,62 @@ export class CardService extends BaseService {
}): Promise<BaseResponse<any>> {
return this.patch('/api/admin/iot-cards/series-binding', data)
}
// ========== IoT卡网关操作相关 ==========
/**
* 查询流量使用
* @param iccid ICCID
*/
static getGatewayFlow(iccid: string): Promise<BaseResponse<GatewayFlowUsageResponse>> {
return this.get<BaseResponse<GatewayFlowUsageResponse>>(
`/api/admin/iot-cards/${iccid}/gateway-flow`
)
}
/**
* 查询实名认证状态
* @param iccid ICCID
*/
static getGatewayRealname(iccid: string): Promise<BaseResponse<GatewayRealnameStatusResponse>> {
return this.get<BaseResponse<GatewayRealnameStatusResponse>>(
`/api/admin/iot-cards/${iccid}/gateway-realname`
)
}
/**
* 查询卡实时状态
* @param iccid ICCID
*/
static getGatewayStatus(iccid: string): Promise<BaseResponse<GatewayCardStatusResponse>> {
return this.get<BaseResponse<GatewayCardStatusResponse>>(
`/api/admin/iot-cards/${iccid}/gateway-status`
)
}
/**
* 获取实名认证链接
* @param iccid ICCID
*/
static getRealnameLink(iccid: string): Promise<BaseResponse<GatewayRealnameLinkResponse>> {
return this.get<BaseResponse<GatewayRealnameLinkResponse>>(
`/api/admin/iot-cards/${iccid}/realname-link`
)
}
/**
* 启用物联网卡(复机)
* @param iccid ICCID
*/
static startCard(iccid: string): Promise<BaseResponse> {
return this.post<BaseResponse>(`/api/admin/iot-cards/${iccid}/start`, {})
}
/**
* 停用物联网卡(停机)
* @param iccid ICCID
*/
static stopCard(iccid: string): Promise<BaseResponse> {
return this.post<BaseResponse>(`/api/admin/iot-cards/${iccid}/stop`, {})
}
}