const doLogin = function (username, password, v, callback) {
};
doLogin(localStorage.username, localStorage.password, this, function (res, msg) { if (res) { this.$store.commit({
type: 'login',
username: res.name,
token: res.token,
});
});this.$store这里的this指向不正确怎么把外层this绑定给这个回调函
添加回答
举报
0/150
提交
取消