作者 sgj
1 个管道 的构建 通过 耗费 5 秒

添加时间信息

@@ -173,6 +173,7 @@ class UsersController extends HomeBaseController{ @@ -173,6 +173,7 @@ class UsersController extends HomeBaseController{
173 public function getOrder(){ 173 public function getOrder(){
174 $users_id=$this->request->param('users_id'); 174 $users_id=$this->request->param('users_id');
175 $order=Db::name('order')->where(['users_id'=>$users_id])->paginate(8); 175 $order=Db::name('order')->where(['users_id'=>$users_id])->paginate(8);
  176 +
176 $data=[ 177 $data=[
177 'currentPage'=>$order->currentPage(), 178 'currentPage'=>$order->currentPage(),
178 'allPage' => $order->lastPage(), 179 'allPage' => $order->lastPage(),
@@ -367,4 +368,14 @@ class UsersController extends HomeBaseController{ @@ -367,4 +368,14 @@ class UsersController extends HomeBaseController{
367 public function resetFree(){ 368 public function resetFree(){
368 Db::name('users')->where('is_free',1)->update(['is_free'=>0]); 369 Db::name('users')->where('is_free',1)->update(['is_free'=>0]);
369 } 370 }
  371 +
  372 +
  373 + public function getTimeInfo($start,$end){
  374 + $start='1543812320';
  375 + $end='1543812407';
  376 + $time=$end-$start;
  377 + $return['hour']=$time/3600;
  378 + $return['min']=($time-$return['hour']*3600)/60;
  379 + dump($return);
  380 + }
370 } 381 }