...
|
...
|
@@ -41,26 +41,26 @@ class WxloginController extends HomeBaseController |
|
|
}
|
|
|
parent::_initialize(); // TODO: Change the autogenerated stub
|
|
|
if(!Session::get('user.accessToken')){
|
|
|
echo "<pre/>";
|
|
|
print_r('12');
|
|
|
die;
|
|
|
session('uid',null);
|
|
|
session('user.accessToken',null);
|
|
|
session('user.accessTime',null);
|
|
|
$this->OAuth($rediUrl);
|
|
|
}else{
|
|
|
echo "<pre/>";
|
|
|
print_r('34');
|
|
|
die;
|
|
|
// 判断accesstoken时间
|
|
|
$overTime = Session::get('user.accessTime');
|
|
|
if(($overTime + 7100) < time() ){
|
|
|
echo "<pre/>";
|
|
|
print_r('11');
|
|
|
die;
|
|
|
// 超过时间,重新获取accesstoken
|
|
|
session('uid',null);
|
|
|
session('user.accessToken',null);
|
|
|
session('user.accessTime',null);
|
|
|
$this->OAuth($rediUrl);
|
|
|
}else{
|
|
|
echo "<pre/>";
|
|
|
print_r('33');
|
|
|
die;
|
|
|
// 未超过
|
|
|
// 查询用户是否存在
|
|
|
$uid = Session::get('uid');
|
...
|
...
|
|