master
tpingzhang 5 years ago
parent 1291995582
commit 6d08c8125d

@ -253,18 +253,3 @@ function re_msg($code=200,$msg='',$data=[])
exit(); 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']; $json_data['url']='http://'.$_SERVER ['HTTP_HOST'];
} }
} }
redirect($json_data['url']);
echo json_encode(array(
'url' => $json_data['url']
));
exit();
//redirect($json_data['url']);
} }

@ -64,7 +64,19 @@ $(function(){
$("#wxpay").on('click', function() { $("#wxpay").on('click', function() {
if (flag) return ; if (flag) return ;
flag = true; 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() { $('#alipaybtn').on('click',function() {

Loading…
Cancel
Save