签约流程,指纹登录
diff --git a/www/js/main.js b/www/js/main.js
index bc93d91..78b896f 100644
--- a/www/js/main.js
+++ b/www/js/main.js
@@ -111,6 +111,25 @@
})
})
});
+ $('#accsignbtn').click(function() {
+ app.checkBefore(function() {
+ var signed = window.localStorage.getItem("signed");
+ var cum = new auiDialog({});
+ if (isEmpty(signed) || signed != 'yes') {
+ var confirm = cum.alert({
+ title: "提示",
+ msg: '您尚未签约市民卡免密代扣签约协议,无法使用该功能',
+ buttons: ['取消', '去签约']
+ }, function(ret) {
+ if (ret.buttonIndex == 2) {
+ app.toSignCode();
+ }
+ })
+ }else{
+ window.location = 'signxycheck.html'
+ }
+ })
+ });
this.initData();
this.backBtn();
},
@@ -153,13 +172,15 @@
$("#loaddata").show()
$("#nodata").hide();
var param = {
- "pageno": 1
+ "pageno": 1,
+ "platform":device.platform
}
V1Bills(param, function(ok, ret) {
if (ok) {
- //console.log(ret)
+ console.log(ret)
if (ret.code == 200) {
- app.checkVersion(ret.version,ret.minversion,ret.versionmsg);
+ app.checkVersion(ret.version,ret.minversion,ret.versionmsg,ret.versionurl);
+ //app.checkVersion("1.3.9","1","new func","https://shouji.baidu.com/software/26706357.html");
$("#maingt").text(ret.t + "!")
$("#user-amount").text(ret.amount)
$("#user-point").text(ret.point)
@@ -196,14 +217,21 @@
}
})
},
- checkVersion:function(ver,minver,msg){
+ checkVersion:function(ver,minver,m,url){
cordova.getAppVersion.getVersionNumber(function (version) {
//alert(version);
- if(version<minver){
- //TODO 强制升级
- alert("当前版本过低,为了不影响您的使用,请先升级");
- }else if(ver>version){
- alert("有新的版本");
+ //alert(version);
+ if(ver>version){
+ var cum = new auiDialog({});
+ var confirm = cum.alert({
+ title: "有新的版本",
+ msg: m,
+ buttons: ['取消', '去更新']
+ }, function(ret) {
+ if (ret.buttonIndex == 2) {
+ cordova.InAppBrowser.open(url, '_system', 'location=no,toolbar=yes,toolbarposition=top,closebuttoncaption=关闭');
+ }
+ })
}
});
},
@@ -282,38 +310,40 @@
}
},
checkOther: function(callback) {
- var payseted = window.localStorage.getItem("paypwdset");
var signed = window.localStorage.getItem("signed");
var cum = new auiDialog({});
- console.log(payseted, signed)
- if (isEmpty(payseted) || !payseted || payseted != 'true') {
+
+ if (isEmpty(signed) || signed != 'yes') {
var confirm = cum.alert({
title: "提示",
- msg: '您还没有设置支付密码,无法使用该功能',
- buttons: ['取消', '去设置']
+ msg: '您尚未签约市民卡免密代扣签约协议,无法使用该功能',
+ buttons: ['取消', '去签约']
}, function(ret) {
if (ret.buttonIndex == 2) {
- window.location = 'paypwdset.html'
+ app.toSignCode();
}
})
} else {
- if (isEmpty(signed) || signed != 'yes') {
- var confirm = cum.alert({
- title: "提示",
- msg: '您尚未签约代扣免密付协议,无法使用该功能',
- buttons: ['取消', '去签约']
- }, function(ret) {
- if (ret.buttonIndex == 2) {
- window.location = 'signxy.html'
- }
- })
- } else {
- if (callback) {
- callback()
- }
+ if (callback) {
+ callback()
}
}
},
+ toSignCode: function(){
+ var param = {
+ }
+ V1Bindcardcode(param, function(ok, ret) {
+ if (ok) {
+ if (ret.code == 200) {
+ window.location = 'bindcheck.html'
+ } else {
+ $.alert(ret.msg, "错误");
+ }
+ } else {
+ $.alert("请求失败了 " + ret.status + ",请稍后再试", "错误");
+ }
+ })
+ },
toSign: function() {
window.location = 'signxycheck.html'
},