$_SESSION['weixin_user_info']['access_token'] ); $url = env('APP_API_URL')."/user_info"; $res = curl_request($url,$postdata,'GET'); $data['user_info'] = $res['data']; return view('weixin.user.index', $data); } //浏览记录 public function userGoodsHistory(Request $request) { //商品列表 $pagesize = 10; $offset = 0; if(isset($_REQUEST['page'])){$offset = ($_REQUEST['page']-1)*$pagesize;} $postdata = array( 'limit' => $pagesize, 'offset' => $offset, 'access_token' => $_SESSION['weixin_user_info']['access_token'] ); $url = env('APP_API_URL')."/user_goods_history_list"; $res = curl_request($url,$postdata,'GET'); $data['user_goods_history'] = $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['goods']['title'].'
'; $html .= '¥'.$v['goods']['price'].'
'; $html .= '删除
'; $html .= '