|
@@ -11,6 +11,7 @@ class block_filter
|
|
|
protected $mSpecialId;
|
|
|
protected $mItems;
|
|
|
protected $mType;
|
|
|
+ protected $mImagePath;
|
|
|
|
|
|
public function __construct($block_type,$special_id,$items)
|
|
|
{
|
|
@@ -50,9 +51,36 @@ class block_filter
|
|
|
$this->calc_show($this->mItems['type'],$this->mItems['data'],$this->mItems['image'],$show_type,$show_data);
|
|
|
$this->mItems['show_type'] = $show_type;
|
|
|
$this->mItems['show_data'] = $show_data;
|
|
|
+ $this->mItems['reserved'] = $this->reserved($show_type,$this->mItems['reserved']);
|
|
|
|
|
|
return $this->mItems;
|
|
|
}
|
|
|
+ protected function reserved($show_type,$reserved)
|
|
|
+ {
|
|
|
+ if($show_type == 'goods_top')
|
|
|
+ {
|
|
|
+ $level = intval($reserved);
|
|
|
+ if($level > 0) {
|
|
|
+ return $this->topimages($level);
|
|
|
+ } else {
|
|
|
+ return $reserved;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ protected function topimages($level)
|
|
|
+ {
|
|
|
+ global $config;
|
|
|
+ $images = $config['hotlist_image'];
|
|
|
+ if(array_key_exists($level,$images)) {
|
|
|
+ $name = $images[$level];
|
|
|
+ $url = RESOURCE_SITE_URL . "/mobile/defimg/{$name}";
|
|
|
+ return $url;
|
|
|
+ } else {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
protected function home2()
|
|
|
{
|
|
|
if(true)
|
|
@@ -62,6 +90,7 @@ class block_filter
|
|
|
$this->calc_show($this->mItems['rectangle1_type'],$this->mItems['rectangle1_data'],$this->mItems['rectangle1_image'],$show_type,$show_data);
|
|
|
$this->mItems['rectangle1_show_type'] = $show_type;
|
|
|
$this->mItems['rectangle1_show_data'] = $show_data;
|
|
|
+ $this->mItems['rectangle1_reserved'] = $this->reserved($show_type,$this->mItems['rectangle1_reserved']);
|
|
|
}
|
|
|
|
|
|
if(true)
|
|
@@ -71,6 +100,7 @@ class block_filter
|
|
|
$this->calc_show($this->mItems['rectangle2_type'],$this->mItems['rectangle2_data'],$this->mItems['rectangle2_image'],$show_type,$show_data);
|
|
|
$this->mItems['rectangle2_show_type'] = $show_type;
|
|
|
$this->mItems['rectangle2_show_data'] = $show_data;
|
|
|
+ $this->mItems['rectangle2_reserved'] = $this->reserved($show_type,$this->mItems['rectangle2_reserved']);
|
|
|
}
|
|
|
if(true)
|
|
|
{
|
|
@@ -79,12 +109,12 @@ class block_filter
|
|
|
$this->calc_show($this->mItems['square_type'],$this->mItems['square_data'],$this->mItems['square_image'],$show_type,$show_data);
|
|
|
$this->mItems['square_show_type'] = $show_type;
|
|
|
$this->mItems['square_show_data'] = $show_data;
|
|
|
+ $this->mItems['square_reserved'] = $this->reserved($show_type,$this->mItems['square_reserved']);
|
|
|
}
|
|
|
|
|
|
return $this->mItems;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
protected function calc_show($data_type,$data,$image,&$show_type,&$show_data)
|
|
|
{
|
|
|
if(empty($show_type))
|
|
@@ -128,6 +158,8 @@ class block_filter
|
|
|
$this->calc_show($item['type'],$item['data'],$item['image'],$show_type,$show_data);
|
|
|
$item['show_type'] = $show_type;
|
|
|
$item['show_data'] = $show_data;
|
|
|
+ $item['reserved'] = $this->reserved($show_type,$item['reserved']);
|
|
|
+
|
|
|
$items[$image] = $item;
|
|
|
}
|
|
|
|