WapController.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * WapController.php UTF-8
  4. * 返利模块API
  5. *
  6. * @date : 2018/7/27 11:23
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : wuyonghong <wyh@huosdk.com>
  10. * @version : Huosdk 8.0
  11. */
  12. namespace api\rebate\controller;
  13. use api\common\controller\V2ApiBaseController;
  14. use huolib\constant\NewsConst;
  15. use huolib\status\CommonStatus;
  16. use huoRebate\controller\RichText;
  17. class WapController extends V2ApiBaseController {
  18. public function _initialize() {
  19. parent::_initialize();
  20. }
  21. /**
  22. * WEB-返利指南
  23. * http://doc.huosdk.com/138?page_id=3723
  24. * 【域名】/rebate/explain
  25. */
  26. public function rebateExplain() {
  27. $_rt_class = new RichText();
  28. $_post_id = NewsConst::NEWS_ID_REBATE_EXPLAIN;
  29. $_data = $_rt_class->getDetail($_post_id);
  30. if (CommonStatus::NO_ERROR != $_data['code']) {
  31. $this->error($_data['msg']);
  32. }
  33. $_detail = $_data['data'];
  34. $this->assign('news', $_detail);
  35. $siteInfo = cmf_get_site_info();
  36. $this->assign('site_info', $siteInfo);
  37. return $this->fetch("wap/rebate");
  38. }
  39. /**
  40. * WEB-角色id说明
  41. * http://doc.huosdk.com/138?page_id=3726
  42. * 【域名】/roleid/explain
  43. */
  44. public function roleIdExplain() {
  45. $_rt_class = new RichText();
  46. $_post_id = NewsConst::NEWS_ID_ROLEID_EXPLAIN;
  47. $_data = $_rt_class->getDetail($_post_id);
  48. if (CommonStatus::NO_ERROR != $_data['code']) {
  49. $this->error($_data['msg']);
  50. }
  51. $_detail = $_data['data'];
  52. $this->assign('news', $_detail);
  53. $siteInfo = cmf_get_site_info();
  54. $this->assign('site_info', $siteInfo);
  55. return $this->fetch("wap/roleid");
  56. }
  57. }