Commit 55eb5749 by 冷斌

fix bug

parent 3e404015
......@@ -79,19 +79,17 @@ class PassportAction extends CommonAction
$_SESSION['return_uri'] = $_SERVER['HTTP_REFERER'];
}
$config = model('Xconfig')->pagekey_get('pageKey:admin_Config_wxpay');
$pageKeyData = model('Xdata')->get('admin_Config:wxpay');
var_dump($pageKeyData);
die;
$ua = $_SERVER['HTTP_USER_AGENT'];
if (strpos($ua, 'MicroMessenger') == false && strpos($ua, 'Windows Phone') == false) {
} else {
$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";
$this->assign('wxUrl', $reurl2);
$pageKeyData = model('Xdata')->get('admin_Config:wxpay');
if (!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";
$this->assign('wxUrl', $reurl2);
}
}
// $this->assign('login_bg', $login_bg);
......
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