|
@@ -16,7 +16,7 @@ class AboutController extends Base
|
|
|
* @author: linch
|
|
|
*/
|
|
|
public function product() {
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -24,7 +24,7 @@ class AboutController extends Base
|
|
|
* @author: linch
|
|
|
*/
|
|
|
public function about() {
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -37,16 +37,18 @@ class AboutController extends Base
|
|
|
);
|
|
|
if ($search['city_id'] != 0) {
|
|
|
$page_num = (int)(I('get.p') > 0 ? I('get.p') : 1);
|
|
|
- $page_size = 4;
|
|
|
+ $page_size = 6;
|
|
|
$home_stores_model = new \Common\Model\HomeStoresModel();
|
|
|
$data = $home_stores_model->get_data($search, $page_num, $page_size);
|
|
|
$store_list = $data['list'];
|
|
|
if (!empty($store_list)) {
|
|
|
+ $param = array('city_id' => $search['city_id']);
|
|
|
+ $page = $this->get_page($data['count'], $page_size, $page_num, $param);
|
|
|
$this->assign('data', $store_list);
|
|
|
+ $this->assign('page', $page);
|
|
|
$this->assign('pager', $data['pager']);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
$home_city_model = new \Common\Model\HomeCityModel();
|
|
|
$home_city = $home_city_model->get_data();
|
|
|
$city_id_string = '';
|
|
@@ -57,7 +59,7 @@ class AboutController extends Base
|
|
|
$this->assign('home_city', $home_city);
|
|
|
$this->assign('city_id_string', $city_id_string);
|
|
|
$this->assign('search', $search);
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -65,7 +67,7 @@ class AboutController extends Base
|
|
|
* @author:linch
|
|
|
*/
|
|
|
public function vr() {
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -112,7 +114,12 @@ class AboutController extends Base
|
|
|
$this->success($result['msg']);
|
|
|
}
|
|
|
} else {
|
|
|
- $this->display();
|
|
|
+ $ad_message_model = new \Common\Model\AdMessageModel();
|
|
|
+ $code = $_COOKIE[$ad_message_model::ad_code_name];
|
|
|
+ $ad_message_data = $ad_message_model->where(array('code' => $code))->find();
|
|
|
+ $tt_code = $ad_message_data['tt_code'];
|
|
|
+ $this->assign('tt_code', $tt_code);
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -121,7 +128,7 @@ class AboutController extends Base
|
|
|
* @author: linch
|
|
|
*/
|
|
|
public function contact() {
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -136,14 +143,19 @@ class AboutController extends Base
|
|
|
$ad_message_data = $ad_message_model->where(array('code' => $code))->find();
|
|
|
$ad_message_id = $ad_message_data['id'];
|
|
|
$message_board_model = new \Common\Model\MessageBoardModel();
|
|
|
- $result = $message_board_model->data_add($data, $message_board_model::source_official_web, $ad_message_id);
|
|
|
+ if ($this->is_mobile == true) {
|
|
|
+ $source = $message_board_model::source_official_wap;
|
|
|
+ } else {
|
|
|
+ $source = $message_board_model::source_official_web;
|
|
|
+ }
|
|
|
+ $result = $message_board_model->data_add($data, $source, $ad_message_id);
|
|
|
if ($result['code'] == false) {
|
|
|
$this->error($result['msg']);
|
|
|
} else {
|
|
|
$this->success($result['msg']);
|
|
|
}
|
|
|
} else {
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -152,7 +164,7 @@ class AboutController extends Base
|
|
|
* @author: linch
|
|
|
*/
|
|
|
public function company() {
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -161,7 +173,7 @@ class AboutController extends Base
|
|
|
* @author: linch
|
|
|
*/
|
|
|
public function discount() {
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -171,7 +183,7 @@ class AboutController extends Base
|
|
|
*/
|
|
|
public function news() {
|
|
|
$page_num = (int)(I('get.p') > 0 ? I('get.p') : 1);
|
|
|
- $page_size = 4;
|
|
|
+ $page_size = 6;
|
|
|
$home_new_model = new \Common\Model\HomeNewModel();
|
|
|
$search = array(
|
|
|
'type' => intval(I('get.type', $home_new_model::type_company)),
|
|
@@ -185,16 +197,17 @@ class AboutController extends Base
|
|
|
$news_list = $data['list'];
|
|
|
if (!empty($news_list)) {
|
|
|
$param = array('type' => $search['type']);
|
|
|
-// $page = $this->get_page($data['count'], $page_size, $page_num, $param);
|
|
|
+ $page = $this->get_page($data['count'], $page_size, $page_num, $param);
|
|
|
$this->assign('data', $news_list);
|
|
|
$this->assign('pager', $data['pager']);
|
|
|
+ $this->assign('page', $page);
|
|
|
}
|
|
|
$news_type_list = $home_new_model->get_type_list();
|
|
|
$news_banner_list = $home_new_model->get_banner_data();
|
|
|
$this->assign('type', $news_type_list);
|
|
|
$this->assign('banner', $news_banner_list);
|
|
|
$this->assign('search', $search);
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -214,7 +227,7 @@ class AboutController extends Base
|
|
|
$this->assign('pre', $pre_data);
|
|
|
$this->assign('recommend', $recommend);
|
|
|
$this->assign('data', $data);
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -224,7 +237,7 @@ class AboutController extends Base
|
|
|
*/
|
|
|
public function new_store() {
|
|
|
$page_num = (int)(I('get.p') > 0 ? I('get.p') : 1);
|
|
|
- $page_size = 4;
|
|
|
+ $page_size = 6;
|
|
|
$home_stores_model = new \Common\Model\HomeStoresModel();
|
|
|
$search = array(
|
|
|
'is_new' => $home_stores_model::new_on,
|
|
@@ -232,11 +245,31 @@ class AboutController extends Base
|
|
|
$data = $home_stores_model->get_data($search, $page_num, $page_size);
|
|
|
$store_list = $data['list'];
|
|
|
if (!empty($store_list)) {
|
|
|
-
|
|
|
+ $page = $this->get_page($data['count'], $page_size, $page_num);
|
|
|
$this->assign('data', $store_list);
|
|
|
$this->assign('pager', $data['pager']);
|
|
|
+ $this->assign('page', $page);
|
|
|
}
|
|
|
- $this->display();
|
|
|
+ $this->display($this->the_view);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 订阅
|
|
|
+ * @author: linch
|
|
|
+ */
|
|
|
+ public function subscription() {
|
|
|
+ if (cookie('sub') < 10) {
|
|
|
+ if (IS_POST) {
|
|
|
+ $data = I('post.data');
|
|
|
+ $home_sub_model = new \Common\Model\HomeSubscriptionModel();
|
|
|
+ $result = $home_sub_model->data_add($data);
|
|
|
+ $sub = cookie('sub');
|
|
|
+ $time = 100 * 365 * 24 * 3600;
|
|
|
+ cookie('sub', $sub + 1, $time);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $this->success('订阅成功');
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|