From 08c37b030e2e641754ca4d23f9cc7766961db030 Mon Sep 17 00:00:00 2001 From: chenzhi <“chenzhi063@qq.com> Date: Wed, 13 Nov 2019 14:53:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/default/WapPay/wap_shortcut_pay.html | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/Application/Sdk/View/default/WapPay/wap_shortcut_pay.html b/Application/Sdk/View/default/WapPay/wap_shortcut_pay.html index e9e9a5ba..54395fa8 100644 --- a/Application/Sdk/View/default/WapPay/wap_shortcut_pay.html +++ b/Application/Sdk/View/default/WapPay/wap_shortcut_pay.html @@ -324,19 +324,28 @@ var validCode=true; var smsstatus = true; function getSms() { - if ($("#custName").val() == '' || $("#idNo").val() == '' || $("#phoneNo").val() == '') { - $("#tipmsg").html('参数不能为空'); - $("#msgdialog").show(); + // if ($("#custName").val() == '' || $("#idNo").val() == '' || $("#phoneNo").val() == '') { + // $("#tipmsg").html('参数不能为空'); + // $("#msgdialog").show(); + // return ; + // } + if(Check.trim($("#custName").val()) == ''){ + Tip.msgShow('名字不能为空'); return ; } + if(!Check.idcardCheck($("#idNo").val())){ + return; + } + if(!Check.mobileCheck($("#phoneNo").val())){ + return; + } + + if (!smsstatus) return; $("#sms").html("请求中"); smsstatus = false; var sms=document.getElementById("sms"); - - /* $("#bankdialog").show(); - return ; */ //获取短信验证码 $.ajax({ type: "POST", @@ -380,7 +389,7 @@ // 未签约 // 展示未签约页面 $("#sign_mibile").html($("#phoneNo").val()); - $("#bankdialog").show(); + Tip.bankShow(); sms.innerText="获取验证码"; smsstatus = true; } @@ -396,7 +405,7 @@ $("#msgdialog").show(); $("#tipok").click(function(){ $("#msgdialog").hide(); - $("#bankdialog").show(); + Tip.bankShow(); $(this).off("click"); }); return ; @@ -502,7 +511,6 @@ var btnpay = false; $("#wfsubmit").click(function(){ - if (btnpay == true) return ; var isok = true; //名字 @@ -530,7 +538,6 @@ if(isok){ btnpay = true; Tip.loadShow(); - //更换表单提交方式 $.ajax({ type: "POST", dataType: "json", @@ -581,7 +588,7 @@ } if (tiptype == 2) { $("#msgdialog").hide(); - $("#bankdialog").show(); + Tip.bankShow(); } }); $("#close_doalog").click(function(){ @@ -604,6 +611,11 @@ $("#Dialog").show(); Tip.showDom = $("#Dialog"); }, + bankShow:function(){ + //自行处理 + window.scrollTo(0, document.documentElement.clientHeight); + $("#bankdialog").show(); + }, tipHide(){ Tip._hideShow(); }, From 72b4a78a87958664ebded372a9b99fcfb941fee3 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Wed, 13 Nov 2019 15:38:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=8E=B7=E5=8F=96header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Common/function.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Application/Sdk/Common/function.php b/Application/Sdk/Common/function.php index 317409bc..a2b6390a 100644 --- a/Application/Sdk/Common/function.php +++ b/Application/Sdk/Common/function.php @@ -252,3 +252,19 @@ function re_msg($code=200,$msg='',$data=[]) echo base64_encode(json_encode($ret)); 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; + } +} From 6d08c8125dcde94dfe1eebb2f766ac027369c34c Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Wed, 13 Nov 2019 16:01:39 +0800 Subject: [PATCH 3/3] txheader --- Application/Sdk/Common/function.php | 15 --------------- .../Sdk/Controller/PayH5Controller.class.php | 7 ++++++- .../Sdk/View/default/UserH/platform_pay.html | 14 +++++++++++++- 3 files changed, 19 insertions(+), 17 deletions(-) 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() {