优化sdk支付错误提示

master
chenzhi 5 years ago
parent 02ca6d5cd2
commit 4ba5296404

@ -14,6 +14,18 @@
<p>平台币充值</p> <p>平台币充值</p>
<div></div> <div></div>
</div> --> </div> -->
<div class="js_dialog" id="iosDialog" style="display: none;">
<div class="weui-mask"></div>
<div class="weui-dialog" style="width: 4rem;height: 4rem;max-width: 4rem;">
<img src="__IMG__/payerroricon.png" style="width: 1.4rem;height: 1.4rem;margin-top: .59rem;">
<p id="errormsg" style="font-size: .24rem;margin-top: .39rem;">输入错误,请重新输入</p>
<div class="btnbox" style="margin-top: .28rem;">
<div id="hidedialog" class="ptbbtn" style="width: 1.5rem;height: .5rem;line-height: .5rem;">
返回
</div>
</div>
</div>
</div>
<form action="" method="get"> <form action="" method="get">
<input type="hidden" name="user_token" value="{$user_token}"> <input type="hidden" name="user_token" value="{$user_token}">
<div class="ptbboxpad pay-form-info"> <div class="ptbboxpad pay-form-info">
@ -51,11 +63,11 @@
$(function() { $(function() {
$("#pay").click(function() { $("#pay").click(function() {
if (!$("#money").val()) { if (!$("#money").val()) {
alert('金额不能为空'); showerror("金额不能为空");
return ; return ;
} }
if (!$("#money").val() < 0) { if (!$("#money").val() < 0) {
alert('金额有误'); showerror("金额有误");
return ; return ;
} }
var money = $("#money").val(); var money = $("#money").val();
@ -63,5 +75,13 @@
window.location.href = "/sdk.php/userH/platform_pay/account/{$account}/user_token/{$user_token}/game_id/{$game_id}/money/"+money+"?action=pay" window.location.href = "/sdk.php/userH/platform_pay/account/{$account}/user_token/{$user_token}/game_id/{$game_id}/money/"+money+"?action=pay"
}); });
}); });
function showerror(msg){
$("#errormsg").html(msg);
$("#iosDialog").show();
$("#hidedialog").off("click");
$("#hidedialog").on("click",function(){
$("#iosDialog").hide();
});
}
</script> </script>
</html> </html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Loading…
Cancel
Save