@ -253,18 +253,3 @@ function re_msg($code=200,$msg='',$data=[])
exit();
}
if (!function_exists('getallheaders'))
{
function getallheaders()
$headers = array();
foreach ($_SERVER as $name => $value)
if (substr($name, 0, 5) == 'HTTP_')
$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
return $headers;
@ -751,7 +751,12 @@ ADD COLUMN `pay_url` text NULL AFTER `check_sign`;
$json_data['url']='http://'.$_SERVER ['HTTP_HOST'];
redirect($json_data['url']);
echo json_encode(array(
'url' => $json_data['url']
));
//redirect($json_data['url']);
@ -64,7 +64,19 @@ $(function(){
$("#wxpay").on('click', function() {
if (flag) return ;
flag = true;
window.location.href = $(this).data('url');
$.ajax({
type: "GET",
dataType: "json",
url: $(this).data('url'),
data: {
},
success: function(r) {
window.location.href = r.url;
});
//window.location.href = $(this).data('url');
$('#alipaybtn').on('click',function() {