Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

78 wiersze
2.1 KiB

  1. <?php
  2. /**
  3. * 门票下单流程控制器
  4. * ============================================================================
  5. * * 版权所有 蜘蛛出行 * *
  6. * 网站地址: http://www.zhizhuchuxing.com
  7. * ----------------------------------------------------------------------------
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
  9. * 使用;不允许对程序代码以任何形式任何目的的再发布。
  10. * ============================================================================
  11. * Author By: 倪宗锋
  12. * PhpStorm MenPController.php
  13. * Create By 2017/6/20 16:13 $
  14. */
  15. namespace zzcx\controllers\home;
  16. use common\util\Util;
  17. use yii\web\Controller;
  18. use zzcx\service\home\MenP;
  19. class MenPController extends Controller
  20. {
  21. public $service = null;
  22. public function service()
  23. {
  24. if ($this->service == null) {
  25. $this->service = new MenP();
  26. }
  27. return $this->service;
  28. }
  29. /**
  30. * Des:查询
  31. * Name: actionSearch
  32. * @return string
  33. * @author 倪宗锋
  34. */
  35. public function actionSearch()
  36. {
  37. $param = [
  38. 'prod_name' => htmlspecialchars(trim($this->_post('prod_name', ''))),//产品名称
  39. ];
  40. $getList = $this->service()->getSearch($param);
  41. return Util::returnJsSu('', $getList['data']);
  42. }
  43. /**
  44. * Des:门票销售页面初始化
  45. * Name: actionInitialize
  46. * @return string
  47. * @author 倪宗锋
  48. */
  49. public function actionInitialize()
  50. {
  51. $prod_cate_id = $this->_post('pro_cate_id', '');
  52. $result = $this->service()->getInitialize($prod_cate_id);
  53. return json_encode($result);
  54. }
  55. /**
  56. * Des:获取产品价格列表
  57. * Name: actionGetProdArr
  58. * @return string
  59. * @author 倪宗锋
  60. */
  61. public function actionGetProdArr()
  62. {
  63. $params = [
  64. 'prod_cate_id' => $this->_post('prod_cate_id', ''),
  65. 'date' => $this->_post('date', '')
  66. ];
  67. $result = $this->service()->getProdArrForDate($params);
  68. return json_encode($result);
  69. }
  70. }