Beispiel #1
0
 private function _getResult($res, $data)
 {
     $page = $data['page'];
     $pageSize = $data['pageSize'];
     $page == 0 && ($page = 1 && ($pageSize = 10000));
     $pmList = $this->_getPMList($page, $pageSize);
     $res['body']['list'] = $pmList['list'];
     $res = WebUtils::getWebApiArrayWithPage($res, $page, $pageSize, $pmList['count']);
     return $res;
 }
Beispiel #2
0
 public function run($json)
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     // $json = "{'id': 1, 'idType': 'aid', 'page': 1, 'pageSize': 10, }";
     $json = rawurldecode($json);
     $json = WebUtils::jsonDecode($json);
     $res = $this->_checkComment($res, $json);
     if (!WebUtils::checkError($res)) {
         $comments = $this->getCommentList($json);
         $res['body']['list'] = $comments['list'];
         $res = array_merge($res, WebUtils::getWebApiArrayWithPage($res, $json['page'], $json['pageSize'], $comments['count']));
     }
     echo WebUtils::outputWebApi($res, '', false);
 }