Guang.php
743 Bytes
<?php
namespace Home;
use LibModels\Wap\Home\GuangData;
use Action\AbstractAction;
use Plugin\Helpers;
/**
* 我的逛数据处理
*/
class GuangModel
{
//获取我的逛列表
public static function getMyGuang($uid, $page, $yh_channel = 1, $gender = '1,3', $limit = 10)
{
$result = array();
//调用接口获取数据
$res = GuangData::getGuangInfo($uid, $page, $yh_channel, $gender, $limit);
$result['totalPage'] = intval($res['data']['totalPage']);
if (!empty($res['data']['data'])) {
foreach ($res['data']['data'] as $k => $v) {
$result[$k] = Helpers::formatArticle($v, true, false, true, $uid);
}
}
return $result;
}
}