12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- /**
- * NewsController.php UTF-8
- * H5浮点资讯
- *
- * @date : 2018/5/3 11:13
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : wuyonghong <wyh@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace api\float\controller;
- use api\common\controller\FloatBaseController;
- use huo\controller\posts\Post;
- use huo\controller\posts\Posts;
- class NewsController extends FloatBaseController {
- public function _initialize() {
- parent::_initialize();
- }
- /**
- * H5浮点资讯列表
- * http://doc.1tsdk.com/138?page_id=3209
- * 【域名】/float/news/list
- */
- public function index() {
- $_param = $this->request->param();
- $_page = $this->request->param('page/d', 1);
- $_offset = $this->request->param('offset/d', 10);
- $_post_class = new Posts();
- $_data = $_post_class->getList($_param, $_page.','.$_offset);
- $this->returnData($_data);
- }
- /**
- * H5浮点资讯详情
- * http://doc.1tsdk.com/138?page_id=3210
- * 【域名】/float/news/detail
- */
- public function read() {
- $_news_id = $this->request->param('news_id/d', 0);
- $_post_class = new Posts();
- $_data = $_post_class->getDetail($_news_id);
- $this->returnData($_data);
- }
- }
|