From 9a5d67d937c5c1970f03ccae8ceb79804131962c Mon Sep 17 00:00:00 2001 From: molong Date: Wed, 9 Aug 2017 01:15:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=8E=A7=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E5=A4=84bug=E4=BF=AE=E5=A4=8D=20=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E4=B8=80=E5=A4=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/Content.php | 19 ++++++++++--------- .../plugs/webuploader/webuploader.custom.js | 8 ++++---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/application/index/controller/Content.php b/application/index/controller/Content.php index ee318411..27d93053 100644 --- a/application/index/controller/Content.php +++ b/application/index/controller/Content.php @@ -24,26 +24,27 @@ class Content extends Fornt { $id = db('Category')->where(array('name' => $name))->getField('id'); } - if (!$id) { - return $this->error("无此频道!"); + if ($id) { + $cate = $this->getCategory($id); + + //获得当前栏目的所有子栏目 + $ids = get_category_child($id); + }else{ + $cate = array(); + $ids = ''; } - $cate = $this->getCategory($id); - - //获得当前栏目的所有子栏目 - $ids = get_category_child($id); - $data = array( 'category' => $cate, 'child_cate' => $ids, ); - if ($cate['template_index']) { + if (isset($cate['template_index']) && $cate['template_index']) { $teamplate = 'content/' . $this->modelInfo['name'] . '/' . $cate['template_index']; } else { $teamplate = 'content/' . $this->modelInfo['name'] . '/index'; } $this->assign($data); - $this->setSeo($cate['name']); + $this->setSeo($this->modelInfo['title']); return $this->fetch($teamplate); } diff --git a/public/plugs/webuploader/webuploader.custom.js b/public/plugs/webuploader/webuploader.custom.js index 22845e03..e1d60474 100644 --- a/public/plugs/webuploader/webuploader.custom.js +++ b/public/plugs/webuploader/webuploader.custom.js @@ -305,11 +305,11 @@ } else { self.resetHiddenVal(furl); } - $('#' + qfid).remove(); + $('#'+self.options.listName+' #'+qfid).remove(); - if (qfid.substring(0, 7) == 'WU_FILE') { - self.BDUploader.removeFile(qfid, true); - } + // if (qfid.substring(0, 7) == 'WU_FILE') { + // self.BDUploader.removeFile(qfid, true); + // } self.allowNum++; } else { $.messager.show(json.msg, {