Kaynağa Gözat

feat():授权

geek 4 yıl önce
ebeveyn
işleme
f9e21e527e

+ 1 - 0
application/index/controller/Index.php

@@ -20,6 +20,7 @@ class Index {
         if (empty($channelId)){
             throw new ApiException('渠道id不为空');
         }
+        Session::set('wxId','');
         $data = CommonService::getSetData($channelId);
         if (empty(Session::get('wxId'))){
             Session::set('visitorId','');

+ 5 - 3
application/index/controller/User.php

@@ -26,13 +26,15 @@ class User extends BaseController {
             'avatar' => input('avatar'),
             'key'    => md5(input('unionid').CommonService::getSetData($channelId)['channel_auth_code'])
         ];
-        Session::set('wxId',input('unionid'));
+        var_dump(input());
+        die();
+//        Session::set('wxId',input('unionid'));
         header('Location:http://mudu.tv/activity.php?a=userAssign&'.http_build_query($params));
     }
 
     public function clearSession() {
-        var_dump($_SERVER);
+//        var_dump($_SERVER);
         Session::clear();
-        var_dump($_SERVER);
+//        var_dump($_SERVER);
     }
 }