|
@@ -31,9 +31,7 @@ export const handleRequest = (reqConfig) => {
|
|
|
uni.uploadFile({
|
|
|
url: reqConfig.url,
|
|
|
formData: uploadParams.data,
|
|
|
- header: {
|
|
|
- Token: uploadParams.header.Token
|
|
|
- },
|
|
|
+ file: reqConfig.data.file.file,
|
|
|
success: function (res) {
|
|
|
resolve(JSON.parse(res.data));
|
|
|
},
|
|
@@ -51,8 +49,8 @@ export const handleRequest = (reqConfig) => {
|
|
|
const url = reqConfig.url + '?' + Object.keys(reqConfig.data).map(key => key + '=' + reqConfig.data[key]).join('&');
|
|
|
uni.downloadFile({
|
|
|
url,
|
|
|
- header:{
|
|
|
- ...reqConfig.header
|
|
|
+ header: {
|
|
|
+ ...reqConfig.header
|
|
|
},
|
|
|
success: function (res) {
|
|
|
resolve(res.tempFilePath);
|