login.vue
this.$axios({
method: ‘post’,
url: ‘/api/user/login’,
data: params
}).then(res => {
console.log(‘登录成功’)
console.log(res)
// 根据store中set_token方法将token保存至localStorage/sessionStorage中,data[“Authentication-Token”],获取token的value值
this.$store.commit(‘set_token’, data[“Authentication-Token”])
if (store.state.token) {