正在显示
3 个修改的文件
包含
3 行增加
和
3 行删除
@@ -53,7 +53,7 @@ class AdminFaultController extends AdminBaseController{ | @@ -53,7 +53,7 @@ class AdminFaultController extends AdminBaseController{ | ||
53 | }else{ | 53 | }else{ |
54 | $time=ceil(($fault['create_time']-$order['start_time'])/3600); | 54 | $time=ceil(($fault['create_time']-$order['start_time'])/3600); |
55 | $getPrice=new OrderController(); | 55 | $getPrice=new OrderController(); |
56 | - $price=$getPrice->getPrice($order['start_time'],$fault['create_time']); | 56 | + $price=$getPrice->getPrice($fault['users_id'],$order['start_time'],$fault['create_time']); |
57 | $data=[ | 57 | $data=[ |
58 | 'end_time'=>$fault['create_time'], | 58 | 'end_time'=>$fault['create_time'], |
59 | 'time'=>$time, | 59 | 'time'=>$time, |
@@ -113,7 +113,7 @@ class OrderController extends HomeBaseController{ | @@ -113,7 +113,7 @@ class OrderController extends HomeBaseController{ | ||
113 | } | 113 | } |
114 | 114 | ||
115 | 115 | ||
116 | - public function getPrice($users_id,$start_time=1543298302,$end_time=1543303733){ | 116 | + public function getPrice($users_id,$start_time,$end_time){ |
117 | $cost=Db::name('cost')->where('id',1)->find(); | 117 | $cost=Db::name('cost')->where('id',1)->find(); |
118 | $interval = Db::name('interval')->where('id',1)->find(); | 118 | $interval = Db::name('interval')->where('id',1)->find(); |
119 | $is_free=Db::name('users')->where('id',$users_id)->find()['is_free']; | 119 | $is_free=Db::name('users')->where('id',$users_id)->find()['is_free']; |
@@ -195,7 +195,7 @@ class UsersController extends HomeBaseController{ | @@ -195,7 +195,7 @@ class UsersController extends HomeBaseController{ | ||
195 | $order['end_time']=time(); | 195 | $order['end_time']=time(); |
196 | $order['time']=ceil(($order['end_time']-$order['start_time'])/3600); | 196 | $order['time']=ceil(($order['end_time']-$order['start_time'])/3600); |
197 | $price=new OrderController(); | 197 | $price=new OrderController(); |
198 | - $order['price']=$price->getPrice($order['start_time'],$order['end_time']); | 198 | + $order['price']=$price->getPrice($users_id,$order['start_time'],$order['end_time']); |
199 | $this->apiResponse(200,'success',$order); | 199 | $this->apiResponse(200,'success',$order); |
200 | } | 200 | } |
201 | 201 |
-
请 注册 或 登录 后发表评论