Commit 629c0f3b authored by zhuwei's avatar zhuwei

bug

parent d51da57c
......@@ -39,9 +39,14 @@ class ShareShop extends Basic
//dump('微信浏览器');
$code = empty($_GET['code']) ? null : $_GET['code'];
if (!$code) {
$this->_wxApi->getWxCodesnSapiBase($this->url.'?'.http_build_query($params));
$this->_wxApi->getWxCode($this->url.'?'.http_build_query($params));
} else {
$userInfo = $this->_wxApi->getUserInfoByAccessToken($code);
//dump($userInfo);exit;
if (!$userInfo['wx_open_id']) {
$this->_wxApi->getWxCode($this->url.'?'.http_build_query($params));
}
$wx_union_id = $userInfo['wx_union_id'] ? $userInfo['wx_union_id'] : $userInfo['wx_open_id'];
if(!$userInfo['wx_union_id']){
$userInfo['wx_union_id'] = $userInfo['wx_open_id'];
......
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