Commit cee45df2 authored by liwei's avatar liwei

修改了post请求

parent 44afa9ef
...@@ -145,8 +145,8 @@ function getToken () { ...@@ -145,8 +145,8 @@ function getToken () {
function post (url, params,headers, loading, config) { function post (url, params,headers, loading, config) {
showLoading(loading); showLoading(loading);
//console.log(ipAddress); //console.log(ipAddress);
AIapi.defaults.headers = headers || {'Content-Type': 'application/json'}
AIapi.defaults.headers[_Authorization] = getToken(); AIapi.defaults.headers[_Authorization] = getToken();
// AIapi.defaults.headers = headers || {'Content-Type': 'application/json'}
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
AIapi.post(url, params, config) AIapi.post(url, params, config)
.then(response => { .then(response => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment