添加首页澜海余额查询

master
赵鹏 2 years ago
parent 104418bd9c
commit c3fec237c6

@ -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){

@ -77,7 +77,7 @@ function selseat(seat){
<div style="width:90%;margin:30px auto;">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">翰特订单号&nbsp;<a style="margin-left:50px;" target='_blank' href="<?php echo site_url('apps/trainsystem/pages/order_list');?>">订单列表>></a><a style="margin-left:50px;" target='_blank' href="<?php echo site_url('apps/trainsystem/pages/presale_list');?>">预售时间维护>></a> <a style="margin-left:50px;" target='_blank' href="<?php echo site_url('apps/trainsystem/pages/lanhaiExport');?>">澜海导出账单>></a><span style="margin-left:200px;">版本V2.0</span><!--<span class="pull-right">聚合余额(RMB)<?php echo $balance;?></span> --></h3>
<h3 class="panel-title">翰特订单号&nbsp;<a style="margin-left:50px;" target='_blank' href="<?php echo site_url('apps/trainsystem/pages/order_list');?>">订单列表>></a><a style="margin-left:50px;" target='_blank' href="<?php echo site_url('apps/trainsystem/pages/presale_list');?>">预售时间维护>></a> <a style="margin-left:50px;" target='_blank' href="<?php echo site_url('apps/trainsystem/pages/lanhaiExport');?>">澜海导出账单>></a><span style="margin-left:200px;">版本V2.0</span><span class="pull-right">澜海余额(RMB)<?php echo $balance;?></span></h3>
<!-- <a style="margin-left:50px;" target='_blank' href="<?php echo site_url('apps/trainsystem/pages/reschedule');?>">携程改签>></a> -->
</div>
<div class="panel-body">

Loading…
Cancel
Save