Help.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * Index.php
  4. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  5. * =========================================================
  6. * Copy right 2015-2025 山西牛酷信息科技有限公司, 保留所有权利。
  7. * ----------------------------------------------
  8. * 官方网址: http://www.niushop.com.cn
  9. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用。
  10. * 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
  11. * =========================================================
  12. * @author : niuteam
  13. * @date : 2015.1.17
  14. * @version : v1.0.0.0
  15. */
  16. namespace app\api\controller;
  17. use app\model\web\Help as HelpModel;
  18. use app\model\web\Platform;
  19. /**
  20. * 系统帮助
  21. * @author Administrator
  22. *
  23. */
  24. class Help extends BaseApi
  25. {
  26. /**
  27. * 基础信息
  28. */
  29. public function info()
  30. {
  31. $help_id = isset($this->params['id']) ? $this->params['id'] : 0;
  32. if (empty($help_id)) {
  33. return $this->response($this->error('', 'REQUEST_ID'));
  34. }
  35. $help = new HelpModel();
  36. $info = $help->getHelpInfo($help_id);
  37. return $this->response($info);
  38. }
  39. /**
  40. * 分页列表信息
  41. */
  42. public function page()
  43. {
  44. $page = isset($this->params['page']) ? $this->params['page'] : 1;
  45. $page_size = isset($this->params['page_size']) ? $this->params['page_size'] : PAGE_LIST_ROWS;
  46. $app_module = isset($this->params['app_module']) ? $this->params['app_module'] : 'admin';//admin:普通帮助,shop:入驻店铺时看的帮助
  47. $class_id = isset($this->params['class_id']) ? $this->params['class_id'] : 0;
  48. $condition = [
  49. [ 'app_module', '=', $app_module ],
  50. [ 'class_id', '=', $class_id ],
  51. ];
  52. $order = 'create_time desc';
  53. $field = 'id,title,class_id,class_name,sort,create_time';
  54. $help = new HelpModel();
  55. $list = $help->getHelpPageList($condition, $page, $page_size, $order, $field);
  56. return $this->response($list);
  57. }
  58. /**
  59. * @return false|string
  60. * 平台参数
  61. */
  62. public function platform(){
  63. $platform = new Platform();
  64. $franchisee = $platform->info('franchisee_tel');
  65. $supplier = $platform->info('supplier_tel');
  66. $data['franchisee_tel']=$franchisee['data']['value'];
  67. $data['supplier_tel']=$supplier['data']['value'];
  68. return $this->response($this->success($data));
  69. }
  70. }