RichTextController.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * RichTextController.php UTF-8
  4. * 富文本说明请求 用户协议,防沉迷说明
  5. *
  6. * @date : 2018/4/27 21:48
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : liuhongliang <lhl@huosdk.com>
  10. * @version : HUOSDK 8.0
  11. */
  12. namespace api\float\controller;
  13. use api\common\controller\V2ApiBaseController;
  14. use huo\controller\richtext\RichText;
  15. use huolib\status\CommonStatus;
  16. use huolib\status\MemberStatus;
  17. class RichTextController extends V2ApiBaseController {
  18. /**
  19. * 富文本说明请求 用户协议,防沉迷说明
  20. * http://doc.1tsdk.com/138?page_id=3134 *
  21. * 【域名】/wap/richtext/index
  22. *
  23. * @param $key @see RichTextKeyConst
  24. *
  25. * @return mixed
  26. */
  27. public function index($key) {
  28. $_richtext_class = new RichText();
  29. $_data = $_richtext_class->getDetail($key);
  30. if (CommonStatus::NO_ERROR != $_data['code']) {
  31. $this->returnData($_data);
  32. }
  33. $_detail = $_data['data'];
  34. $_code = MemberStatus::NO_ERROR;
  35. $this->success(MemberStatus::getMsg($_code), $_detail);
  36. }
  37. }