From 859c5b5ef04ee3839862909c0774c8e799d819de Mon Sep 17 00:00:00 2001 From: NimaQu Date: Tue, 30 Oct 2018 22:09:52 +0800 Subject: [PATCH 1/2] fix default type --- resources/views/material/user/doiam.tpl | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/resources/views/material/user/doiam.tpl b/resources/views/material/user/doiam.tpl index f6e46604..de5334e3 100644 --- a/resources/views/material/user/doiam.tpl +++ b/resources/views/material/user/doiam.tpl @@ -40,6 +40,7 @@ window.onload = function(){ $(".type").click(function(){ type = $(this).data("pay"); }); + type= 'alipay' $("#submit").click(function(){ var price = parseFloat($("#amount").val()); console.log("将要使用"+type+"方法充值"+price+"元"); @@ -84,30 +85,6 @@ window.onload = function(){ } } }); - function f(){ - $.ajax({ - type: "POST", - url: "/payment/status", - dataType: "json", - data: { - pid:pid - }, - success: function (data) { - if (data.result) { - console.log(data); - $("#alipay").modal('hide'); - $("#result").modal(); - $("#msg").html("充值成功!"); - window.setTimeout("location.href=window.location.href", {$config['jump_delay']}); - } - }, - error: function (jqXHR) { - console.log(jqXHR); - } - }); - tid = setTimeout(f, 1000); //循环调用触发setTimeout - } - }); } From 9d80f649117031477605f0cc102157f0cf7c8e18 Mon Sep 17 00:00:00 2001 From: NimaQu Date: Tue, 30 Oct 2018 22:52:36 +0800 Subject: [PATCH 2/2] typo --- resources/views/material/user/aopf2f.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/material/user/aopf2f.tpl b/resources/views/material/user/aopf2f.tpl index c8e5da32..570e82f3 100644 --- a/resources/views/material/user/aopf2f.tpl +++ b/resources/views/material/user/aopf2f.tpl @@ -29,12 +29,12 @@ if (data.ret) { console.log(data); pid = data.pid; - $("#qrarea").html('

使用支付宝二维码支付

手机可点击二维码付款

'); + $("#qrarea").html('

请使用手机支付宝扫描二维码支付

手机可点击二维码唤起支付宝支付

'); $("#readytopay").modal('hide'); new QRCode("qrcode", { render: "canvas", - width: 100, - height: 100, + width: 200, + height: 200, text: encodeURI(data.qrcode) }); $('#qrcode').attr('href',data.qrcode);