fix: 修改默认账号密码
This commit is contained in:
parent
34976bc289
commit
c7b66d5aba
@ -52,8 +52,8 @@ export default {
|
||||
loading: false,
|
||||
svg: "",
|
||||
formData: {
|
||||
sTId: "213010127",
|
||||
password: "0127",
|
||||
sTId: "Admin",
|
||||
password: "12345678",
|
||||
},
|
||||
rules: {
|
||||
sTId: { required: true, message: "请输入学号/工号!" },
|
||||
|
@ -287,25 +287,43 @@ export default {
|
||||
articleContent: this.myValue,
|
||||
};
|
||||
|
||||
// 根据是否有ID决定调用创建还是更新
|
||||
const apiCall = this.articleId
|
||||
? UpArtile({ ...data, articleId: this.articleId }) // 编辑需要传ID
|
||||
: createArticle(data); // 创建不需要ID
|
||||
? UpArtile({ ...data, articleId: this.articleId })
|
||||
: createArticle(data);
|
||||
|
||||
apiCall
|
||||
.then((res) => {
|
||||
const successMsg = this.articleId ? "修改成功" : "发布成功";
|
||||
this.$message.success(successMsg);
|
||||
if (res.code == 200) {
|
||||
this.$message.success(this.articleId ? "修改成功" : "发布成功");
|
||||
// this.articleId = res.data;
|
||||
|
||||
// 如果是新建且类型为公告,保留原有通知逻辑
|
||||
if (!this.articleId && this.articleType == "公告") {
|
||||
// ...原有通知逻辑...
|
||||
if (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) => {
|
||||
console.error(error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user