var vm = new Vue({
el: '#app',
data: {
userName: "demo",
Password: "123456",
},
methods:
{
checkLogin: function () {
axios.get(apiurl + `api/User`, { params: { userName: this.userName, Password: this.Password } }).then(res => {
console.log('aaa')
console.log(res.data)
if (res.data.length > 0) {
window.location.href = '/home/index';
} else {
alert('用户名密码不正确')
}
})
}
}
})