大理市民卡小程序1.0提交
diff --git a/pages/bindcard/bindcard.js b/pages/bindcard/bindcard.js
new file mode 100644
index 0000000..dc76332
--- /dev/null
+++ b/pages/bindcard/bindcard.js
@@ -0,0 +1,205 @@
+// pages/bindcard/bindcard.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    index: 0,
+    idno: '',
+    name: '',
+    cardnum: '',
+    array: [
+      '身份证',
+      '驾照',
+      '外国人居留证',
+      '港澳居民来往内地通行证',
+      
+      '军官证',
+      '护照',
+      '户口簿',
+      '其他'
+    ],
+    idtypes: [
+      'idcard',
+      'driving_license',
+      'foreigner_residence_permit',
+      'hk_macau_pass',
+      
+      'military_idcard',
+      'passport',
+      'residence_booklet',
+      'unknown'
+    ],
+    // idtypes: [{
+    //     val: 'driving_license',
+    //     name: '驾照'
+    //   },
+    //   {
+    //     val: 'foreigner_residence_permit',
+    //     name: '外国人居留证'
+    //   },
+    //   {
+    //     val: 'hk_macau_pass',
+    //     name: '港澳居民来往内地通行证'
+    //   },
+    //   {
+    //     val: 'idcard',
+    //     name: '身份证'
+    //   },
+    //   {
+    //     val: 'military_idcard',
+    //     name: '军官证'
+    //   },
+    //   {
+    //     val: 'passport',
+    //     name: '护照'
+    //   },
+    //   {
+    //     val: 'residence_booklet',
+    //     name: '户口簿'
+    //   },
+    //   {
+    //     val: 'unknown',
+    //     name: '其他'
+    //   }
+    // ]
+  },
+  setName: function(e) {
+    this.setData({
+      name: e.detail.value
+    })
+  },
+  bindPickerChange: function(e) {
+    this.setData({
+      index: e.detail.value
+    })
+
+  },
+  setIdCode: function(e) {
+    this.setData({
+      idno: e.detail.value
+    })
+  },
+  setBankcard: function(e) {
+    this.setData({
+      cardnum: e.detail.value
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  },
+  doNext: function() {
+    var name=this.data.name;
+    var idno=this.data.idno;
+    var cardnum=this.data.cardnum;
+
+    if (wx.$isEmpty(name) || wx.$isEmpty(cardnum) || wx.$isEmpty(idno)) {
+      return;
+    }
+    cardnum = cardnum.trim();
+    name = name.trim();
+    idno = idno.trim();
+
+    wx.showLoading({
+      title: '正在处理',
+    })
+    var index=this.data.index;
+    var idtype = this.data.idtypes[index];
+  
+    var param = {
+      "cardno": cardnum,
+      "idtype": idtype,
+      "name": name,
+      "idno": idno
+    }
+    wx.$doPost('/v1/bindcard', param, function(ok, ret) {
+      wx.hideLoading();
+      if (ok) {
+        
+        console.log(ret)
+        if (ret.data.code == 200) {
+          wx.setStorageSync("name", name);
+          wx.setStorageSync("cardno", cardnum);
+          wx.setStorageSync("idtype", idtype);
+          wx.setStorageSync("idno", idno);
+          wx.setStorageSync("phoneX", ret.data.phonex);
+          wx.setStorageSync("personid", ret.data.personid);
+          wx.setStorageSync("signed", ret.data.signed);
+          wx.setStorageSync("paypwdset", ret.data.paypwdset);
+          wx.navigateTo({
+            url: '../bindcheck/bindcheck',
+          })
+        } else {
+          wx.showModal({
+            title: '错误',
+            content: ret.data.msg,
+            duration: 2000
+          })
+
+        }
+      } else {
+        wx.showModal({
+          title: '错误',
+          content: "请求失败了" + ret.data.status + ",请稍后再试",
+          duration: 2000
+        })
+      }
+    })
+  }
+
+
+})
\ No newline at end of file
diff --git a/pages/bindcard/bindcard.json b/pages/bindcard/bindcard.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/bindcard/bindcard.json
@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/bindcard/bindcard.wxml b/pages/bindcard/bindcard.wxml
new file mode 100644
index 0000000..bb27689
--- /dev/null
+++ b/pages/bindcard/bindcard.wxml
@@ -0,0 +1,30 @@
+<view class="container">
+
+  <view class="global-background">
+    <view class="inline-item center" style="margin-top: 50rpx;">
+      <view class="input-desc">
+        姓名
+      </view>
+      <input  placeholder="请输入真实姓名" style="width: 70%;" bindinput="setName"></input>
+    </view>
+    <view class="inline-item center" >
+      <view class="input-desc">
+        证件类型
+      </view>
+      <picker style="width: 70%;"  bindchange="bindPickerChange" value="{{index}}" range="{{array}}">{{array[index]}}</picker>
+    </view>
+     <view class=" inline-item center ">
+      <view class="input-desc ">
+        证件号
+      </view>
+      <input placeholder="请输入证件号 " style="width: 70%; " bindinput="setIdCode"></input>
+    </view>
+     <view class="inline-item center " >
+      <view class="input-desc ">
+        银行卡号
+      </view>
+      <input placeholder="市民卡对应的银行卡号 " style="width: 70%; " bindinput="setBankcard"></input>
+    </view>
+    <button bindtap="doNext" class="long-btn " style="width: 90%; ">下一步</button>
+  </view>
+</view>
\ No newline at end of file
diff --git a/pages/bindcard/bindcard.wxss b/pages/bindcard/bindcard.wxss
new file mode 100644
index 0000000..225feef
--- /dev/null
+++ b/pages/bindcard/bindcard.wxss
@@ -0,0 +1 @@
+/* pages/bindcard/bindcard.wxss */
\ No newline at end of file