no message
This commit is contained in:
@@ -57,13 +57,9 @@ const get = (url, params) => {
|
||||
const post = (url, params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
//是将对象 序列化成URL的形式,以&进行拼接
|
||||
axios.post(url, QS.stringify(params)).then(res => {
|
||||
resolve(res.data);
|
||||
}).catch(err => {
|
||||
if (err.data.code == 401) {
|
||||
resolve(err.data);
|
||||
} else reject(err.data)
|
||||
|
||||
axios.post(url, QS.stringify(params)).then(res => resolve(res.data)).catch(err => {
|
||||
if (err.data.code == 401) resolve(err.data);
|
||||
else reject(err.data)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user