$cat ); $url = env('APP_API_URL') . "/arctype_detail"; $arctype_detail = curl_request($url, $postdata, 'GET'); $data['post'] = $arctype_detail['data']; if (isset($_REQUEST['page'])) { $offset = ($_REQUEST['page'] - 1) * $pagesize; } //文章列表 $postdata2 = array( 'limit' => $pagesize, 'offset' => $offset, 'typeid' => $cat ); $url = env('APP_API_URL') . "/article_list"; $res = curl_request($url, $postdata2, 'GET'); if ($res['data']['list']) { foreach ($res['data']['list'] as $k => $v) { $res['data']['list'][$k]['pubdate'] = date("Y-m-d H:i", $v['pubdate']); } } $data['list'] = $res['data']['list']; $data['totalpage'] = ceil($res['data']['count'] / $pagesize); if (isset($_REQUEST['page_ajax']) && $_REQUEST['page_ajax'] == 1) { $html = ''; if ($res['data']['list']) { foreach ($res['data']['list'] as $k => $v) { $html .= '
' . $v['pubdate'] . '