Browse Source

fix: BI-51874 修复http请求时中文在ie下乱码的问题。

qufenxi
alan 5 years ago
parent
commit
8478244974
  1. 12
      src/modules/crud/crud.service.ts

12
src/modules/crud/crud.service.ts

@ -76,6 +76,9 @@ export function requestGet(url: string, data?: any, params: CrudParams = {}) {
type: 'GET', type: 'GET',
data, data,
params, params,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
}); });
} }
@ -85,6 +88,9 @@ export function requestPost(url: string, data = {}, params: CrudParams = {}) {
type: 'POST', type: 'POST',
data, data,
params, params,
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
},
}); });
} }
@ -93,6 +99,9 @@ export function requestDelete(url: string, data = {}) {
url, url,
type: 'DELETE', type: 'DELETE',
data, data,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
}); });
} }
@ -102,5 +111,8 @@ export function requestPut(url: string, data = {}, params: CrudParams = {}) {
type: 'PUT', type: 'PUT',
data, data,
params, params,
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
},
}); });
} }

Loading…
Cancel
Save