Commit 3f1bcb8e authored by zhoujun's avatar zhoujun

守护天数

parent 78b06341
...@@ -36,6 +36,7 @@ class AdminController extends Controller ...@@ -36,6 +36,7 @@ class AdminController extends Controller
*/ */
public function getLogin() public function getLogin()
{ {
if(Auth::check()) return redirect(route('checkImg'));
$data['ERROR'] = Session::get('error',''); $data['ERROR'] = Session::get('error','');
return $this->view('admin.login',$data); return $this->view('admin.login',$data);
} }
......
...@@ -172,8 +172,8 @@ ...@@ -172,8 +172,8 @@
}) })
$(dom).html(html); $(dom).html(html);
} }
@if($info->online_time > 0) @if($info->register_time != '')
renderHtml('#bNum',{{ ceil($info->online_time / 86400 ) }}); renderHtml('#bNum',{{ ceil((strtotime(date('Y-m-d H:i:s')) - strtotime($info->register_time)) / 86400 ) }});
@else @else
renderHtml('#bNum', 0); renderHtml('#bNum', 0);
@endif @endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment