1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- /**
- * Index.php
- * Niushop商城系统 - 团队十年电商经验汇集巨献!
- * =========================================================
- * Copy right 2015-2025 山西牛酷信息科技有限公司, 保留所有权利。
- * ----------------------------------------------
- * 官方网址: http://www.niushop.com.cn
- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用。
- * 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
- * =========================================================
- * @author : niuteam
- * @date : 2015.1.17
- * @version : v1.0.0.0
- */
- namespace app\api\controller;
- use app\model\web\Help as HelpModel;
- use app\model\web\Platform;
- /**
- * 系统帮助
- * @author Administrator
- *
- */
- class Help extends BaseApi
- {
-
- /**
- * 基础信息
- */
- public function info()
- {
- $help_id = isset($this->params['id']) ? $this->params['id'] : 0;
- if (empty($help_id)) {
- return $this->response($this->error('', 'REQUEST_ID'));
- }
- $help = new HelpModel();
- $info = $help->getHelpInfo($help_id);
- return $this->response($info);
- }
-
- /**
- * 分页列表信息
- */
- public function page()
- {
- $page = isset($this->params['page']) ? $this->params['page'] : 1;
- $page_size = isset($this->params['page_size']) ? $this->params['page_size'] : PAGE_LIST_ROWS;
- $app_module = isset($this->params['app_module']) ? $this->params['app_module'] : 'admin';//admin:普通帮助,shop:入驻店铺时看的帮助
- $class_id = isset($this->params['class_id']) ? $this->params['class_id'] : 0;
-
- $condition = [
- [ 'app_module', '=', $app_module ],
- [ 'class_id', '=', $class_id ],
- ];
- $order = 'create_time desc';
- $field = 'id,title,class_id,class_name,sort,create_time';
- $help = new HelpModel();
- $list = $help->getHelpPageList($condition, $page, $page_size, $order, $field);
- return $this->response($list);
- }
- /**
- * @return false|string
- * 平台参数
- */
- public function platform(){
- $platform = new Platform();
- $franchisee = $platform->info('franchisee_tel');
- $supplier = $platform->info('supplier_tel');
- $data['franchisee_tel']=$franchisee['data']['value'];
- $data['supplier_tel']=$supplier['data']['value'];
- return $this->response($this->success($data));
- }
- }
|