|
|
@@ -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();
|
|
|
}
|