Просмотр исходного кода

Merge branch 'bonus_rate' into websocket

stanley-king 7 лет назад
Родитель
Сommit
18d7cc0d12
2 измененных файлов с 3 добавлено и 2 удалено
  1. 1 1
      helper/third_author/wxauthor.php
  2. 2 1
      mobile/wxauthor.php

+ 1 - 1
helper/third_author/wxauthor.php

@@ -40,7 +40,7 @@ class wxauthor
                     'redirect_uri' => $back_url,
                     'response_type' => 'code',
                     'scope' => 'snsapi_userinfo',
-                    'state' => $_SESSION['MPHPSESSID']];
+                    'state' => urlencode(BASE_SITE_URL)];
         $ref_url = util::http_add_params(self::authorize_url,$params);
         $ref_url .= '#wechat_redirect';
         $_SESSION['author_orgin_url'] = $origin_url;

+ 2 - 1
mobile/wxauthor.php

@@ -55,7 +55,8 @@ else
         }
     }
     else {
-        $url = "http://192.168.0.200/mobile/wxauthor.php?code={$code}&state={$state}";
+        $host = urldecode($state);
+        $url = "{$host}/mobile/wxauthor.php?code={$code}&state={$state}";
         $html = "<!DOCTYPE html>
                         <html lang=\"en\">
                         <head>