Browse Source

增加授权地址

stanley-king 7 years ago
parent
commit
e5c9d991be
1 changed files with 13 additions and 4 deletions
  1. 13 4
      mobile/control/mshop.php

+ 13 - 4
mobile/control/mshop.php

@@ -24,18 +24,27 @@ class mshopControl extends specialControl
         parent::__construct();
     }
 
-    private function author($url)
+    private function authorOp()
     {
+        $url = $_GET['url'];
+
+        $msg = "跳转的地址不能为空.";
+        if(empty($url)) {
+            return self::outerr(errcode::ErrParamter,$msg);
+        }
+        $url = urldecode($url);
+        if(empty($url)) {
+            return self::outerr(errcode::ErrParamter,$msg);
+        }
+        
         if(session_helper::need_wechat_author())
         {
             $author = new thrid_author\wxauthor();
-            $url = "http://p.lrlz.com/hfive/inoherb/index.html?2";
             $url = $author->enter($url);
             return self::outsuccess(['direct_uri' => $url],"redirect");
         }
         else {
-            fcgi_header('location: http://p.lrlz.com/hfive/inoherb/index.html?2');
-
+            return self::outsuccess(['direct_uri' => $url],"redirect");
         }
     }