大理需求:绑定银行卡时银行卡号和身份证号去空格,60s之后重复发,注意:安卓版本使用的是platforms/android目录下代码,不能覆盖,里面做了特殊代码修改
diff --git a/www/js/signxycheck.js b/www/js/signxycheck.js
index 4e52298..dedeb88 100644
--- a/www/js/signxycheck.js
+++ b/www/js/signxycheck.js
@@ -1,11 +1,13 @@
var db = null;
+var canCheck = false;
+var wait = 5;
var app = {
-
// Application Constructor
initialize: function() {
document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
+ canCheck = false;
+ wait=5;
},
-
onDeviceReady: function() {
$.showLoading("加载中");
V1Bxy(function(ok, ret, err) {
@@ -15,6 +17,7 @@
$("#content").html(ret.page);
if (isEmpty(ret.signed) || ret.signed != 'yes') {
$("#btn").show();
+ app.checkTime();
$("#content").css("bottom", "135px");
} else {
$("#content").css("bottom", "10px");
@@ -35,6 +38,9 @@
})
},
agreeXY: function() {
+ if(!canCheck){
+ return;
+ }
var agree = $("input[type=checkbox]:checked").val();
if (isEmpty(agree)) {
$.alert("请同意签约代扣协议", "提示");
@@ -58,6 +64,20 @@
$.alert("请求失败了:" + ret.status + "请稍后再试", "错误");
}
})
+ },
+ checkTime: function(){
+ if (wait == 0) {
+ $("#signBtn").text("签约代扣协议");
+ $("#signBtn").addClass("aui-btn-info");
+ canCheck = true;
+ }else{
+ $("#signBtn").text(wait+"s 签约代扣协议");
+ wait--;
+ setTimeout(function() {
+ app.checkTime();
+ },1000)
+ }
}
+
};
app.initialize();
\ No newline at end of file