This commit is contained in:
@@ -273,23 +273,18 @@ export class CardService extends BaseService {
|
||||
// ========== ICCID批量导入相关 ==========
|
||||
|
||||
/**
|
||||
* 批量导入ICCID
|
||||
* @param file Excel文件
|
||||
* @param carrier_id 运营商ID
|
||||
* @param batch_no 批次号(可选)
|
||||
* 批量导入ICCID(新版:使用 JSON 格式)
|
||||
* @param data 导入请求参数
|
||||
*/
|
||||
static importIotCards(
|
||||
file: File,
|
||||
carrier_id: number,
|
||||
static importIotCards(data: {
|
||||
carrier_id: number
|
||||
file_key: string
|
||||
batch_no?: string
|
||||
): Promise<BaseResponse> {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
formData.append('carrier_id', carrier_id.toString())
|
||||
if (batch_no) {
|
||||
formData.append('batch_no', batch_no)
|
||||
}
|
||||
return this.upload('/api/admin/iot-cards/import', file, { carrier_id, batch_no })
|
||||
}): Promise<BaseResponse<{ task_id: number; task_no: string; message: string }>> {
|
||||
return this.post<BaseResponse<{ task_id: number; task_no: string; message: string }>>(
|
||||
'/api/admin/iot-cards/import',
|
||||
data
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user