修改卡绑定功能,登录方式改为跳转
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 {