Commit d3fb88ed authored by 蔡闯's avatar 蔡闯

2021

parent e47c0fb6
......@@ -77,7 +77,7 @@ abstract class BaseController
}
}
$phone = \think\facade\Request::param('phone');
if($phone) {
if($phone!='' || !isset($phone)) {
if(!isPhoneNo($phone)) {
echo json_encode(['code'=>400,'msg'=>'手机号码不符合!','data'=>[]]);exit;
}
......
......@@ -93,18 +93,24 @@ class Payorder extends Base
$rest['total_num'] = $total_num;
$rest['name'] = $key;
$rest['name_zh'] = $value;
//获取最近的支付订单时间
$time = Db::name('cost')->where($where)->order('pay_time','desc')->value('pay_time');
$rest['pay_time'] = $time;
$all[] = $rest;
}
//获取自定义的
unset($where['type']);
$count = Db::name('cost')->where($where)->whereNotIn('type',$array_keys)->sum('pay_money');
//获取最近一次支付时间
$time = Db::name('cost')->where($where)->whereNotIn('type',['property','water','gas','electric','park'])->order('pay_time','desc')->value('pay_time');
$other['pay_time'] = $time;
$other['name'] = "other";
$other['name_zh'] = "自定义";
$other['total_num'] = $count;
if($other['total_num'] !=0){
$all[] = $other;
}
$vacancys[$k]['pay_list'] = $all;
$vacancys[$k]['pay_list'] = Common::changeField($all,'pay_time');
//如果当前房间没有已缴费记录,则去掉
if(empty($all)) {
unset($vacancys[$k]);
......@@ -113,7 +119,7 @@ class Payorder extends Base
} else {
$vacancys = [];
}
return $this->returnJson($vacancys);
return $this->returnJson($vacancys,'pay_time');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment