|
@@ -2125,7 +2125,7 @@ export const uploadReportOnly = (filePath, type) => {
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
const token = uni.getStorageSync('token')
|
|
const token = uni.getStorageSync('token')
|
|
|
uni.uploadFile({
|
|
uni.uploadFile({
|
|
|
- url: BASE_URL + '/api/health/report/upload' + (type ? '?type=' + type : ''),
|
|
|
|
|
|
|
+ url: BASE_URL + '/api/health/report/upload-only' + (type ? '?type=' + type : ''),
|
|
|
filePath: filePath,
|
|
filePath: filePath,
|
|
|
name: 'file',
|
|
name: 'file',
|
|
|
header: {
|
|
header: {
|
|
@@ -2137,12 +2137,12 @@ export const uploadReportOnly = (filePath, type) => {
|
|
|
if (data && data.code === 200) {
|
|
if (data && data.code === 200) {
|
|
|
resolve(data)
|
|
resolve(data)
|
|
|
} else {
|
|
} else {
|
|
|
- console.warn('[API] 上传失败 ' + BASE_URL + '/api/health/report/upload' + ' code=' + (data && data.code || '') + ' msg=' + (data && data.message || ''))
|
|
|
|
|
|
|
+ console.warn('[API] 上传失败 ' + BASE_URL + '/api/health/report/upload-only' + ' code=' + (data && data.code || '') + ' msg=' + (data && data.message || ''))
|
|
|
reject(data)
|
|
reject(data)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
fail: (err) => {
|
|
fail: (err) => {
|
|
|
- console.error('[API] 上传网络错误 ' + BASE_URL + '/api/health/report/upload', err)
|
|
|
|
|
|
|
+ console.error('[API] 上传网络错误 ' + BASE_URL + '/api/health/report/upload-only', err)
|
|
|
reject(err)
|
|
reject(err)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|