Explorar el Código

feat():授权

geek hace 4 años
padre
commit
ddf99dd984
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      application/index/controller/Index.php

+ 4 - 2
application/index/controller/Index.php

@@ -27,8 +27,10 @@ class Index {
             header("Location:".CommonService::getAuthUrl($channelId));
             die();
         }
-        Session::get($visitorId);
-        Session::set('visitorId', $visitorId);
+        $visitorId =  Session::get($visitorId);
+        if(empty($visitorId)){
+            Session::set('visitorId', $visitorId);
+        }
         //增加客户自己的验证逻辑,例如登录,关注,付费,填手机号等
         $key = md5($visitorId.$data['channel_auth_code']);
         if(strpos($notifyUrl,'?') !== false){//url参数处理,将key加到url参数中