浏览代码

feat():授权

geek 4 年之前
父节点
当前提交
0028663ce7
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 1 4
      application/index/controller/Index.php
  2. 4 0
      application/index/controller/User.php

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

@@ -21,15 +21,12 @@ class Index {
         }
         //增加客户自己的验证逻辑,例如登录,关注,付费,填手机号等
         $key = md5($visitorId.CommonService::getSetData()['channel_auth_code']);
-        var_dump($key);
         if(strpos($notifyUrl,'?') !== false){//url参数处理,将key加到url参数中
             $returnUrl = $notifyUrl."&key=".$key."&expire=3600";
         }else{
             $returnUrl = $notifyUrl."?key=".$key."&expire=3600";
         }
-        var_dump($returnUrl);
-        die();
-//        header("Location:".$returnUrl);//跳转到直播观看页
+        header("Location:".$returnUrl);//跳转到直播观看页
         //        redirect($returnUrl);
     }
 }

+ 4 - 0
application/index/controller/User.php

@@ -21,6 +21,10 @@ class User extends BaseController {
             'key'    => md5(input('userid').CommonService::getSetData()['channel_auth_code'])
         ];
         session('unionid', input('unionid'));
+        var_dump(session('unionid'));
+        var_dump(input());
+        var_dump('http://mudu.tv/activity.php?a=userAssign&'.http_build_query($params));
+        die();
         header('Location:http://mudu.tv/activity.php?a=userAssign&'.http_build_query($params));
     }
 }