Room.php 669 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. *
  4. * @copyright ©2020 点小铺
  5. * @author hanj
  6. * @link: https://dyuit.com
  7. * Created by VSCode
  8. */
  9. namespace app\api\controller\live;
  10. use app\api\controller\Controller;
  11. use app\api\model\wxapp\LiveRoom as LiveRoomModel;
  12. /**
  13. * 微信小程序直播列表
  14. * Class Room
  15. * @package app\api\controller\live
  16. */
  17. class Room extends Controller
  18. {
  19. /**
  20. * 获取直播间列表
  21. * @return mixed
  22. * @throws \think\exception\DbException
  23. */
  24. public function lists()
  25. {
  26. $model = new LiveRoomModel;
  27. $list = $model->getList();
  28. return $this->renderSuccess(compact('list'));
  29. }
  30. }