Commit 91e0176e by 肖康

x

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