提交 c02fee26 编写于 作者: G gongfuxiang

url优化

上级 a374d1a0
......@@ -261,6 +261,12 @@ function PluginsHomeUrl($plugins_name, $plugins_control, $plugins_action, $param
$url = str_replace('public/', '', $url);
}
// tp框架url方法是否识别到https
if(__MY_HTTP__ == 'https' && substr($url, 0, 5) != 'https')
{
$url = 'https'.mb_substr($url, 4, null, 'utf-8');
}
return $url;
}
......@@ -291,6 +297,12 @@ function PluginsAdminUrl($plugins_name, $plugins_control, $plugins_action, $para
$url = str_replace('public/', '', $url);
}
// tp框架url方法是否识别到https
if(__MY_HTTP__ == 'https' && substr($url, 0, 5) != 'https')
{
$url = 'https'.mb_substr($url, 4, null, 'utf-8');
}
return $url;
}
......
......@@ -231,7 +231,7 @@ class Weixin
'mch_id' => $this->config['mch_id'],
'body' => $params['site_name'].'-'.$params['name'],
'nonce_str' => md5(time().rand().$params['order_no']),
'notify_url' => str_replace('https', 'http', $params['notify_url']),
'notify_url' => (__MY_HTTP__ == 'https') ? 'https'.mb_substr($params['notify_url'], 4, null, 'utf-8') : $params['notify_url'],
'openid' => ($trade_type == 'JSAPI') ? $params['user']['weixin_openid'] : '',
'out_trade_no' => $params['order_no'].GetNumberCode(6),
'spbill_create_ip' => GetClientIP(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册