From e04e6afbd938273449d495dc0792eeb27be7b13b Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Sat, 20 Oct 2018 00:49:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/NavigationController.class.php | 12 +- .../Admin/Lang/zh-cn/navigation.php | 12 +- .../Admin/Model/NavigationModel.class.php | 8 +- .../Admin/View/Default/Navigation/Index.html | 424 +++++++++--------- .../Application/Common/Common/function.php | 4 +- service/Application/Common/Lang/zh-cn.php | 2 +- service/Public/Admin/Default/Js/Navigation.js | 2 +- service/Public/Home/Default/Css/Common.css | 3 + 8 files changed, 239 insertions(+), 228 deletions(-) diff --git a/service/Application/Admin/Controller/NavigationController.class.php b/service/Application/Admin/Controller/NavigationController.class.php index d84a2eea2..b7f5bf83e 100755 --- a/service/Application/Admin/Controller/NavigationController.class.php +++ b/service/Application/Admin/Controller/NavigationController.class.php @@ -2,6 +2,8 @@ namespace Admin\Controller; +use Service\ArticleService; + /** * 导航管理 * @author Devil @@ -50,8 +52,8 @@ class NavigationController extends CommonController // 一级分类 $this->assign('nav_header_pid_list', M('Navigation')->field(array('id', 'name'))->where(array('is_show'=>1, 'pid'=>0, 'nav_type'=>$this->nav_type))->select()); - // 文章分类 - $this->assign('article_category_list', M('ArticleCategory')->field(array('id', 'name'))->where(array('is_enable'=>1))->select()); + // 获取分类和文章 + $this->assign('article_list', ArticleService::ArticleCategoryList()); // 商品分类 $field = 'id,name'; @@ -134,7 +136,7 @@ class NavigationController extends CommonController break; // 文章分类导航 - case 'article_category': + case 'article': $this->DataSave(6); break; @@ -172,8 +174,8 @@ class NavigationController extends CommonController switch(I('data_type')) { // 文章分类导航 - case 'article_category': - $temp_name = M('ArticleCategory')->where(array('id'=>I('value')))->getField('name'); + case 'article': + $temp_name = M('Article')->where(array('id'=>I('value')))->getField('title'); break; // 自定义页面导航 diff --git a/service/Application/Admin/Lang/zh-cn/navigation.php b/service/Application/Admin/Lang/zh-cn/navigation.php index 859d075de..5e0efa035 100755 --- a/service/Application/Admin/Lang/zh-cn/navigation.php +++ b/service/Application/Admin/Lang/zh-cn/navigation.php @@ -12,10 +12,10 @@ return array( 'navigation_add_name' => '导航添加', 'navigation_edit_name' => '导航编辑', 'navigation_custom_operation_add' => '自定义', - 'navigation_article_category_operation_add' => '文章分类', - 'navigation_customview_operation_add' => '自定义', + 'navigation_article_operation_add' => '文章', + 'navigation_customview_operation_add' => '自定义页面', 'navigation_goods_category_operation_add' => '商品分类', - 'navigation_article_category_name_format' => '默认文章分类名称', + 'navigation_article_name_format' => '默认文章名称', 'navigation_customview_name_format' => '默认自定义页面名称', 'navigation_goods_category_name_format' => '默认商品分类名称', @@ -28,9 +28,9 @@ return array( 'navigation_url_text_tips' => '带http://', 'navigation_url_format' => 'url格式有误', - // 文章分类导航 - 'navigation_article_category_id_text' => '文章分类', - 'navigation_article_category_id_format' => '文章分类选择有误', + // 文章导航 + 'navigation_article_id_text' => '文章', + 'navigation_article_id_format' => '文章选择有误', // 自定义页面导航 'navigation_customview_id_text' => '自定义页面', diff --git a/service/Application/Admin/Model/NavigationModel.class.php b/service/Application/Admin/Model/NavigationModel.class.php index 8bbe7dc9e..9de39787b 100755 --- a/service/Application/Admin/Model/NavigationModel.class.php +++ b/service/Application/Admin/Model/NavigationModel.class.php @@ -21,7 +21,7 @@ class NavigationModel extends CommonModel array('is_new_window_open', array(0,1), '{%common_new_window_open_tips}', 1, 'in', 5), // 文章分类导航 - array('value', 'CheckArticleCategoryValue', '{%navheader_article_category_id_format}', 1, 'callback', 6), + array('value', 'CheckArticleValue', '{%navigation_article_id_format}', 1, 'callback', 6), array('is_show', array(0,1), '{%common_show_tips}', 1, 'in', 6), array('is_new_window_open', array(0,1), '{%common_new_window_open_tips}', 1, 'in', 6), @@ -66,15 +66,15 @@ class NavigationModel extends CommonModel } /** - * [CheckArticleCategoryValue 文章分类id校验] + * [CheckArticleValue 文章id校验] * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2016-12-13T15:12:32+0800 */ - public function CheckArticleCategoryValue() + public function CheckArticleValue() { - return ($this->db(0)->table('__ARTICLE_CATEGORY__')->where(array('id'=>I('value')))->count() == 1); + return ($this->db(0)->table('__ARTICLE__')->where(array('id'=>I('value')))->count() == 1); } /** diff --git a/service/Application/Admin/View/Default/Navigation/Index.html b/service/Application/Admin/View/Default/Navigation/Index.html index 7fa798a86..4ae1d78e0 100755 --- a/service/Application/Admin/View/Default/Navigation/Index.html +++ b/service/Application/Admin/View/Default/Navigation/Index.html @@ -10,220 +10,12 @@
- +
- - - - - -
-
-
-

{{:L('navigation_article_category_operation_add')}}{{:L('navigation_add_name')}}

- × -
-
- -
-
-
- - - - - - - - - - @@ -278,6 +70,220 @@
+ + + + + + +
+
+
+

{{:L('navigation_article_operation_add')}}{{:L('navigation_add_name')}}

+ × +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+ + + + +
+ + +
+
+
+ + + + + + + + + diff --git a/service/Application/Common/Common/function.php b/service/Application/Common/Common/function.php index da3ae6b8d..65d423461 100755 --- a/service/Application/Common/Common/function.php +++ b/service/Application/Common/Common/function.php @@ -391,8 +391,8 @@ function NavDataDealWith($data) switch($v['data_type']) { // 文章分类 - case 'article_category': - $v['url'] = HomeUrl('Channel', 'Index', ['id'=>$v['value']]); + case 'article': + $v['url'] = HomeUrl('Article', 'Index', ['id'=>$v['value']]); break; // 自定义页面 diff --git a/service/Application/Common/Lang/zh-cn.php b/service/Application/Common/Lang/zh-cn.php index cc42891ed..9dde29817 100755 --- a/service/Application/Common/Lang/zh-cn.php +++ b/service/Application/Common/Lang/zh-cn.php @@ -476,7 +476,7 @@ return array( // 导航数据类型 'common_nav_type_list' => array( 'custom' => '自定义', - 'article_category' => '文章分类', + 'article' => '文章', 'customview' => '自定义页面', 'goods_category' => '商品分类', ), diff --git a/service/Public/Admin/Default/Js/Navigation.js b/service/Public/Admin/Default/Js/Navigation.js index 2a7724fd0..ce864ab5f 100755 --- a/service/Public/Admin/Default/Js/Navigation.js +++ b/service/Public/Admin/Default/Js/Navigation.js @@ -1,5 +1,5 @@ // 表单初始化 -FromInit('form.form-validation-article_category'); +FromInit('form.form-validation-article'); FromInit('form.form-validation-customview'); FromInit('form.form-validation-goods_category'); diff --git a/service/Public/Home/Default/Css/Common.css b/service/Public/Home/Default/Css/Common.css index 888c6eab8..309dc8ee1 100755 --- a/service/Public/Home/Default/Css/Common.css +++ b/service/Public/Home/Default/Css/Common.css @@ -438,6 +438,9 @@ background:url(../Images/ibar_sprites.png) no-repeat;background-position:0px -23 .am-footer-default a { color: #333; } +.am-footer-default .am-footer-divider { + padding: 0 5px; +} /**