From 89b1081849c795ecf5175cded06685d7000a32b1 Mon Sep 17 00:00:00 2001 From: xierz Date: Fri, 11 Dec 2020 15:43:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=B0=81=E9=9D=A2=E6=A0=8F?= =?UTF-8?q?=E7=9B=AE=E6=96=87=E7=AB=A0=E7=9A=84=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E4=B8=8D=E8=83=BD=E5=8D=B3=E6=97=B6=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/manager/cms/content/form.ftl | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl index 9fe1ac64..034857da 100644 --- a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl @@ -391,29 +391,31 @@ that.model.form.linkId = data.data.id; that.model.save(); } - that.$notify({ title: '成功', message: '保存成功', - type: 'success' + type: 'success', + duration: 1000, + onClose: function () { + if (that.returnIsShow) { + javascript: history.go(-1); + } else { + //如果是顶级封面或封面,则重新加载,避免文章和自定义模型重复保存 + location.reload(); + } + that.saveDisabled = false; + } }); - if (that.returnIsShow) { - javascript: history.go(-1); - } else { - //如果是顶级封面或封面,则重新拿到当前封面id,避免重复保存 - that.list(that.form.categoryId); - } - } else { that.$notify({ title: '失败', message: data.msg, type: 'warning' }); + that.saveDisabled = false; } - that.saveDisabled = false; }); } else { _this.activeName = 'form';