* @version : HUOSDK 8.0 */ namespace h5wap\wap\controller; use h5wap\common\controller\V2BaseController; use huo\controller\richtext\RichText; use huolib\status\CommonStatus; class RichTextController extends V2BaseController { /** * 富文本说明请求 用户协议,防沉迷说明 * http://doc.1tsdk.com/138?page_id=3134 * * 【域名】/wap/richtext/index * * @param $key @see RichTextKeyConst * * @return mixed */ public function index($key) { $_richtext_class = new RichText(); $_data = $_richtext_class->getDetail($key); if (CommonStatus::NO_ERROR != $_data['code']) { $this->returnData($_data); } if ($this->response_type == 'json') { $this->returnData($_data); } $_detail = $_data['data']; $this->assign('news', $_detail); return $this->fetch("richtext/$key"); } }