feat: 专家执业证书/职称证明批量导入 (zip 按手机号/姓名匹配回填)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -38,4 +38,42 @@ export function downloadExpertImportTpl() {
|
||||
method: 'get',
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入执业证书 (zip 压缩包或单文件): 后端异步处理, 返回 {jobId}.
|
||||
* 文件名以手机号命名 (姓名唯一命中兜底), 后端匹配专家并回填 practice_cert_url.
|
||||
* 上传成功后轮询 queryUploadProgress(jobId) 读进度与结果.
|
||||
*/
|
||||
export function importPracticeCert(file) {
|
||||
const form = new FormData()
|
||||
form.append('file', file)
|
||||
return request({
|
||||
url: '/business/expert/importPracticeCert',
|
||||
method: 'post',
|
||||
data: form,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入职称证明 (zip 压缩包或单文件): 同 importPracticeCert, 回填 title_cert_url.
|
||||
*/
|
||||
export function importTitleCert(file) {
|
||||
const form = new FormData()
|
||||
form.append('file', file)
|
||||
return request({
|
||||
url: '/business/expert/importTitleCert',
|
||||
method: 'post',
|
||||
data: form,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询批量上传任务进度 (后端异步处理, 前端轮询).
|
||||
* @returns {Promise<{code,msg,data:{jobId,done,total,finished,error,message,result}}>}
|
||||
*/
|
||||
export function queryUploadProgress(jobId) {
|
||||
return request({ url: `/business/upload/progress/${jobId}`, method: 'get' })
|
||||
}
|
||||
Reference in New Issue
Block a user