本文共 557 字,大约阅读时间需要 1 分钟。
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('用户名密码不正确') } }) } }})
转载地址:http://rmumf.baihongyu.com/