修改文件上传
This commit is contained in:
parent
3e1ab1d75b
commit
abdc58312c
|
|
@ -104,6 +104,9 @@ export function updateUserPwd(oldPassword, newPassword) {
|
|||
export function uploadAvatar(data) {
|
||||
return request({
|
||||
url: '/system/user/profile/avatar',
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
|
|
|
|||
|
|
@ -32,14 +32,14 @@ service.interceptors.request.use(config => {
|
|||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
// get请求映射params参数
|
||||
if (config.method === 'get' && config.params) {
|
||||
let param=tansParams(config.params);
|
||||
if(param){
|
||||
param = param.slice(0, -1);
|
||||
param=encryptCBC(param);
|
||||
}
|
||||
let url = config.url + '?' + param;
|
||||
config.params = {};
|
||||
config.url = url;
|
||||
let param=tansParams(config.params);
|
||||
if(param){
|
||||
param = param.slice(0, -1);
|
||||
param=encryptCBC(param);
|
||||
}
|
||||
let url = config.url + '?' + param;
|
||||
config.params = {};
|
||||
config.url = url;
|
||||
}
|
||||
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue