shish 6 gadi atpakaļ
vecāks
revīzija
e14dd267fd
1 mainītis faili ar 2 papildinājumiem un 9 dzēšanām
  1. 2 9
      app/mobile/controllers/AuthController.php

+ 2 - 9
app/mobile/controllers/AuthController.php

@@ -71,11 +71,7 @@ class AuthController extends PublicController
 				$account = $queryArray['account'];
 			}
 		}
-		print_r($get);
-		print_r($parse);
-		die;
-
-		//获取m.xx.com/account/12358这类链接的商家id
+		//获取m.xx.com/account/12358这类链接的商家ID
 		if (empty($account) && preg_match('/\/account\/(\d+)/', $suffixUrl, $match)) {
 			$account = $match[1];
 		}
@@ -91,16 +87,13 @@ class AuthController extends PublicController
 		}
 		$merchantId = $merchant['id'];
 		$authScope = isset($get['authScope']) ? $get['authScope'] : '';
-		
-		
-		
 		if (empty($authScope)) {
 			util::stop('没有授权类型');
 		}
 		$data = weixinUtil::getOpenId($code, $merchant);
 		//获取code失败,重新获取
 		if ($data === false) {
-			$url = 'http://' . $_SERVER['HTTP_HOST'] . '/auth/get-user-info?suffixUrl=' . $suffixUrl . '&authScope=' . $authScope;
+			$url = 'http://' . $_SERVER['HTTP_HOST'] . '/auth/get-user-info?suffixUrl=' . $suffixUrlEncode . '&authScope=' . $authScope;
 			weixinUtil::getToken($url, $merchant, $authScope);
 			util::end();
 		}