Commit 91e0176e by 肖康

x

parent c4bef471
......@@ -45,9 +45,9 @@ export const http = (method, url, param,loading) => {
};
// post请求时需要设定Content-Type
if (method === 'post') {
if (method == 'post'||method == 'POST') {
config.data = param;
} else if (method === 'get') {
} else if (method === 'get'||method == 'GET') {
config.params = param;
}
return axios(config);
......
......@@ -299,7 +299,7 @@
this.tabss(key)
},
logout() {
this.$http('POST', "/auth/logout").then(res => {
this.$http('post', "/auth/logout").then(res => {
Util.delCookie('token');
if (res.err_code === 0) {
window.location.href = '/#/login';
......
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 sign in to comment