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

添加时间信息

... ... @@ -173,6 +173,7 @@ class UsersController extends HomeBaseController{
public function getOrder(){
$users_id=$this->request->param('users_id');
$order=Db::name('order')->where(['users_id'=>$users_id])->paginate(8);
$data=[
'currentPage'=>$order->currentPage(),
'allPage' => $order->lastPage(),
... ... @@ -367,4 +368,14 @@ class UsersController extends HomeBaseController{
public function resetFree(){
Db::name('users')->where('is_free',1)->update(['is_free'=>0]);
}
public function getTimeInfo($start,$end){
$start='1543812320';
$end='1543812407';
$time=$end-$start;
$return['hour']=$time/3600;
$return['min']=($time-$return['hour']*3600)/60;
dump($return);
}
}
\ No newline at end of file
... ...