fix: 修改默认账号密码
This commit is contained in:
parent
34976bc289
commit
c7b66d5aba
@ -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: "请输入学号/工号!" },
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user