From 704841388570c6e930d9b58bbbadabb6881701fa Mon Sep 17 00:00:00 2001 From: xierz Date: Mon, 19 Oct 2020 12:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=90=E6=A0=8F=E7=9B=AE?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/WEB-INF/manager/cms/category/form.ftl | 13 ++++++++----- .../webapp/WEB-INF/manager/cms/category/index.ftl | 8 ++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/webapp/WEB-INF/manager/cms/category/form.ftl b/src/main/webapp/WEB-INF/manager/cms/category/form.ftl index 657ae2f5..8aed6bac 100644 --- a/src/main/webapp/WEB-INF/manager/cms/category/form.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/category/form.ftl @@ -540,15 +540,18 @@ this.categoryUrlOptionsGet(); this.categoryFlagOptionsGet(); this.form.id = ms.util.getParameter("id"); - this.form.child = ms.util.getParameter("child"); + this.form.childId = ms.util.getParameter("childId");// 判断是否增加子栏目 - this.categoryTypeDisabled = false; - if (this.form.id != undefined && this.form.child == undefined) { + // 判断三种状态,默认为编辑状态 + this.categoryTypeDisabled = false;// 控制栏目分类是否可编辑 + if (this.form.id != undefined && this.form.childId == undefined) { + // 切换新增状态,id&childId 为空 this.categoryTypeDisabled = true; this.get(this.form.id); - } else if (this.form.child) { + } else if (this.form.childId) { + // 切换新增子栏目状态,id&childId 不为空 this.form.id = null; - this.form.categoryId = this.form.child; + this.form.categoryId = this.form.childId; } } }); diff --git a/src/main/webapp/WEB-INF/manager/cms/category/index.ftl b/src/main/webapp/WEB-INF/manager/cms/category/index.ftl index 86626509..aa830e6c 100644 --- a/src/main/webapp/WEB-INF/manager/cms/category/index.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/category/index.ftl @@ -62,10 +62,10 @@ {{scope.row.categoryType == '2'?scope.row.categoryUrl:''}} - +