提交 0ca804b0 authored 作者: chengye's avatar chengye

测试延长在线时长为1个小时

上级 b383583e
......@@ -19,6 +19,8 @@ class SingleSign {
if($res) $this->instence = $redis;
else throw new Exception("redis connect faild");
}
$sid = Cookie::get('PHPSESSID');
if(!empty($sid)) Cookie::set('PHPSESSID',$sid,['expire'=>time()+3600]);
}
//获取session
......
......@@ -16,6 +16,7 @@ use app\em\model\EmPaymentInvoice;
use app\em\model\EmPaymentInvoiceBalance;
use app\em\model\EmPaymentReceipt;
use app\em\model\Staff;
use app\em\model\Station;
use app\em\validate\AddPaymentValidate;
use think\Exception;
use think\facade\Request;
......@@ -438,8 +439,8 @@ class Payment extends Base
} else {
$details[$k]['amount'] = $inv->payment_amount - $inv->payment_balance;
}
$details[$k]['projectNumber'] = $this->getCbzxCode($inv->account_id);
$details[$k]['contractNumber'] = $this->getEmContract($inv->account_id);
$details[$k]['projectNumber'] = $this->getDetailsFields($inv->account_id);
$details[$k]['contractNumber'] = $this->getDetailsFields($inv->account_id,true);
$details[$k]['receipt'] = '';
}
......@@ -527,5 +528,16 @@ class Payment extends Base
return $res ? true : false;
}
public function getDetailsFields($account_id,$contract=false){
$account = EmAccount::get(['account_id'=>$account_id]);
$em = \app\em\model\Em::get($account->em_id);
if($contract === true){
if(!$em) return json(['status'=>0,'message'=>'没有找到所属电表']);
return $em->contract_numb ?: '';
}
$station = Station::get(['station_id'=>$em->station_id]);
if(!$station) return json(['status'=>0,'message'=>'没有找到所属基站']);
return $station->proj_number ?: '';
}
}
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// +----------------------------------------------------------------------
// | Cookie设置
// +----------------------------------------------------------------------
return [
// cookie 名称前缀
'prefix' => '',
// cookie 保存时间
'expire' => 0,
// cookie 保存路径
'path' => '/',
// cookie 有效域名
'domain' => 'gonn.com.cn',
// cookie 启用安全传输
'secure' => false,
// httponly设置
'httponly' => '',
// 是否使用 setcookie
'setcookie' => true,
];
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论