解约、解绑
diff --git a/www/js/cardinfor.js b/www/js/cardinfor.js
index 3d8f675..da6e04f 100644
--- a/www/js/cardinfor.js
+++ b/www/js/cardinfor.js
@@ -22,6 +22,44 @@
                 $.alert("加载失败了:" + ret.status, "错误");
             }
         })
+    },
+    unBindcard: function(){
+        var dialog = new auiDialog({})
+        dialog.prompt({
+            title:"请输入支付密码",
+            text:'请输入支付密码',
+            buttons:['取消','确定']
+        },function(ret){
+            console.log(ret);
+            if(ret.buttonIndex == 2){
+                if(!isEmpty(ret.text)){
+                    $.showLoading("正在请求");
+                    var param = {
+                        "paypwd":ret.text
+                    }
+                    V1Unbindcard(param,function(ok, ret, err) {
+                        if (ok) {
+                            $.hideLoading(); 
+                            if(ret.code==200){
+                                window.localStorage.removeItem("userid");
+                                $.alert('解绑成功', "提示", function() {
+                                    window.location = 'main.html'
+                                });
+                            }else{
+                                $.alert(ret.msg, "错误");
+                            }
+                        } else {
+                            $.hideLoading();
+                            $.alert("请求失败了:" + ret.status, "错误");
+                        }
+                    })
+                }
+            }
+        });
+        var input = $(".aui-dialog-body").find("input");
+        if(input){
+            input.attr("type","password");
+        }
     }
 };
 app.initialize();
diff --git a/www/js/main.js b/www/js/main.js
index e0a358f..9d3b017 100644
--- a/www/js/main.js
+++ b/www/js/main.js
@@ -328,6 +328,10 @@
         } else {
             window.location = 'cardinfor.html'
         }
+    },
+    logout:function(){
+        window.localStorage.removeItem("token");
+        window.location = "login.html";
     }
 };
 app.initialize();
diff --git a/www/js/qrcode.js b/www/js/qrcode.js
index 79ae312..b9d81b9 100644
--- a/www/js/qrcode.js
+++ b/www/js/qrcode.js
@@ -88,7 +88,7 @@
           console.log(e)
         });
       } 
-      window,location.href='main.html';
+      window.location.href='main.html';
     }
 };
 app.initialize();
\ No newline at end of file
diff --git a/www/js/server.js b/www/js/server.js
index 64a6da6..0674e1a 100644
--- a/www/js/server.js
+++ b/www/js/server.js
@@ -7,6 +7,13 @@
 if (dev) {
     SERVER = "http://172.28.43.7:8099/payapi/mobileapi";
 }
+function V1Unbindcard(param,callback){
+    ajaxPost("/v1/unbindcard", param, callback)
+}
+
+function V1UnSignbxy(param,callback){
+    ajaxPost("/v1/unsignbxy", param, callback)
+}
 
 function V1Qrcode(callback) {
     ajaxPost("/v1/qrcode", {}, callback)
@@ -76,7 +83,6 @@
     ajaxPost("/i/code", param, callback)
 }
 
-
 function IServeTime(callback) {
     ajaxPost("/i/time", {}, callback)
 }
diff --git a/www/js/signxycheck.js b/www/js/signxycheck.js
index dedeb88..80ef9d7 100644
--- a/www/js/signxycheck.js
+++ b/www/js/signxycheck.js
@@ -20,6 +20,7 @@
                         app.checkTime();
                         $("#content").css("bottom", "135px");
                     } else {
+                        $("#unbtn").show();
                         $("#content").css("bottom", "10px");
                     }
                 } else {
@@ -37,6 +38,35 @@
             }
         })
     },
+    unAgreeXY: function(){
+        var cum = new auiDialog({});
+        var confirm = cum.alert({
+            title: "提示",
+            msg: '确定解除代扣协议吗?',
+            buttons: ['取消', '解除']
+        }, function(ret) {
+            if (ret.buttonIndex == 2) {
+                $.showLoading("正在请求");
+                var param = {}
+                V1UnSignbxy(param, function(ok, ret, err) {
+                    if (ok) {
+                        $.hideLoading();
+                        if (ret.code == 200) {
+                            window.localStorage.setItem("signed", ret.signed);
+                            $.alert('解除成功', "提示", function() {
+                                window.location = 'main.html'
+                            });
+                        } else {
+                            $.alert(ret.msg, "错误");
+                        }
+                    } else {
+                        $.hideLoading();
+                        $.alert("请求失败了:" + ret.status + "请稍后再试", "错误");
+                    }
+                })
+            }
+        })
+    },
     agreeXY: function() {
         if(!canCheck){
             return;