* @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); } }