Merge branch 'feature/pcHttpsDevelop' of git.yoho.cn:fe/YOHOBUYPC into feature/pcHttpsDevelop
Showing
7 changed files
with
17 additions
and
6 deletions
@@ -1092,6 +1092,17 @@ class Helpers | @@ -1092,6 +1092,17 @@ class Helpers | ||
1092 | } | 1092 | } |
1093 | 1093 | ||
1094 | /** | 1094 | /** |
1095 | + * 将首字符为//的url转换为http:// | ||
1096 | + * | ||
1097 | + * @param string $url 需要转换的url | ||
1098 | + * @return mixed | ||
1099 | + */ | ||
1100 | + public static function transHttpsUrl($url) | ||
1101 | + { | ||
1102 | + return preg_replace('/^\/\//', 'http://', $url); | ||
1103 | + } | ||
1104 | + | ||
1105 | + /** | ||
1095 | * http和https转换成// | 1106 | * http和https转换成// |
1096 | * @param type $url 地址 | 1107 | * @param type $url 地址 |
1097 | * @return type string | 1108 | * @return type string |
@@ -15,5 +15,5 @@ return array( | @@ -15,5 +15,5 @@ return array( | ||
15 | // 访问模式,根据自己的服务器是否支持ssl访问,若支持请选择https;若不支持请选择http | 15 | // 访问模式,根据自己的服务器是否支持ssl访问,若支持请选择https;若不支持请选择http |
16 | 'transport' => 'http', | 16 | 'transport' => 'http', |
17 | // 页面跳转同步通知页面路径 (需//格式的完整路径,不允许加?id=123这类自定义参数) | 17 | // 页面跳转同步通知页面路径 (需//格式的完整路径,不允许加?id=123这类自定义参数) |
18 | - 'return_url' => SITE_MAIN . '/passport/autosign/alipaycallback', | 18 | + 'return_url' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN) . '/passport/autosign/alipaycallback', |
19 | ); | 19 | ); |
@@ -4,6 +4,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']); | @@ -4,6 +4,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']); | ||
4 | return array( | 4 | return array( |
5 | 'appId' => '03b4e36bf13dc75a0b1eaa43d3b9560e', | 5 | 'appId' => '03b4e36bf13dc75a0b1eaa43d3b9560e', |
6 | 'appKey' => 'f16d5913e8610672', | 6 | 'appKey' => 'f16d5913e8610672', |
7 | - 'callback' => SITE_MAIN . '/passport/autosign/doubanback', | 7 | + 'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN). '/passport/autosign/doubanback', |
8 | 'scope' => 'douban_basic_common', | 8 | 'scope' => 'douban_basic_common', |
9 | ); | 9 | ); |
@@ -4,7 +4,7 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']); | @@ -4,7 +4,7 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']); | ||
4 | return array( | 4 | return array( |
5 | 'appid' => '100229394', | 5 | 'appid' => '100229394', |
6 | 'appkey' => 'c0af9c29e0900813028c2ccb42021792', | 6 | 'appkey' => 'c0af9c29e0900813028c2ccb42021792', |
7 | - 'callback' => SITE_MAIN . '/passport/autosign/qqcallback', | 7 | + 'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN) . '/passport/autosign/qqcallback', |
8 | 'scope' => 'get_user_info,add_share,upload_pic,get_idollist,get_fanslist', | 8 | 'scope' => 'get_user_info,add_share,upload_pic,get_idollist,get_fanslist', |
9 | 'errorReport' => true, | 9 | 'errorReport' => true, |
10 | ); | 10 | ); |
@@ -4,6 +4,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']); | @@ -4,6 +4,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']); | ||
4 | return array( | 4 | return array( |
5 | 'appId' => '783130c654c94a77ace97054ae266019', | 5 | 'appId' => '783130c654c94a77ace97054ae266019', |
6 | 'appKey' => '05e430de8c1e40d3a1f39ca8d3f8252c', | 6 | 'appKey' => '05e430de8c1e40d3a1f39ca8d3f8252c', |
7 | - 'callback' => SITE_MAIN . '/passport/autosign/renrenback', | 7 | + 'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN). '/passport/autosign/renrenback', |
8 | 'scope' => 'publish_feed,photo_upload', | 8 | 'scope' => 'publish_feed,photo_upload', |
9 | ); | 9 | ); |
@@ -4,5 +4,5 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']); | @@ -4,5 +4,5 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']); | ||
4 | return array( | 4 | return array( |
5 | 'appId' => '3739328910', | 5 | 'appId' => '3739328910', |
6 | 'appKey' => '9d44cded26d048e23089e5e975c93df1', | 6 | 'appKey' => '9d44cded26d048e23089e5e975c93df1', |
7 | - 'appCallbackUrl' => SITE_MAIN . '/passport/autosign/sinacallback', | 7 | + 'appCallbackUrl' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN) . '/passport/autosign/sinacallback', |
8 | ); | 8 | ); |
@@ -5,6 +5,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']); | @@ -5,6 +5,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']); | ||
5 | return array( | 5 | return array( |
6 | 'appId' => 'wx3ae21dcbb82ad672', | 6 | 'appId' => 'wx3ae21dcbb82ad672', |
7 | 'appKey' => 'e78afb2321e6a19085767e1a0f0d52c1', | 7 | 'appKey' => 'e78afb2321e6a19085767e1a0f0d52c1', |
8 | - 'callback' => SITE_MAIN . '/passport/autosign/wechatback', | 8 | + 'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN) . '/passport/autosign/wechatback', |
9 | 'scope' => 'snsapi_login' | 9 | 'scope' => 'snsapi_login' |
10 | ); | 10 | ); |
-
Please register or login to post a comment