diff --git a/app/admin/controller/Navigation.php b/app/admin/controller/Navigation.php index 846b597f9..46e82fa5d 100755 --- a/app/admin/controller/Navigation.php +++ b/app/admin/controller/Navigation.php @@ -14,6 +14,7 @@ use app\service\ArticleService; use app\service\NavigationService; use app\service\GoodsService; use app\service\CustomViewService; +use app\service\DesignService; /** * 导航管理 @@ -80,6 +81,10 @@ class Navigation extends Common $custom_view = CustomViewService::CustomViewList(['where'=>['is_enable'=>1], 'field'=>'id,title', 'n'=>0]); MyViewAssign('customview_list', $custom_view['data']); + // 页面设计 + $design_view = DesignService::DesignList(['where'=>['is_enable'=>1], 'field'=>'id,name', 'n'=>0]); + MyViewAssign('design_list', $design_view['data']); + MyViewAssign('nav_type', $this->nav_type); return MyView(); } diff --git a/app/admin/view/default/navigation/index.html b/app/admin/view/default/navigation/index.html index 69f573545..c728fab8b 100755 --- a/app/admin/view/default/navigation/index.html +++ b/app/admin/view/default/navigation/index.html @@ -24,6 +24,9 @@
  • +
  • + +
  • @@ -248,4 +251,55 @@ + + + + {{/block}} \ No newline at end of file diff --git a/app/service/NavigationService.php b/app/service/NavigationService.php index e30d7f61d..b5d83a07b 100755 --- a/app/service/NavigationService.php +++ b/app/service/NavigationService.php @@ -193,6 +193,11 @@ class NavigationService case 'goods_category': $v['url'] = MyUrl('index/search/index', ['category_id'=>$v['value']]); break; + + // 页面设计 + case 'design': + $v['url'] = MyUrl('index/design/index', ['id'=>$v['value']]); + break; } $data[$k] = $v; } @@ -420,6 +425,24 @@ class NavigationService ]; break; + // 页面设计导航 + case 'design': + $p = [ + [ + 'checked_type' => 'length', + 'key_name' => 'name', + 'checked_data' => '2,16', + 'is_checked' => 1, + 'error_msg' => '导航名称格式 2~16 个字符', + ], + [ + 'checked_type' => 'empty', + 'key_name' => 'value', + 'error_msg' => '页面设计选择有误', + ], + ]; + break; + // 没找到 default : return DataReturn('操作类型有误', -1); @@ -468,6 +491,11 @@ class NavigationService case 'goods_category': $temp_name = Db::name('GoodsCategory')->where(['id'=>$params['value']])->value('name'); break; + + // 页面设计导航 + case 'design': + $temp_name = Db::name('Design')->where(['id'=>$params['value']])->value('name'); + break; } // 只截取16个字符 $params['name'] = mb_substr($temp_name, 0, 16, MyConfig('shopxo.default_charset')); diff --git a/public/static/admin/default/js/navigation.js b/public/static/admin/default/js/navigation.js index 1b4123947..a0e4b50f6 100755 --- a/public/static/admin/default/js/navigation.js +++ b/public/static/admin/default/js/navigation.js @@ -4,6 +4,7 @@ $(function() FromInit('form.form-validation-article'); FromInit('form.form-validation-customview'); FromInit('form.form-validation-goods_category'); + FromInit('form.form-validation-design'); /** * 添加