Authored by 郝肖肖

Merge branch 'feature/pcHttpsDevelop' of git.yoho.cn:fe/YOHOBUYPC into feature/pcHttpsDevelop

... ... @@ -1092,6 +1092,17 @@ class Helpers
}
/**
* 将首字符为//的url转换为http://
*
* @param string $url 需要转换的url
* @return mixed
*/
public static function transHttpsUrl($url)
{
return preg_replace('/^\/\//', 'http://', $url);
}
/**
* http和https转换成//
* @param type $url 地址
* @return type string
... ...
... ... @@ -15,5 +15,5 @@ return array(
// 访问模式,根据自己的服务器是否支持ssl访问,若支持请选择https;若不支持请选择http
'transport' => 'http',
// 页面跳转同步通知页面路径 (需//格式的完整路径,不允许加?id=123这类自定义参数)
'return_url' => SITE_MAIN . '/passport/autosign/alipaycallback',
'return_url' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN) . '/passport/autosign/alipaycallback',
);
... ...
... ... @@ -4,6 +4,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']);
return array(
'appId' => '03b4e36bf13dc75a0b1eaa43d3b9560e',
'appKey' => 'f16d5913e8610672',
'callback' => SITE_MAIN . '/passport/autosign/doubanback',
'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN). '/passport/autosign/doubanback',
'scope' => 'douban_basic_common',
);
\ No newline at end of file
... ...
... ... @@ -4,7 +4,7 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']);
return array(
'appid' => '100229394',
'appkey' => 'c0af9c29e0900813028c2ccb42021792',
'callback' => SITE_MAIN . '/passport/autosign/qqcallback',
'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN) . '/passport/autosign/qqcallback',
'scope' => 'get_user_info,add_share,upload_pic,get_idollist,get_fanslist',
'errorReport' => true,
);
\ No newline at end of file
... ...
... ... @@ -4,6 +4,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']);
return array(
'appId' => '783130c654c94a77ace97054ae266019',
'appKey' => '05e430de8c1e40d3a1f39ca8d3f8252c',
'callback' => SITE_MAIN . '/passport/autosign/renrenback',
'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN). '/passport/autosign/renrenback',
'scope' => 'publish_feed,photo_upload',
);
\ No newline at end of file
... ...
... ... @@ -4,5 +4,5 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']);
return array(
'appId' => '3739328910',
'appKey' => '9d44cded26d048e23089e5e975c93df1',
'appCallbackUrl' => SITE_MAIN . '/passport/autosign/sinacallback',
'appCallbackUrl' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN) . '/passport/autosign/sinacallback',
);
\ No newline at end of file
... ...
... ... @@ -5,6 +5,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']);
return array(
'appId' => 'wx3ae21dcbb82ad672',
'appKey' => 'e78afb2321e6a19085767e1a0f0d52c1',
'callback' => SITE_MAIN . '/passport/autosign/wechatback',
'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN) . '/passport/autosign/wechatback',
'scope' => 'snsapi_login'
);
... ...