摘要:
1.core/inc/functions.php if (!function_exists('is_weixin')) {&nbs...
1.core/inc/functions.php
if (!function_exists('is_weixin')) { function is_weixin() { global $_W; return false;//改变的地方 if (EWEI_SHOPV2_DEBUG) { return true; } if (empty($_SERVER['HTTP_USER_AGENT']) || strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') === false && strpos($_SERVER['HTTP_USER_AGENT'], 'Windows Phone') === false) { return false; } return true; } }
2.core/model/member.php
if ($followed || empty($shopset['shop']['getinfo']) || $shopset['shop']['getinfo'] == 1) { $uid = mc_openid2uid($openid); if (!EWEI_SHOPV2_DEBUG) { //$userinfo = mc_oauth_userinfo();改变的地方 $userinfo = array('openid' => $member['openid'], 'nickname' => $member['nickname'], 'headimgurl' => $member['avatar'], 'gender' => $member['gender'], 'province' => $member['province'], 'city' => $member['city']); } else { $userinfo = array('openid' => $member['openid'], 'nickname' => $member['nickname'], 'headimgurl' => $member['avatar'], 'gender' => $member['gender'], 'province' => $member['province'], 'city' => $member['city']); } $mc = array(); $mc['nickname'] = $userinfo['nickname']; $mc['avatar'] = $userinfo['headimgurl']; $mc['gender'] = $userinfo['sex']; $mc['resideprovince'] = $userinfo['province']; $mc['residecity'] = $userinfo['city']; }
3.app/common/bootstrap.app.inc.php注释跳转
if (!empty($_W['account']['oauth']) && $_W['account']['oauth']['support_oauthinfo'] && empty($_W['isajax'])) { if (($_W['platform'] == 'account' && !$_GPC['logout'] && empty($_W['openid']) && ($controller != 'auth' || ($controller == 'auth' && !in_array($action, array('forward', 'oauth'))))) || ($_W['platform'] == 'account' && !$_GPC['logout'] && empty($_SESSION['oauth_openid']) && ($controller != 'auth'))) { $state = 'we7sid-'.$_W['session_id']; if (empty($_SESSION['dest_url'])) { $_SESSION['dest_url'] = urlencode($_W['siteurl']); } $str = ''; if(uni_is_multi_acid()) { $str = "&j={$_W['acid']}"; } $oauth_type = 'snsapi_base'; if ($controller == 'entry' && !empty($_GPC['m'])) { $module_info = module_fetch($_GPC['m']); if ($module_info['oauth_type'] == OAUTH_TYPE_USERINFO) { $oauth_type = 'snsapi_userinfo'; } } $oauth_url = uni_account_oauth_host(); $url = $oauth_url . "app/index.php?i={$_W['uniacid']}{$str}&c=auth&a=oauth&scope=" . $oauth_type; $callback = urlencode($url); $oauth_account = WeAccount::create($_W['account']['oauth']); if ($oauth_type == 'snsapi_base') { $forward = $oauth_account->getOauthCodeUrl($callback, $state); } else { $forward = $oauth_account->getOauthUserInfoUrl($callback, $state); } //header('Location: ' . $forward); //exit(); } }