浏览代码

add to lcoal

stanley-king 8 年之前
父节点
当前提交
6de4832648
共有 2 个文件被更改,包括 10 次插入1 次删除
  1. 5 0
      data/model/mb_special.model.php
  2. 5 1
      helper/special_helper.php

+ 5 - 0
data/model/mb_special.model.php

@@ -190,6 +190,11 @@ class mb_specialModel extends Model
             $block['bg_image']  = $value['bg_image'];
             $block['bg_type']   = $value['bg_type'];
             $block['bg_data']   = $value['bg_data'];
+            $has_margin = intval($value['has_margin']);
+            $block['has_margin']= $has_margin === 0 ? false : true;
+
+
+
             $item_type = $value['item_type'];
 
             if($item_type == 'divider') {

+ 5 - 1
helper/special_helper.php

@@ -318,7 +318,6 @@ class special_formater
 
     private function filter_item($special,&$goods_ids,&$scale)
     {
-
         $block = [];
         $block['item_title'] = empty($special['title']) ? '' : $special['title'];
         $block['item_type'] = $special['item_type'];
@@ -326,6 +325,7 @@ class special_formater
         $block['bg_image'] = $special['bg_image'];
         $block['bg_type']  = $special['bg_type'];
         $block['bg_data']  = $special['bg_data'];
+        $block['has_margin']  = $special['has_margin'];
         $block_scale = false;
         $this->format_property($block,$block_scale);
 
@@ -354,6 +354,8 @@ class special_formater
         }
         elseif($key == 'home3') {
             $items = $this->filter_home3($org_items,$goods_ids,$scale);
+            $scale = $block_scale;
+            //todo 此行是进行这次版本与以前版本不同的地方
         }
         elseif($key == 'home4') {
             $items = $this->filter_home4($org_items,$goods_ids,$scale);
@@ -370,11 +372,13 @@ class special_formater
         elseif($key == 'home6') {
             $block['item_type'] = 'horizon';
             $items = $this->filter_horizon($org_items,$goods_ids,$scale);
+            $scale = $block_scale;
         }
         elseif ($key == 'home7')
         {
             $block['item_type'] = 'horizon_goods';
             $items = $this->filter_horizon_goods($org_items,$goods_ids,$scale);
+            $scale = $block_scale;
         }
 
         else {