正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
@@ -73,7 +73,7 @@ class OrderController extends HomeBaseController{ | @@ -73,7 +73,7 @@ class OrderController extends HomeBaseController{ | ||
73 | // */ | 73 | // */ |
74 | public function order($users_id,$name){ | 74 | public function order($users_id,$name){ |
75 | $order= Db::name('order')->where(['users_id'=>$users_id,'state'=>1])->find(); | 75 | $order= Db::name('order')->where(['users_id'=>$users_id,'state'=>1])->find(); |
76 | - $this->apiResponse(200,'success',$order); | 76 | + |
77 | $end_time=time(); | 77 | $end_time=time(); |
78 | $price=$this->getPrice($users_id,$order['start_time'],$end_time); | 78 | $price=$this->getPrice($users_id,$order['start_time'],$end_time); |
79 | $time=ceil(($end_time-$order['start_time'])/3600); | 79 | $time=ceil(($end_time-$order['start_time'])/3600); |
@@ -83,6 +83,7 @@ class OrderController extends HomeBaseController{ | @@ -83,6 +83,7 @@ class OrderController extends HomeBaseController{ | ||
83 | 'price' => $price, | 83 | 'price' => $price, |
84 | 'state' => 2 | 84 | 'state' => 2 |
85 | ]; | 85 | ]; |
86 | + $this->apiResponse(200,'success',$order); | ||
86 | try{ | 87 | try{ |
87 | Db::startTrans(); | 88 | Db::startTrans(); |
88 | Db::name('users')->where('id',$users_id)->update(['is_use'=>0]); | 89 | Db::name('users')->where('id',$users_id)->update(['is_use'=>0]); |
-
请 注册 或 登录 后发表评论