$pagesize, 'offset' => $offset, 'access_token' => $_SESSION['weixin_user_info']['access_token'] ); $url = env('APP_API_URL')."/user_address_list"; $res = curl_request($url,$postdata,'GET'); $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 .= '
'; if($v['is_default']==1) { $html .= '

'.$v['mobile'].'默认

'; } else { $html .= '

'.$v['mobile'].'

'; } $html .= '

'.$v['province_name'].$v['city_name'].$v['district_name'].' '.$v['address'].'

'; $html .= '
编辑删除
'; $html .= '
'; } } exit(json_encode($html)); } return view('weixin.address.index', $data); } //收货地址添加 public function userAddressAdd(Request $request) { return view('weixin.address.userAddressAdd'); } //收货地址修改 public function userAddressUpdate(Request $request) { $id = $request->input('id',''); if($id == ''){$this->error_jump(ReturnCode::NO_FOUND,route('weixin'),3);} $postdata = array( 'id' => $_REQUEST['id'], 'access_token' => $_SESSION['weixin_user_info']['access_token'] ); $url = env('APP_API_URL')."/user_address_detail"; $res = curl_request($url,$postdata,'GET'); $data['post'] = $res['data']; return view('weixin.address.userAddressUpdate',$data); } }