From 5f9d850905a1fa77502cc719045355f7eeefea9f Mon Sep 17 00:00:00 2001 From: chenzhi Date: Sat, 22 Feb 2020 10:36:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=A8=AA=E5=B1=8F?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E4=B8=8A=E9=99=90=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/View/default/Spend/pay_way.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Sdk/View/default/Spend/pay_way.html b/Application/Sdk/View/default/Spend/pay_way.html index 7d2698a7..7165796f 100644 --- a/Application/Sdk/View/default/Spend/pay_way.html +++ b/Application/Sdk/View/default/Spend/pay_way.html @@ -154,7 +154,7 @@ - +
@@ -164,7 +164,7 @@
- +
From d9ccbb02067ac78cfc1db30dd6da595b9fe6f4c5 Mon Sep 17 00:00:00 2001 From: tping Date: Sat, 22 Feb 2020 12:59:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=96=91=E4=BC=BC=20dom=20=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E5=85=88=E5=90=8E=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/View/default/Spend/pay_way.html | 124 +++++++++--------- 1 file changed, 65 insertions(+), 59 deletions(-) diff --git a/Application/Sdk/View/default/Spend/pay_way.html b/Application/Sdk/View/default/Spend/pay_way.html index 7165796f..345d8957 100644 --- a/Application/Sdk/View/default/Spend/pay_way.html +++ b/Application/Sdk/View/default/Spend/pay_way.html @@ -228,59 +228,75 @@ } } - defaultInit(); - + var timefun; - $(".select_pay_info").click(function(){ - timefun = setTimeout(function(){ - $(".tipmsg").html("切换支付失败"); - $(".msgdialog").show(); - },1000); - $(".payment_rest").show(); - clearTimeout(timefun); - }) - $(".payment_rest .title>img").click(function(){ - $(".payment_rest").hide(); - }) - $(".payment_rest_way").on("click",function(){ - $(this).children("img").attr("src","__IMG__/pay_way/dagou2.png"); - $(this).siblings(".payment_rest_way").children("img").attr("src","__IMG__/pay_way/dagou1.png"); - let img=$(this).children("div").children("img").attr("src"); - let text = $(this).children("div").children("span").text(); - //获取支付参数 - payway = $(this).data("type"); - payurl = $(this).data("url"); - - $(".select_pay_info").children(".slide").attr("src",img); - $(".select_pay_info").children("div").text(text); - $(".payment_rest").hide(); + $(function() { + defaultInit(); + + $(".select_pay_info").click(function(){ + timefun = setTimeout(function(){ + $(".tipmsg").html("切换支付失败"); + $(".msgdialog").show(); + },1000); + $(".payment_rest").show(); + clearTimeout(timefun); + }); + $(".payment_rest .title>img").click(function(){ + $(".payment_rest").hide(); + }); - }) - //拉起支付 - var flag = false; - $(".confirm_pay").on("click",function(){ - if (flag){ - $(".tipmsg").html("支付请求中,请勿重复提交"); - $(".msgdialog").show(); - return false; - }; - flag = true; - - if(payway == "wxpay"){ - wxpay(); - } - if(payway == "alipay"){ - alipay(); - } - if(payway == "shorcut"){ - shorcut(); - } - if(payway == "platform_pay"){ - platform_pay(); - } + $(".payment_rest_way").on("click",function(){ + $(this).children("img").attr("src","__IMG__/pay_way/dagou2.png"); + $(this).siblings(".payment_rest_way").children("img").attr("src","__IMG__/pay_way/dagou1.png"); + let img=$(this).children("div").children("img").attr("src"); + let text = $(this).children("div").children("span").text(); + //获取支付参数 + payway = $(this).data("type"); + payurl = $(this).data("url"); - }) + $(".select_pay_info").children(".slide").attr("src",img); + $(".select_pay_info").children("div").text(text); + $(".payment_rest").hide(); + + }); + //拉起支付 + var flag = false; + $(".confirm_pay").on("click",function(){ + if (flag){ + $(".tipmsg").html("支付请求中,请勿重复提交"); + $(".msgdialog").show(); + return false; + }; + flag = true; + + if(payway == "wxpay"){ + wxpay(); + } + if(payway == "alipay"){ + alipay(); + } + if(payway == "shorcut"){ + shorcut(); + } + if(payway == "platform_pay"){ + platform_pay(); + } + + }); + + $(".payment_rest_btn").click(function(){ + $(".payment_rest_btn").hide(); + $(".weixin").show(); + }); + + $(".forbid_confirm,.forbid_close").click(function(){ + $(".msgdialog").hide(); + }); + + }); + + //微信支付 function wxpay(){ $r = small_program("{:C('sqpay.wx_small')}"); @@ -343,16 +359,6 @@ window.location.href = payurl; } - - - $(".payment_rest_btn").click(function(){ - $(".payment_rest_btn").hide(); - $(".weixin").show(); - }) - - $(".forbid_confirm,.forbid_close").click(function(){ - $(".msgdialog").hide(); - })