special.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 16/9/7
  6. * Time: 下午3:52
  7. */
  8. defined('InShopNC') or exit('Access Invalid!');
  9. require_once(BASE_ROOT_PATH . '/helper/goods_helper.php');
  10. require_once(BASE_ROOT_PATH . '/helper/special_helper.php');
  11. require_once(BASE_ROOT_PATH . '/helper/activity_helper.php');
  12. class specialControl extends mobileHomeControl
  13. {
  14. public function __construct() {
  15. parent::__construct();
  16. }
  17. public function indexOp()
  18. {
  19. $special_id = intval($_GET['special_id']);
  20. if($special_id < 0) {
  21. return self::outerr(errcode::ErrParamter);
  22. }
  23. $special_id = intval($_GET['special_id']);
  24. $ret = $this->get_special($special_id);
  25. self::outsuccess($ret);
  26. }
  27. protected function get_special($special_id)
  28. {
  29. $specials = special_manager::instance()->special($special_id,$goods_ids);
  30. if (!empty($goods_ids))
  31. {
  32. $helper = new goods_helper();
  33. $goodsex = $helper->online_summary($goods_ids, $related_goods);
  34. return array('special_list' => $specials,
  35. 'summary' => $goodsex['summary'],
  36. 'groupbuy' => $goodsex['groupbuy'],
  37. 'limitime' => $goodsex['limitime'],
  38. 'bundling' => $goodsex['bundling'],
  39. 'mobile_page' => mobile_page(1));
  40. }
  41. else
  42. {
  43. return array('special_list' => $specials,
  44. 'summary' => array(),
  45. 'groupbuy' => array(),
  46. 'limitime' => array(),
  47. 'bundling' => array(),
  48. 'mobile_page' => mobile_page(1));
  49. }
  50. }
  51. }