I have a form which related on v-model
.
(我有一个与v-model
有关的表格。)
So, it is default login page. (因此,这是默认的登录页面。)
When I try to log in I got unautorized 401, but in Postman I got the token with same credentials. (当我尝试登录时,我得到了未指定的401,但在邮递员中,我获得了具有相同凭据的令牌。)
export default {
data() {
return {
email: '',
password: '',
output: ''
};
},
methods: {
login() {
axios.post('api/login', {
email: this.email,
password: this.password },
{ headers: {
'Content-type': 'application/x-www-form-urlencoded',
}
}).then(response => {
this.output = response.data;
});
}
}
}
ask by Danabek Duisekov translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…