ConcurrentListController.class.php
869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/*
* 直播-列表
* 2018.07.19
*
*/
namespace Apicp\Controller\VhLiveTotal;
use Common\Common\Vhall;
class ConcurrentListController extends AbstractController
{
public function Index_post()
{
$params = I('post.');
$list = Vhall::instance()->concurrencyNumPage($params);
//组装前端数据
$concurrentData = $this->formatData($list, $params);
$this->_result = $concurrentData;
return true;
}
public function formatData($list = [], $params = [])
{
//组装前端数据
$list['page'] = $list['pageNum'];
$list['limit'] = $list['pageSize'];
foreach ($list['list'] as $key => &$value) {
$value['title'] = $params['title'];
}
unset($list['LiveOnlineNum'], $list['pageNum'], $list['pageSize']);
return $list;
}
}