后台代码

前台
router.js
import Axios from "axios"
import qs from 'qs'
Vue.prototype.$qs = qs;
Vue.prototype.$http = Axios;
Vue.config.debug = true;
Axios.defaults.withCredentials=true;

请求数据方法

PostLogin(){
var postData = qs.stringify({ user: this.user, password: this.password
});
Axios.post('http://moyouqi1.gz01.bdysite.com/api/api_login.php',postData).then((res)=>{
console.log(res)
if(res.data == 0){
console.log('用户名密码错误')
}else if(res.data == 1){
console.log('用户名密码错误')
}else if(res.data.user == 2){
this.Loging = false;
this.$router.push({name:'menber'});
console.log('200')
}else{
console.log('500')
}
})
}
那里错了 实在是不知道了 就是获取不了 session的值 网站的方法试了个遍