Commit 1daf7c49 by 冷斌

fix bug

parent debd4509
......@@ -86,7 +86,7 @@ class PassportAction extends CommonAction
} else {
$pageKeyData = model('Xdata')->get('admin_Config:wxpay');
if (!empty($_GET['code']) && !empty($pageKeyData['mp_appid'])) {
if (empty($_GET['code']) && !empty($pageKeyData['mp_appid'])) {
$appId = $pageKeyData['mp_appid'];
$redirect_uri = urlencode('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
$reurl2 ="https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appId&redirect_uri=$redirect_uri&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment