diff --git a/Application/Sdk/Common/function.php b/Application/Sdk/Common/function.php index a2b6390a..5976174f 100644 --- a/Application/Sdk/Common/function.php +++ b/Application/Sdk/Common/function.php @@ -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; - } -} diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index 3d8ffaff..9ac2b8d9 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -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'] + )); + exit(); + //redirect($json_data['url']); } diff --git a/Application/Sdk/View/default/UserH/platform_pay.html b/Application/Sdk/View/default/UserH/platform_pay.html index 56569b1a..768f5631 100644 --- a/Application/Sdk/View/default/UserH/platform_pay.html +++ b/Application/Sdk/View/default/UserH/platform_pay.html @@ -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() {