diff --git a/service/Application/Admin/Controller/GoodsCategoryController.class.php b/service/Application/Admin/Controller/GoodsCategoryController.class.php index 9f75d9bd9..d160bfeae 100755 --- a/service/Application/Admin/Controller/GoodsCategoryController.class.php +++ b/service/Application/Admin/Controller/GoodsCategoryController.class.php @@ -60,7 +60,7 @@ class GoodsCategoryController extends CommonController } // 获取数据 - $field = array('id', 'pid', 'icon', 'name', 'sort', 'is_enable', 'bg_color', 'big_images'); + $field = array('id', 'pid', 'icon', 'name', 'sort', 'is_enable', 'bg_color', 'big_images', 'vice_name', 'describe'); $data = M('GoodsCategory')->field($field)->where(array('pid'=>intval(I('id', 0))))->select(); if(!empty($data)) { @@ -178,6 +178,8 @@ class GoodsCategoryController extends CommonController // 额外数据处理 $m->add_time = time(); $m->name = I('name'); + $m->vice_name = I('vice_name'); + $m->describe = I('describe'); // 写入数据库 if($m->add()) @@ -194,6 +196,8 @@ class GoodsCategoryController extends CommonController // 额外数据处理 $m->name = I('name'); $m->upd_time = time(); + $m->vice_name = I('vice_name'); + $m->describe = I('describe'); // 移除 id unset($m->id, $m->pid); diff --git a/service/Application/Admin/Lang/zh-cn/goodscategory.php b/service/Application/Admin/Lang/zh-cn/goodscategory.php index c8bc24b1e..9583aec87 100755 --- a/service/Application/Admin/Lang/zh-cn/goodscategory.php +++ b/service/Application/Admin/Lang/zh-cn/goodscategory.php @@ -13,5 +13,11 @@ return array( 'goods_category_edit_name' => '分类编辑', 'goods_category_big_images_text' => '大图片', + + 'goods_category_vice_name_text' => '副名称', + 'goods_category_vice_name_format' => '副名称最大60个字符', + + 'goods_category_describe_text' => '描述', + 'goods_category_describe_format' => '描述最大200个字符', ); ?> \ No newline at end of file diff --git a/service/Application/Admin/View/Default/GoodsCategory/Index.html b/service/Application/Admin/View/Default/GoodsCategory/Index.html index c82df1b77..6710482e3 100755 --- a/service/Application/Admin/View/Default/GoodsCategory/Index.html +++ b/service/Application/Admin/View/Default/GoodsCategory/Index.html @@ -50,6 +50,14 @@ +
+ + +
+
+ + +
@@ -68,7 +76,7 @@ -
+

{{:L('common_form_loading_tips')}}

diff --git a/service/Application/Admin/View/Default/Slide/Index.html b/service/Application/Admin/View/Default/Slide/Index.html index 86f65f5fd..6870f7674 100755 --- a/service/Application/Admin/View/Default/Slide/Index.html +++ b/service/Application/Admin/View/Default/Slide/Index.html @@ -71,7 +71,7 @@ style="background-color:{{$v.bg_color}};"> - + {{:L('common_on_fill_in_images')}} diff --git a/service/Application/Home/Controller/IndexController.class.php b/service/Application/Home/Controller/IndexController.class.php index 25bf6e89c..cf9a85d22 100755 --- a/service/Application/Home/Controller/IndexController.class.php +++ b/service/Application/Home/Controller/IndexController.class.php @@ -34,8 +34,35 @@ class IndexController extends CommonController public function Index() { + // 首页轮播 + $this->assign('banner_list', $this->GetHomeBanner()); $this->display('Index'); } + + /** + * 获取首页banner + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-08-10 + * @desc description + */ + private function GetHomeBanner() + { + // 轮播图片 + $banner = M('Slide')->field('jump_url,jump_url_type,images_url,name,bg_color')->where(['platform'=>APPLICATION_CLIENT_TYPE, 'is_enable'=>1])->select(); + if(!empty($banner)) + { + $images_host = C('IMAGE_HOST'); + foreach($banner as &$v) + { + $v['images_url'] = $images_host.$v['images_url']; + $v['jump_url'] = empty($v['jump_url']) ? null : $v['jump_url']; + } + $result['banner'] = $banner; + } + return $banner; + } } ?> \ No newline at end of file diff --git a/service/Application/Home/View/Default/Index/Index.html b/service/Application/Home/View/Default/Index/Index.html index f1f2a6048..5757d915c 100755 --- a/service/Application/Home/View/Default/Index/Index.html +++ b/service/Application/Home/View/Default/Index/Index.html @@ -96,8 +96,8 @@
-
-
+ -
-
+
@@ -450,10 +450,8 @@ \ No newline at end of file diff --git a/service/Application/Home/View/Default/Public/HeaderNav.html b/service/Application/Home/View/Default/Public/HeaderNav.html index 0f63f2f57..5f63289cf 100755 --- a/service/Application/Home/View/Default/Public/HeaderNav.html +++ b/service/Application/Home/View/Default/Public/HeaderNav.html @@ -3,11 +3,14 @@