feat: complete overseas PDA warehouse operations
This commit is contained in:
+2
-2
@@ -77,7 +77,7 @@ function rawUpload(path, filePath, name, token) {
|
||||
name,
|
||||
header: { Authorization: `Bearer ${token}` },
|
||||
success: resolve,
|
||||
fail: (cause) => reject(Object.assign(new Error(cause.errMsg || '卸柜照片上传失败'), { network: true }))
|
||||
fail: (cause) => reject(Object.assign(new Error(cause.errMsg || '海外作业文件上传失败'), { network: true }))
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -111,7 +111,7 @@ export async function overseasUpload(path, filePath, name = 'file', retry = true
|
||||
response = await rawUpload(path, filePath, name, replacementToken)
|
||||
try { body = JSON.parse(response.data || '{}') } catch (_) { body = null }
|
||||
}
|
||||
if (!successful(response, body)) throw errorFrom({ ...response, data: body }, '卸柜照片上传失败')
|
||||
if (!successful(response, body)) throw errorFrom({ ...response, data: body }, '海外作业文件上传失败')
|
||||
return body.data
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user