url优化
parent
a374d1a07f
commit
c02fee2657
|
|
@ -261,6 +261,12 @@ function PluginsHomeUrl($plugins_name, $plugins_control, $plugins_action, $param
|
||||||
$url = str_replace('public/', '', $url);
|
$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;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -291,6 +297,12 @@ function PluginsAdminUrl($plugins_name, $plugins_control, $plugins_action, $para
|
||||||
$url = str_replace('public/', '', $url);
|
$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;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ class Weixin
|
||||||
'mch_id' => $this->config['mch_id'],
|
'mch_id' => $this->config['mch_id'],
|
||||||
'body' => $params['site_name'].'-'.$params['name'],
|
'body' => $params['site_name'].'-'.$params['name'],
|
||||||
'nonce_str' => md5(time().rand().$params['order_no']),
|
'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'] : '',
|
'openid' => ($trade_type == 'JSAPI') ? $params['user']['weixin_openid'] : '',
|
||||||
'out_trade_no' => $params['order_no'].GetNumberCode(6),
|
'out_trade_no' => $params['order_no'].GetNumberCode(6),
|
||||||
'spbill_create_ip' => GetClientIP(),
|
'spbill_create_ip' => GetClientIP(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue