签约流程,指纹登录
diff --git a/www/js/bindcheck.js b/www/js/bindcheck.js
index 32dba4c..8862e73 100644
--- a/www/js/bindcheck.js
+++ b/www/js/bindcheck.js
@@ -18,19 +18,10 @@
btnTime('codebtn');
},
getCode: function() {
- var name = window.localStorage.getItem("name");
- var cardno = window.localStorage.getItem("cardno");
- var idtype = window.localStorage.getItem("idtype");
- var idno = window.localStorage.getItem("idno");
-
$.showLoading("正在请求");
var param = {
- "cardno": cardno,
- "idtype": idtype,
- "name": name,
- "idno": idno
}
- V1Bindcard(param, function(ok, ret) {
+ V1Bindcardcode(param, function(ok, ret) {
if (ok) {
$.hideLoading();
if (ret.code == 200) {
@@ -57,37 +48,27 @@
if(isEmpty(code)){
return;
}
- var personid = window.localStorage.getItem("personid");
+ var agree = $("input[type=checkbox]:checked").val();
+ if(isEmpty(agree)){
+ $.alert("请同意市民卡免密代扣签约协议", "提示");
+ return;
+ }
$.showLoading("正在处理");
var param={
- "personid":personid,
- "code":code,
+ "agree":code
}
- V1Checkcode(param,function(ok,ret){
- if(ok){
- $.hideLoading();
- console.log(ret)
+ V1Signbxy(param,function(ok, ret, err) {
+ if (ok) {
+ $.hideLoading();
if(ret.code==200){
- window.localStorage.setItem("paypwdtype", "new");
- window.localStorage.setItem("userid", personid);
- var signed = window.localStorage.getItem("signed");
- var paypwdset = window.localStorage.getItem("paypwdset");
- console.log(paypwdset)
- if (!paypwdset||'false'==paypwdset) {
- window.location = "paypwdset.html";
- } else {
- if (!isEmpty(signed) && signed == 'yes') {
- window.location = 'main.html'
- } else {
- window.location = 'signxy.html'
- }
- }
+ window.localStorage.setItem("signed",ret.signed);
+ window.location="main.html";
}else{
- $.alert(ret.msg, "错误");
- }
- }else{
+ $.alert(ret.msg, "错误");
+ }
+ } else {
$.hideLoading();
- $.alert("请求失败了"+ret.status+",请稍后再试", "错误");
+ $.alert("请求失败了:" + ret.status+"请稍后再试", "错误");
}
})
}