fix: 修改默认账号密码

This commit is contained in:
Shu Guang 2025-05-23 08:51:43 +08:00
parent 34976bc289
commit c7b66d5aba
2 changed files with 33 additions and 15 deletions

View File

@ -52,8 +52,8 @@ export default {
loading: false, loading: false,
svg: "", svg: "",
formData: { formData: {
sTId: "213010127", sTId: "Admin",
password: "0127", password: "12345678",
}, },
rules: { rules: {
sTId: { required: true, message: "请输入学号/工号!" }, sTId: { required: true, message: "请输入学号/工号!" },

View File

@ -287,25 +287,43 @@ export default {
articleContent: this.myValue, articleContent: this.myValue,
}; };
// ID
const apiCall = this.articleId const apiCall = this.articleId
? UpArtile({ ...data, articleId: this.articleId }) // ID ? UpArtile({ ...data, articleId: this.articleId })
: createArticle(data); // ID : createArticle(data);
apiCall apiCall
.then((res) => { .then((res) => {
const successMsg = this.articleId ? "修改成功" : "发布成功"; if (res.code == 200) {
this.$message.success(successMsg); this.$message.success(this.articleId ? "修改成功" : "发布成功");
// this.articleId = res.data;
// if (this.articleType == "公告") {
if (!this.articleId && this.articleType == "公告") { this.$modal.confirm({
// ...... title: `确认发送短信与邮件通知用户?`,
onOk: () => {
console.log("articleId", this.articleId, this.articleId);
let notificationData = {
competitionId: this.competitionId,
articleId: this.articleId,
};
this.$api
.SendEmail(notificationData)
.then(() => {
return this.$api.SendSMS(notificationData);
})
.then(() => {
this.$message.success("短信邮件提醒成功!");
})
.catch((e) => {
this.$message.error(e.msg || "发送失败!");
throw e;
});
},
});
}
} else {
throw new Error("发布失败");
} }
//
setTimeout(() => {
this.$router.push("/account/center");
}, 1500);
}) })
.catch((error) => { .catch((error) => {
console.error(error); console.error(error);