Skip to content

Commit

Permalink
index 修正登录错误判断处理
Browse files Browse the repository at this point in the history
  • Loading branch information
suvvm committed Dec 5, 2019
1 parent b9aa3f9 commit 4ade862
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@
};
rp(options).then(res => {
this.$toast.clear();
if(res == null) {
if(res == "null") {
this.$toast.fail('用户名或密码错误');
} else {
var userInfo = JSON.parse(res);
console.log(userInfo);
this.$cookies.set("userInfo", userInfo, 60 * 60 * 24 * 7);
this.$toast.success('登录成功');
this.$router.push({
Expand Down

0 comments on commit 4ade862

Please sign in to comment.