修改卡绑定功能,登录方式改为跳转
diff --git a/pages/bindcheck/bindcheck.js b/pages/bindcheck/bindcheck.js
index 3ca4c4c..c9f97eb 100644
--- a/pages/bindcheck/bindcheck.js
+++ b/pages/bindcheck/bindcheck.js
@@ -11,7 +11,7 @@
     sendColor: 'rgb(124, 255, 112)',
     snsMsgWait: 30,
     smsFlag: true,
-   
+    privacyCheck:''
   },
 
   /**
@@ -35,6 +35,7 @@
     }
   },
 
+
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
@@ -88,46 +89,43 @@
   onShareAppMessage: function() {
 
   },
+  checkboxChange:function(e){
+    console.log(e.detail.value);
+    this.setData({
+      privacyCheck: e.detail.value
+    })
+  },
+  showXy:function(){
+    wx.navigateTo({
+      url: '../signxy/signxy',
+    })
+  },
   doNext: function () {
     var code = this.data.code;
     if (wx.$isEmpty(code)) {
       return;
     }
 
-    var personid = wx.getStorageSync("personid");
-    
-    var param = {
-      "personid": personid,
-      "code": code,
+    var agree =this.data.privacyCheck;
+    if (wx.$isEmpty(agree)) {
+      wx.showModal({
+        title: '提示',
+        content: '请同意民卡免密代扣签约协议',
+      })
+      return;
     }
-    wx.$doPost('/v1/checkcode',param, function (ok, ret) {
+    var personid = wx.getStorageSync("personid");
+    var param={
+      "agree":code
+  }
+    wx.$doPost('/v1/signbxy',param, function (ok, ret) {
       if (ok) {
-     
-        console.log(ret)
         if (ret.data.code == 200) {
-          wx.setStorageSync("paypwdtype", "new");
           wx.setStorageSync("userid", personid);
-          var signed = wx.getStorageSync("signed");
-          var paypwdset = wx.getStorageSync("paypwdset");
-          console.log(paypwdset)
-          if (!paypwdset || 'false' == paypwdset) {
-            wx.navigateTo({
-              url: '../paypwdset/paypwdset',
-            })
-           
-          } else {
-            if (!wx.$isEmpty(signed) && signed == 'yes') {
-              wx.navigateTo({
-                url: '../index/index',
-              })
-          
-            } else {
-              wx.navigateTo({
-                url: '../signxy/signxy',
-              })
-          
-            }
-          }
+          wx.setStorageSync("signed", ret.data.signed);
+          wx.navigateTo({
+            url: '../index/index',
+          })     
         } else {
           wx.showModal({
             title: '错误',
@@ -153,18 +151,18 @@
 
     wx.$doCountdown(this);
 
-    var name = wx.getStorageSync("name");
-    var cardno = wx.getStorageSync("cardno");
-    var idtype = wx.getStorageSync("idtype");
-    var idno = wx.getStorageSync("idno");
+    // var name = wx.getStorageSync("name");
+    // var cardno = wx.getStorageSync("cardno");
+    // var idtype = wx.getStorageSync("idtype");
+    // var idno = wx.getStorageSync("idno");
 
     var param = {
-      "cardno": cardno,
-      "idtype": idtype,
-      "name": name,
-      "idno": idno
+      // "cardno": cardno,
+      // "idtype": idtype,
+      // "name": name,
+      // "idno": idno
     }
-    wx.$doPost('/v1/bindcard', param, function(ok, ret) {
+    wx.$doPost('/v1/bindcardcode', param, function(ok, ret) {
       console.log(ret.data);
       if (ok) {
         if (ret.data.code == 200) {} else {
diff --git a/pages/bindcheck/bindcheck.wxml b/pages/bindcheck/bindcheck.wxml
index 87dbe70..1b00856 100644
--- a/pages/bindcheck/bindcheck.wxml
+++ b/pages/bindcheck/bindcheck.wxml
@@ -6,13 +6,23 @@
       <view class="input-desc">
         验证码
       </view>
-      <input placeholder="请输入验证码 " type="number" style="width:70%" bindinput="setCode"></input>
-     
+      <input placeholder="请输入验证码" type="number" style="width:45%" bindinput="setCode"></input>
+      <view class="authcode center" style="color:{{sendColor}}" bindtap="getCode">
+        {{sendTime}}
+      </view>
 
     </view>
-    
 
-    <button bindtap="doNext" class="long-btn" style="width: 90%;">下一步</button>
+    <view class="inline-item" style="margin-top:30rpx;background-color:rgb(240, 240, 240)">
+      <checkbox-group bindchange="checkboxChange">
+        <label>
+          <checkbox value="1" class="checkbox" />我已阅读并同意
+        </label>
+      </checkbox-group>
+
+      <view class="policy" bindtap="showXy">《市民卡免密代扣签约协议》</view>
+    </view>
+    <button bindtap="doNext" class="long-btn" style="width: 90%;">签约</button>
 
   </view>
 </view>
\ No newline at end of file