diff --git a/application/admin/controller/Site.php b/application/admin/controller/Site.php index bfb23bf04..2da4e5236 100755 --- a/application/admin/controller/Site.php +++ b/application/admin/controller/Site.php @@ -11,6 +11,7 @@ namespace app\admin\controller; use app\service\ConfigService; +use app\service\GoodsService; /** * 站点设置 @@ -83,22 +84,45 @@ class Site extends Common // 扣除库存规则 $this->assign('common_deduction_inventory_rules_list', lang('common_deduction_inventory_rules_list')); + // 首页商品排序规则 + $this->assign('home_floor_goods_order_by_type_list', lang('home_floor_goods_order_by_type_list')); + $this->assign('home_floor_goods_order_by_rule_list', lang('home_floor_goods_order_by_rule_list')); + // 配置信息 $data = ConfigService::ConfigList(); $this->assign('data', $data); - // 自提点 - if($nav_type == 'sitetype') + // 数据处理 + switch($nav_type) { - // 地址处理 - if(!empty($data['common_self_extraction_address']) && !empty($data['common_self_extraction_address']['value'])) - { - $address = ConfigService::SiteTypeExtractionAddressList($data['common_self_extraction_address']['value']); - $this->assign('sitetype_address_list', $address['data']); - } + // 自提点 + case 'sitetype' : + // 地址处理 + if(!empty($data['common_self_extraction_address']) && !empty($data['common_self_extraction_address']['value'])) + { + $address = ConfigService::SiteTypeExtractionAddressList($data['common_self_extraction_address']['value']); + $this->assign('sitetype_address_list', $address['data']); + } - // 加载百度地图api - $this->assign('is_load_baidu_map_api', 1); + // 加载百度地图api + $this->assign('is_load_baidu_map_api', 1); + break; + + // 网站设置 + case 'siteset' : + // 获取商品一级分类 + $where = ['pid'=>0, 'is_home_recommended'=>1, 'is_enable'=>1]; + $category = GoodsService::GoodsCategoryList(['where'=>$where]); + if(!empty($category)) + { + $floor_keywords = (empty($data['home_index_floor_top_right_keywords']) || empty($data['home_index_floor_top_right_keywords']['value'])) ? [] : json_decode($data['home_index_floor_top_right_keywords']['value'], true); + foreach($category as &$c) + { + $c['config_keywords'] = isset($floor_keywords[$c['id']]) ? $floor_keywords[$c['id']] : ''; + } + } + $this->assign('goods_category_list', $category); + break; } // 编辑器文件存放地址 @@ -172,6 +196,11 @@ class Site extends Common $params['common_self_extraction_address'] = json_encode($address, JSON_UNESCAPED_UNICODE); } break; + + // 网站设置 + case 'siteset' : + $params['home_index_floor_top_right_keywords'] = empty($params['home_index_floor_top_right_keywords']) ? '' : json_encode($params['home_index_floor_top_right_keywords'], JSON_UNESCAPED_UNICODE); + break; } // 开始处理空值 diff --git a/application/admin/view/default/admin/login_info.html b/application/admin/view/default/admin/login_info.html index 865a00247..79ed1203f 100755 --- a/application/admin/view/default/admin/login_info.html +++ b/application/admin/view/default/admin/login_info.html @@ -34,7 +34,7 @@ {{if MyC('admin_login_info_bg_images_rand') eq 1}}
- {{for start="1" end="11"}} + {{for start="1" end="15"}} {{if file_exists(ROOT.'public/static/admin/default/images/login/'.$i.'.jpg')}}
{{/if}} diff --git a/application/admin/view/default/site/goods.html b/application/admin/view/default/site/goods.html deleted file mode 100644 index 1b7be358c..000000000 --- a/application/admin/view/default/site/goods.html +++ /dev/null @@ -1,48 +0,0 @@ -{{include file="public/header" /}} - - -
-
- - {{include file="site/nav" /}} - - - -
-
- - -
- -
- -
- - - - -
-
- -

1. 默认展示3级,最低1级、最高3级

-

2. 层级不一样、前端分类页样式也会不一样

-
-
- -
- - -
-
- -
-
- - - -{{include file="public/footer" /}} - \ No newline at end of file diff --git a/application/admin/view/default/site/nav.html b/application/admin/view/default/site/nav.html index bb40d1501..3e4ebb88f 100644 --- a/application/admin/view/default/site/nav.html +++ b/application/admin/view/default/site/nav.html @@ -2,6 +2,9 @@
  • 基础配置
  • +
  • + 网站设置 +
  • 备案信息
  • @@ -26,12 +29,6 @@
  • 订单售后
  • -
  • - 搜索 -
  • -
  • - 商品 -
  • 扩展项
  • diff --git a/application/admin/view/default/site/search.html b/application/admin/view/default/site/search.html deleted file mode 100644 index db44f29e8..000000000 --- a/application/admin/view/default/site/search.html +++ /dev/null @@ -1,37 +0,0 @@ -{{include file="public/header" /}} - - -
    -
    - - {{include file="site/nav" /}} - - - -
    -
    - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    - - - -{{include file="public/footer" /}} - \ No newline at end of file diff --git a/application/admin/view/default/site/siteset.html b/application/admin/view/default/site/siteset.html new file mode 100644 index 000000000..aef40c192 --- /dev/null +++ b/application/admin/view/default/site/siteset.html @@ -0,0 +1,155 @@ +{{include file="public/header" /}} + + +
    +
    + + {{include file="site/nav" /}} + + + +
    + +
    +
    +

    首页

    +
    +
    +
    + +
    + + + + +
    +
    + +

    1. 配置每个楼层最多展示多少个商品

    +

    2. 不建议将数量修改的太大、会导致PC端左侧空白区域太大

    +
    +
    +
    + +
    + + + + +
    +
    + +

    1. 配置每个楼层左侧最多展示多少个二级商品分类

    +

    2. 不建议将数量修改的太大、如高度超出楼层容器会比较拥挤

    +
    +
    +
    + + {{if !empty($goods_category_list)}} +
      + {{foreach $goods_category_list as $category}} +
    • +

      + {{$category.name}} + {{$category.vice_name}} +

      + +
    • + {{/foreach}} +
    + {{else /}} +
    + + 暂无数据,请先到 / 商品管理->商品分类、一级分类设置首页推荐 +
    + {{/if}} +
    +
    + + +
    + +

    综合为:热度->销量->最新 进行 降序(desc)排序

    +
    +
    +
    + + +
    +
    +
    + + +
    +
    +

    商品

    +
    +
    +
    + + +
    + +
    + +
    + + + + +
    +
    + +

    1. 默认展示3级,最低1级、最高3级

    +

    2. 层级不一样、前端分类页样式也会不一样

    +
    +
    +
    +
    + + +
    +
    +

    搜索

    +
    +
    +
    + + +
    +
    + + +
    +
    +
    + +
    + + +
    +
    + +
    +
    + + + +{{include file="public/footer" /}} + \ No newline at end of file diff --git a/application/admin/view/default/site/sitetype.html b/application/admin/view/default/site/sitetype.html index ccaa77ae9..fdc8f5988 100644 --- a/application/admin/view/default/site/sitetype.html +++ b/application/admin/view/default/site/sitetype.html @@ -83,7 +83,7 @@

    自提点

    -