From 2b5a896725fbd46eb5b4e8930a18a4ba7d6437e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Thu, 13 Apr 2017 19:07:17 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E5=A2=9E=E5=8A=A0=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=94=AF=E4=BB=98=E6=B5=8B=E8=AF=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/view/config.pay.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/application/wechat/view/config.pay.html b/application/wechat/view/config.pay.html index 4cd2a20f1..5f261f66b 100644 --- a/application/wechat/view/config.pay.html +++ b/application/wechat/view/config.pay.html @@ -103,12 +103,13 @@ function payTest() { $.form.load('{:url("pay")}?action=payqrc', {}, 'get', function (ret) { if (ret.code === 1 || ret.code === 2) { - if(ret.code===2){ + if (ret.code === 2) { ret.url = '__STATIC__/theme/default/img/wechat/qrc_payed.jpg'; + timer && window.clearInterval(timer), timer = null; } - if(isShow){ - $('.pay-qrc-test').attr('src',ret.url) - }else{ + if (isShow) { + $('.pay-qrc-test').attr('src', ret.url) + } else { layer.open({ type: 1, title: false, closeBtn: 1, shadeClose: true, content: '' @@ -116,11 +117,11 @@ + '

退款测试

', end: function () { isShow = false; - timer && window.clearInterval(timer); + timer && window.clearInterval(timer), timer = null; }, success: function (layero, index) { isShow = true; - timer = setInterval(payTest,1000); + timer = setInterval(payTest, 1000); } }); } @@ -128,6 +129,7 @@ return false; }); } + $('[data-pay-test]').on('click', payTest); });