Skip to content

Commit

Permalink
修改提醒方法
Browse files Browse the repository at this point in the history
  • Loading branch information
dplcz committed Nov 3, 2022
1 parent 8174569 commit 929c584
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions components/ActTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export default {
}
).catch((err) => {
if (err.response.status == 401 || err.response.status == 422) {
alert("验证过期,请重新登录");
this.$message.error("验证过期,请重新登录");
// this.$router.push("/man-login");
}
});
Expand All @@ -335,7 +335,7 @@ export default {
withCredentials: true,
}).catch((err) => {
if (err.response.status == 401 || err.response.status == 422) {
alert("验证过期,请重新登录");
this.$message.error("验证过期,请重新登录");
this.$router.push("/man-login");
}
});
Expand All @@ -351,14 +351,14 @@ export default {
if (!valid) return;
const res = await this.$axios.post("/man/insert/activity", this.addForm, {withCredentials: true}).catch((err) => {
if (err.response.status == 401 || err.response.status == 422) {
alert("验证过期,请重新登录")
this.$message.error("验证过期,请重新登录")
this.$router.push("/man-login");
} else {
this.$message.error("操作失败");
}
});
console.log(res)
if (res['code'] != 0) {
// console.log(res)
if (res.status != 201) {
return this.$message.error("操作失败");
}
this.$message.success("操作成功");
Expand Down
4 changes: 2 additions & 2 deletions components/AwardTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export default {
withCredentials: true,
}
).catch((err) => {
alert("验证过期,请重新登录");
this.$message.error("验证过期,请重新登录");
this.$router.push("/man-login");
});
if (award["code"] != 0) return;
Expand All @@ -291,7 +291,7 @@ export default {
withCredentials: true,
}).catch((err) => {
if (err.response.status == 401 || err.response.status == 422) {
alert("验证过期,请重新登录");
this.$message.error("验证过期,请重新登录");
this.$router.push("/man-login");
}
});
Expand Down
6 changes: 3 additions & 3 deletions components/ManageLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default {
async login(submit_flag) {
if (submit_flag) {
if (this.username == "" || this.password == "") {
alert("请输入用户名或密码");
this.$message.error("请输入用户名或密码");
} else {
let formData = new FormData();
formData.append("username", this.username);
Expand All @@ -90,11 +90,11 @@ export default {
this.$router.push("/man-index");
// console.log(res.headers);
} else {
alert("账号或者密码有误,请重新登录");
this.$message.error("账号或者密码有误,请重新登录");
}
})
.catch((error) => {
alert("账号或者密码有误,请重新登录");
this.$message.error("账号或者密码有误,请重新登录");
});
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions components/ProjectTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export default {
withCredentials: true,
}
).catch((err) => {
alert("验证过期,请重新登录");
this.$message.error("验证过期,请重新登录");
this.$router.push("/man-login");
});
if (project["code"] != 0) return;
Expand All @@ -278,7 +278,7 @@ export default {
withCredentials: true,
}).catch((err) => {
if (err.response.status == 401 || err.response.status == 422) {
alert("验证过期,请重新登录");
this.$message.error("验证过期,请重新登录");
this.$router.push("/man-login");
}
});
Expand Down
4 changes: 2 additions & 2 deletions components/TeacherTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export default {
withCredentials: true,
}
).catch((err) => {
alert("验证过期,请重新登录");
this.$message.error("验证过期,请重新登录");
this.$router.push("/man-login");
});
if (teacherList["code"] != 0) return;
Expand All @@ -261,7 +261,7 @@ export default {
withCredentials: true,
}).catch((err) => {
if (err.response.status == 401 || err.response.status == 422) {
alert("验证过期,请重新登录");
this.$message.error("验证过期,请重新登录");
this.$router.push("/man-login");
}
});
Expand Down
4 changes: 2 additions & 2 deletions pages/man-index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default {
};
},
created() {
// this.judgeLogin();
this.judgeLogin();
},
methods: {
change(nu) {
Expand All @@ -120,7 +120,7 @@ export default {
})
.catch((error) => {
// console.log(error);
alert("验证过期,请重新登录");
this.$message.warning("验证过期,请重新登录")
this.$router.push("/man-login");
});
},
Expand Down

0 comments on commit 929c584

Please sign in to comment.