This commit is contained in:
@@ -381,4 +381,28 @@ export class CardService extends BaseService {
|
||||
`/api/admin/iot-cards/${iccid}/realname-link`
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用 IoT 卡
|
||||
* @param id IoT卡ID
|
||||
*/
|
||||
static enableIotCard(id: number): Promise<BaseResponse> {
|
||||
return this.post<BaseResponse>(`/api/admin/iot-cards/${id}/enable`, {})
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用 IoT 卡
|
||||
* @param id IoT卡ID
|
||||
*/
|
||||
static disableIotCard(id: number): Promise<BaseResponse> {
|
||||
return this.post<BaseResponse>(`/api/admin/iot-cards/${id}/disable`, {})
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动停用 IoT 卡
|
||||
* @param id IoT卡ID
|
||||
*/
|
||||
static deactivateIotCard(id: number): Promise<BaseResponse> {
|
||||
return this.patch<BaseResponse>(`/api/admin/iot-cards/${id}/deactivate`, {})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user