作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

interface

@@ -128,6 +128,10 @@ class UsersController extends HomeBaseController{ @@ -128,6 +128,10 @@ class UsersController extends HomeBaseController{
128 public function getOrderById(){ 128 public function getOrderById(){
129 $users_id=$this->request->param('users_id'); 129 $users_id=$this->request->param('users_id');
130 $order= Db::name('order')->where(['users_id'=>$users_id,'state'=>1])->find(); 130 $order= Db::name('order')->where(['users_id'=>$users_id,'state'=>1])->find();
  131 + $order['end_time']=time();
  132 + $order['time']=ceil(($order['end_time']-$order['start_time'])/3600);
  133 + $price=new OrderController();
  134 + $order['price']=$price->getPrice($order['start_time'],$order['end_time']);
131 $this->apiResponse(200,'success',$order); 135 $this->apiResponse(200,'success',$order);
132 } 136 }
133 137