This commit is contained in:
2025-12-20 17:42:02 +08:00
parent e35354e63f
commit 52b9cc0d5f
3 changed files with 27 additions and 25 deletions
@@ -110,7 +110,7 @@ layout("/layouts/platform.html"){
</div>
<script>
<script nonce="${cspNonce!}">
<!--#include("addForm.js"){}#-->
<!--#include("editForm.js"){}#-->
<!--#include("adjust.js"){}#-->
@@ -390,19 +390,21 @@ const write = {
type: 'warning'
}).then(async () => {
const loading = createLoading('正在提交中')
const {code} = await $.post('/platform/teacherCongress/delegate/push/write/save', this.formData)
loading.close()
if (code === 0) {
this.$message.success('保存成功')
this.$emit('refresh')
if (this.session_id && this.user_id) {
await this.initOtherInfo()
this.$axios.post('/platform/teacherCongress/delegate/push/write/save', this.formData).then(async resp => {
loading.close()
if (resp.code === 0) {
this.$message.success('保存成功')
this.$emit('refresh')
if (this.session_id && this.user_id) {
await this.initOtherInfo()
} else {
await this.initInfo()
}
} else {
await this.initInfo()
this.$message.warning('保存失败')
}
} else {
this.$message.warning('保存失败')
}
})
}).catch(() => {
})
@@ -418,18 +420,20 @@ const write = {
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const {code} = await $.post('/platform/teacherCongress/delegate/push/write/submit', this.formData)
if (code === 0) {
this.$message.success('提交成功')
this.$emit('refresh')
if (this.session_id && this.user_id) {
await this.initOtherInfo()
this.$axios.post('/platform/teacherCongress/delegate/push/write/submit', this.formData).then(async resp => {
if (resp.code === 0) {
this.$message.success('提交成功')
this.$emit('refresh')
if (this.session_id && this.user_id) {
await this.initOtherInfo()
} else {
await this.initInfo()
}
} else {
await this.initInfo()
this.$message.warning('提交失败')
}
} else {
this.$message.warning('提交失败')
}
})
}).catch(() => {
})