From c3fec237c693024c651fb81a0ff9fffb2b3cefe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=B9=8F?= Date: Wed, 4 Sep 2024 15:15:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A6=96=E9=A1=B5=E6=BE=9C?= =?UTF-8?q?=E6=B5=B7=E4=BD=99=E9=A2=9D=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trainsystem/controllers/pages.php | 36 ++++++++++++++++++- .../trainsystem/views/homepage.php | 2 +- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/application/third_party/trainsystem/controllers/pages.php b/application/third_party/trainsystem/controllers/pages.php index 7fd3259b..be166a2c 100644 --- a/application/third_party/trainsystem/controllers/pages.php +++ b/application/third_party/trainsystem/controllers/pages.php @@ -63,7 +63,8 @@ class pages extends CI_Controller{ // }else{ // $list->balance = "NULL"; // } - $list->balance = "NULL"; + //查询澜海余额 + $list->balance = $this->lanhai_accountBalance(); // print_r(json_encode($list)); $this->load->view('common/header'); $this->load->view('homepage',$list); @@ -391,6 +392,39 @@ class pages extends CI_Controller{ } } + //查询澜海余额 + public function lanhai_accountBalance(){ + + $microtime = get_microtime(); //时间戳 + //生成接口请求头参数 + $timestamp = $microtime; + $appId = LANHAI_appId; + + //拼接发送的报文 + $PostData = new stdClass(); + $PostData->authentication = new stdClass(); + $PostData->authentication->dataId = null; + $PostData->authentication->timestamp = $timestamp; + $PostData->authentication->appId = $appId; + $url = LANHAI_URL."api/open/query/accountBalance"; + // echo json_encode($PostData); + // die(); + + $ResponseJson = GetPost_http($url,json_encode($PostData),'json'); + $ResponseData = json_decode($ResponseJson); + if (isset($ResponseData->data)){ + // //需要解密 + $this->load->library("aesLanhai"); + $aesUnit = new Security(); + $data = json_decode($aesUnit->decryptData($ResponseData->data)); + return $data; + }else{ + + return "无结果"; + } + + } + //循环展示JSON private function handle_array($arr,$type,&$array_to_fill){ foreach($arr as $key => $value){ diff --git a/application/third_party/trainsystem/views/homepage.php b/application/third_party/trainsystem/views/homepage.php index 718ab26a..dbc736fa 100644 --- a/application/third_party/trainsystem/views/homepage.php +++ b/application/third_party/trainsystem/views/homepage.php @@ -77,7 +77,7 @@ function selseat(seat){
-

翰特订单号 订单列表>>预售时间维护>> 澜海导出账单>>版本:V2.0

+

翰特订单号 订单列表>>预售时间维护>> 澜海导出账单>>版本:V2.0澜海余额(RMB):