Przeglądaj źródła

0922正式版本

ssfg 4 lat temu
rodzic
commit
b7e0432553

+ 2 - 1
app.js

@@ -91,7 +91,8 @@ App({
                 console.log("用户的openid:" + res.data.openid);
                 wx.setStorageSync('openId', res.data.openid)
                 wx.request({
-                  url: 'http://info.windd.cn:8080/test/applet/isExist',
+                  // url: 'http://info.windd.cn:8080/test/applet/isExist',
+                  url:'https://info.windd.cn/collection/applet/isExist',
                   method: "GET",
                   data: {
                     appletsId: wx.getStorageSync('openId')

+ 585 - 183
pages/collectInfo/collectInfo.js

@@ -4,6 +4,19 @@ var isonShow;
 var isTwoOnshow;
 Page({
   data: {
+    showAdressBox: false,
+    showAdressBox1: false,
+    provinceArr: [],
+    cityArr: [],
+    areaArr: [],
+    townArr: [],
+    villageArr: [],
+    codeArr: [], //传地址时带的code数组
+    province: '',
+    city: '',
+    area: '',
+    town: '',
+    village: '',
     codeArr: [], //传地址时带的code数组
     nowAdress: false, //现居地址可点不可点
     adressChangeStatus: false,
@@ -109,13 +122,15 @@ Page({
       visitCount: '',
       visitCountExt: '', // 频次的其他
     }],
-    multiArray: [
-      [],
-      [],
-      [],
-      [],
-      []
-    ],
+    // multiArray: [
+    //   [],
+    //   [],
+    //   [],
+    //   [],
+    //   []
+    // ],
+    // multiIndex: [0, 0, 0, 0, 0],
+    // multiIndex1: [0, 0, 0, 0, 0]
     multiIndex: [0, 0, 0, 0, 0]
   },
   // 左侧点击
@@ -877,8 +892,299 @@ Page({
     }
   },
   // 选择五级地址
+  // chooseAdress() {
+  //   let arr = 'multiArray[0]'
+  //   wx.request({
+  //     url: util.globalData.publicUrl + '/civilregionalism/deptList',
+  //     method: "get",
+  //     header: {
+  //       appletsId: wx.getStorageSync('openId')
+  //     },
+  //     success: (res) => {
+  //       let newdata = [];
+  //       let j;
+  //       res.data.data.forEach(item => {
+  //         newdata.push(item);
+  //       });
+  //       for (var i = 0; i < newdata.length; i++) {
+  //         if (newdata[i].CIVILREGIONALISMNAME == '吉林省') {
+  //           j = i;
+  //         }
+  //       }
+  //       newdata.unshift(newdata[j])
+  //       newdata.splice(j + 1, 1);
+  //       console.log('我走了1')
+  //       this.setData({
+  //         [arr]: newdata,
+  //         adressChangeStatus: true
+  //       })
+  //       this.chooseAdress2();
+  //     }
+  //   })
+  // },
+  // chooseAdress2(fid) {
+  //   let mid;
+  //   if (fid) {
+  //     mid = fid
+  //   } else {
+  //     mid = this.data.multiArray[0][0].CIVILREGIONALISMID
+  //   }
+  //   let arr = 'multiArray[1]'
+  //   let newdata = [];
+  //   wx.request({
+  //     url: util.globalData.publicUrl + '/civilregionalism/deptList',
+  //     method: "get",
+  //     header: {
+  //       appletsId: wx.getStorageSync('openId')
+  //     },
+  //     data: {
+  //       fid: mid
+  //     },
+  //     success: (res) => {
+  //       res.data.data.forEach(item => {
+  //         newdata.push(item)
+  //       });
+  //       console.log('我走了2')
+  //       this.setData({
+  //         [arr]: newdata,
+  //         adressChangeStatus: true
+  //       })
+  //       this.chooseAdress3();
+  //     }
+  //   })
+  // },
+  // chooseAdress3(fid) {
+  //   let mid;
+  //   if (fid) {
+  //     mid = fid
+  //   } else {
+  //     mid = this.data.multiArray[1][0].CIVILREGIONALISMID
+  //   }
+  //   let arr = 'multiArray[2]'
+  //   let newdata = [];
+  //   wx.request({
+  //     url: util.globalData.publicUrl + '/civilregionalism/deptList',
+  //     method: "get",
+  //     header: {
+  //       appletsId: wx.getStorageSync('openId')
+  //     },
+  //     data: {
+  //       fid: mid
+  //     },
+  //     success: (res) => {
+  //       res.data.data.forEach(item => {
+  //         newdata.push(item)
+  //       });
+  //       console.log('我走了3')
+  //       this.setData({
+  //         [arr]: newdata,
+  //         adressChangeStatus: true
+  //       })
+  //       this.chooseAdress4();
+  //     }
+  //   })
+  // },
+  // chooseAdress4(fid) {
+  //   let mid;
+  //   if (fid) {
+  //     mid = fid
+  //   } else {
+  //     mid = this.data.multiArray[2][0].CIVILREGIONALISMID
+  //   }
+  //   let arr = 'multiArray[3]'
+  //   let newdata = [];
+  //   wx.request({
+  //     url: util.globalData.publicUrl + '/civilregionalism/deptList',
+  //     method: "get",
+  //     header: {
+  //       appletsId: wx.getStorageSync('openId')
+  //     },
+  //     data: {
+  //       fid: mid
+  //     },
+  //     success: (res) => {
+  //       res.data.data.forEach(item => {
+  //         newdata.push(item)
+  //       });
+  //       console.log('我走了4')
+  //       this.setData({
+  //         [arr]: newdata,
+  //         adressChangeStatus: true
+  //       })
+  //       this.chooseAdress5();
+  //     }
+  //   })
+  // },
+  // chooseAdress5(fid) {
+  //   let mid;
+  //   if (fid) {
+  //     mid = fid
+  //   } else {
+  //     mid = this.data.multiArray[3][0].CIVILREGIONALISMID
+  //   }
+  //   let arr = 'multiArray[4]'
+  //   let newdata = [];
+  //   wx.request({
+  //     url: util.globalData.publicUrl + '/civilregionalism/deptList',
+  //     method: "get",
+  //     header: {
+  //       appletsId: wx.getStorageSync('openId')
+  //     },
+  //     data: {
+  //       fid: mid
+  //     },
+  //     success: (res) => {
+  //       res.data.data.forEach(item => {
+  //         newdata.push(item)
+  //       });
+  //       console.log('我走了5')
+  //       this.setData({
+  //         [arr]: newdata,
+  //         adressChangeStatus: false
+  //       })
+  //     }
+  //   })
+  // },
+  // // 户籍地址
+  // bindMultiPickerChange: function (e) {
+  //   console.log(this.data.adressChangeStatus)
+  //   if (!this.data.adressChangeStatus) {
+  //     let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr'
+  //     let province = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMNAME;
+  //     let city = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMNAME;
+  //     let area = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMNAME;
+  //     let town = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMNAME;
+  //     let village = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMNAME;
+  //     let provinceCode = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMCODE;
+  //     let cityCode = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMCODE;
+  //     let areaCode = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMCODE;
+  //     let townCode = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMCODE;
+  //     let villageCode = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMCODE;
+  //     this.setData({
+  //       multiIndex: e.detail.value,
+  //       [arr]: [],
+  //       codeArr: []
+  //     })
+  //     this.data.codeArr.push(provinceCode, cityCode, areaCode, townCode, villageCode)
+  //     this.data.oldInfo[this.data.activeIndex].chooseAdressArr.push(province, city, area, town, village)
+  //     let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr.join("/");
+  //     let b = this.data.codeArr.join(",")
+  //     this.SubmitOldmanInfo({
+  //       id: this.data.nameArr[this.data.activeIndex]._id,
+  //       nativePlace: a,
+  //       nativePlaceId: b
+  //     })
+  //     this.setData({
+  //       [arr]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr
+  //     })
+  //     if (this.data.oldInfo[this.data.activeIndex].isSameWithAddress[0].checked) {
+  //       let Info = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
+  //       let Infos = 'oldInfo[' + this.data.activeIndex + '].addressExt'
+  //       this.setData({
+  //         [Info]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr,
+  //         [Infos]: this.data.oldInfo[this.data.activeIndex].nativePlaceExt
+  //       })
+  //       let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr.join("/");
+  //       let b = this.data.codeArr.join(",")
+  //       this.SubmitOldmanInfo({
+  //         id: this.data.nameArr[this.data.activeIndex]._id,
+  //         address: a,
+  //         addressId: b
+  //       })
+  //     }
+  //   } else {
+  //     // let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr'
+  //     // this.setData({
+  //     //   [arr]: []
+  //     // })
+  //     wx.showToast({
+  //       title: '户籍地址不匹配,请重新选择',
+  //       icon: 'none',
+  //       duration: 2000,
+  //     })
+  //   }
+  // },
+  // // 五级联动
+  // bindMultiPickerColumnChange: function (e) {
+  //   this.setData({
+  //     adressChangeStatus: true
+  //   })
+  //   if (e.detail.column == 4) {
+  //     this.setData({
+  //       adressChangeStatus: false
+  //     })
+  //   }
+  //   if (e.detail.column == 0) {
+  //     this.chooseAdress2(this.data.multiArray[0][e.detail.value].CIVILREGIONALISMID);
+  //   } else if (e.detail.column == 1) {
+  //     this.chooseAdress3(this.data.multiArray[1][e.detail.value].CIVILREGIONALISMID);
+  //   } else if (e.detail.column == 2) {
+  //     this.chooseAdress4(this.data.multiArray[2][e.detail.value].CIVILREGIONALISMID);
+  //   } else if (e.detail.column == 3) {
+  //     this.chooseAdress5(this.data.multiArray[3][e.detail.value].CIVILREGIONALISMID);
+  //   }
+  // },
+  // //现居地址picker
+  // bindMultiPickerChange1: function (e) {
+  //   console.log(this.data.adressChangeStatus)
+  //   if (!this.data.adressChangeStatus) {
+  //     let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
+  //     let province = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMNAME;
+  //     let city = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMNAME;
+  //     let area = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMNAME;
+  //     let town = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMNAME;
+  //     let village = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMNAME;
+  //     let provinceCode = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMCODE;
+  //     let cityCode = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMCODE;
+  //     let areaCode = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMCODE;
+  //     let townCode = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMCODE;
+  //     let villageCode = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMCODE;
+  //     this.setData({
+  //       multiIndex1: e.detail.value,
+  //       [arr]: []
+  //     })
+  //     let codeArr = [];
+  //     codeArr.push(provinceCode, cityCode, areaCode, townCode, villageCode)
+  //     this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.push(province, city, area, town, village)
+  //     let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.join("/");
+  //     let b = codeArr.join(",")
+  //     this.SubmitOldmanInfo({
+  //       id: this.data.nameArr[this.data.activeIndex]._id,
+  //       address: a,
+  //       addressId: b
+  //     })
+  //     this.setData({
+  //       [arr]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr1
+  //     })
+  //   } else {
+  //     let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
+  //     this.setData({
+  //       [arr]: []
+  //     })
+  //     wx.showToast({
+  //       title: '现居地址不匹配,请重新选择',
+  //       icon: 'none',
+  //       duration: 2000,
+  //     })
+  //   }
+  // },
+  showAdressShow() {
+    this.chooseAdress();
+    this.setData({
+      multiIndex: [0, 0, 0, 0, 0],
+      showAdressBox: true
+    })
+  },
+  showAdressShow1() {
+    if(!this.data.oldInfo[this.data.activeIndex].isSameWithAddress[0].checked){
+      this.chooseAdress();
+      this.setData({
+        multiIndex: [0, 0, 0, 0, 0],
+        showAdressBox1: true
+      })
+    }
+  },
   chooseAdress() {
-    let arr = 'multiArray[0]'
     wx.request({
       url: util.globalData.publicUrl + '/civilregionalism/deptList',
       method: "get",
@@ -899,11 +1205,14 @@ Page({
         newdata.unshift(newdata[j])
         newdata.splice(j + 1, 1);
         this.setData({
-          [arr]: newdata,
-          adressChangeStatus: true
+          provinceArr: newdata,
+        })
+        this.setData({
+          province: this.data.provinceArr[0].CIVILREGIONALISMNAME,
+          provinceCode: this.data.provinceArr[0].CIVILREGIONALISMCODE,
         })
+        console.log(this.data.province)
         this.chooseAdress2();
-
       }
     })
   },
@@ -911,10 +1220,13 @@ Page({
     let mid;
     if (fid) {
       mid = fid
+      wx.showLoading({
+        title: '加载中',
+        mask: true
+      })
     } else {
-      mid = this.data.multiArray[0][0].CIVILREGIONALISMID
+      mid = this.data.provinceArr[this.data.multiIndex[1]].CIVILREGIONALISMID
     }
-    let arr = 'multiArray[1]'
     let newdata = [];
     wx.request({
       url: util.globalData.publicUrl + '/civilregionalism/deptList',
@@ -930,21 +1242,31 @@ Page({
           newdata.push(item)
         });
         this.setData({
-          [arr]: newdata,
-          adressChangeStatus: true
+          cityArr: newdata
         })
+        if (!fid) {
+          this.setData({
+            city: this.data.cityArr[0].CIVILREGIONALISMNAME,
+            cityCode: this.data.cityArr[0].CIVILREGIONALISMCODE,
+          })
+          console.log(this.data.city)
+        }
         this.chooseAdress3();
       }
     })
   },
   chooseAdress3(fid) {
     let mid;
+    console.log(this.data.cityArr[this.data.multiIndex[2]].CIVILREGIONALISMID,'我是传入的3 id')
     if (fid) {
       mid = fid
+      wx.showLoading({
+        title: '加载中',
+        mask: true
+      })
     } else {
-      mid = this.data.multiArray[1][0].CIVILREGIONALISMID
+      mid = this.data.cityArr[this.data.multiIndex[2]].CIVILREGIONALISMID
     }
-    let arr = 'multiArray[2]'
     let newdata = [];
     wx.request({
       url: util.globalData.publicUrl + '/civilregionalism/deptList',
@@ -960,21 +1282,50 @@ Page({
           newdata.push(item)
         });
         this.setData({
-          [arr]: newdata,
-          adressChangeStatus: true
+          areaArr: newdata
         })
-        this.chooseAdress4();
+        if (!fid) {
+          this.setData({
+            area: this.data.areaArr[0].CIVILREGIONALISMNAME,
+            areaCode: this.data.areaArr[0].CIVILREGIONALISMCODE,
+          })
+        }
+        console.log(newdata)
+        console.log(this.data.multiIndex)
+        if (newdata.length == 0) {
+          wx.hideLoading()
+          this.setData({
+            province: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMNAME,
+            city: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMNAME,
+            area: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMNAME,
+            town: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMNAME,
+            village: this.data.villageArr[this.data.multiIndex[4]].CIVILREGIONALISMNAME,
+            provinceCode: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMCODE,
+            cityCode: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMCODE,
+            areaCode: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMCODE,
+            townCode: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMCODE,
+            villageCode: this.data.villageArr[this.data.multiIndex[4]].CIVILREGIONALISMCODE
+          })
+        } else {
+          this.chooseAdress4();
+        }
       }
     })
   },
+  // 查镇的信息
   chooseAdress4(fid) {
+    console.log(fid, '我走4了吗')
+    console.log(this.data.areaArr[this.data.multiIndex[3]].CIVILREGIONALISMID,'我是传入的4 id')
     let mid;
     if (fid) {
       mid = fid
+      wx.showLoading({
+        title: '加载中',
+        mask: true
+      })
     } else {
-      mid = this.data.multiArray[2][0].CIVILREGIONALISMID
+      mid = this.data.areaArr[this.data.multiIndex[3]].CIVILREGIONALISMID
     }
-    let arr = 'multiArray[3]'
     let newdata = [];
     wx.request({
       url: util.globalData.publicUrl + '/civilregionalism/deptList',
@@ -990,21 +1341,46 @@ Page({
           newdata.push(item)
         });
         this.setData({
-          [arr]: newdata,
-          adressChangeStatus: true
+          townArr: newdata
         })
-        this.chooseAdress5();
+        if (!fid) {
+          this.setData({
+            town: this.data.townArr[0].CIVILREGIONALISMNAME,
+            townCode: this.data.townArr[0].CIVILREGIONALISMCODE,
+          })
+        }
+        console.log(newdata)
+        console.log(this.data.multiIndex)
+        if (newdata.length == 0) {
+          wx.hideLoading()
+          this.setData({
+            province: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMNAME,
+            city: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMNAME,
+            area: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMNAME,
+            town: '',
+            village: '',
+            townArr: [],
+            villageArr: [],
+            provinceCode: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMCODE,
+            cityCode: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMCODE,
+            areaCode: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMCODE,
+            townCode: '',
+            villageCode: ''
+          })
+        } else {
+          this.chooseAdress5();
+        }
       }
     })
   },
   chooseAdress5(fid) {
     let mid;
+    console.log(this.data.townArr[this.data.multiIndex[4]].CIVILREGIONALISMID,'我是传入的5 id')
     if (fid) {
       mid = fid
     } else {
-      mid = this.data.multiArray[3][0].CIVILREGIONALISMID
+      mid = this.data.townArr[this.data.multiIndex[4]].CIVILREGIONALISMID
     }
-    let arr = 'multiArray[4]'
     let newdata = [];
     wx.request({
       url: util.globalData.publicUrl + '/civilregionalism/deptList',
@@ -1020,127 +1396,110 @@ Page({
           newdata.push(item)
         });
         this.setData({
-          [arr]: newdata,
-          adressChangeStatus: false
+          villageArr: newdata
         })
+        if (newdata.length == 0) {
+          wx.hideLoading()
+        }
+        if (!fid) {
+          this.setData({
+            village: this.data.villageArr[0].CIVILREGIONALISMNAME,
+            villageCode: this.data.villageArr[0].CIVILREGIONALISMCODE,
+          })
+        }
+        console.log(this.data.villageArr[this.data.multiIndex[4]],'我是村阿')
+        if (newdata.length == 0) {
+          wx.hideLoading()
+          this.setData({
+            province: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMNAME,
+            city: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMNAME,
+            area: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMNAME,
+            town: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMNAME,
+            village: '',
+            villageArr: [],
+            provinceCode: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMCODE,
+            cityCode: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMCODE,
+            areaCode: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMCODE,
+            townCode: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMCODE,
+            villageCode: ''
+          })
+        } else {
+          this.setData({
+            province: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMNAME,
+            city: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMNAME,
+            area: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMNAME,
+            town: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMNAME,
+            village: this.data.villageArr[this.data.multiIndex[4]].CIVILREGIONALISMNAME,
+            provinceCode: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMCODE,
+            cityCode: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMCODE,
+            areaCode: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMCODE,
+            townCode: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMCODE,
+            villageCode: this.data.villageArr[this.data.multiIndex[4]].CIVILREGIONALISMCODE,
+          })
+        }
+        wx.hideLoading()
       }
     })
   },
-  // 户籍地址
-  bindMultiPickerChange: function (e) {
-    if (!this.data.adressChangeStatus) {
-      let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr'
-      let province = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMNAME;
-      let city = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMNAME;
-      let area = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMNAME;
-      let town = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMNAME;
-      let village = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMNAME;
-      let provinceCode = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMCODE;
-      let cityCode = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMCODE;
-      let areaCode = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMCODE;
-      let townCode = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMCODE;
-      let villageCode = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMCODE;
-      this.setData({
-        multiIndex: e.detail.value,
-        [arr]: [],
-        codeArr: []
-      })
-      this.data.codeArr.push(provinceCode, cityCode, areaCode, townCode, villageCode)
-      this.data.oldInfo[this.data.activeIndex].chooseAdressArr.push(province, city, area, town, village)
-      let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr.join("/");
-      let b = this.data.codeArr.join(",")
-      this.SubmitOldmanInfo({
-        id: this.data.nameArr[this.data.activeIndex]._id,
-        nativePlace: a,
-        nativePlaceId: b
-      })
-      this.setData({
-        [arr]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr
-      })
-      if (this.data.oldInfo[this.data.activeIndex].isSameWithAddress[0].checked) {
-        let Info = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
-        let Infos = 'oldInfo[' + this.data.activeIndex + '].addressExt'
-        this.setData({
-          [Info]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr,
-          [Infos]: this.data.oldInfo[this.data.activeIndex].nativePlaceExt
-        })
-        let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr.join("/");
-        let b = this.data.codeArr.join(",")
-        this.SubmitOldmanInfo({
-          id: this.data.nameArr[this.data.activeIndex]._id,
-          address: a,
-          addressId: b
-        })
-      }
-    } else {
-      let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr'
-      this.setData({
-        [arr]: []
-      })
-      wx.showToast({
-        title: '户籍地址不匹配,请重新选择',
-        icon: 'none',
-        duration: 2000,
-      })
-    }
-  },
-  // 五级联动
-  bindMultiPickerColumnChange: function (e) {
-    this.setData({
-      adressChangeStatus: true
-    })
-    if (e.detail.column == 0) {
-      this.chooseAdress2(this.data.multiArray[0][e.detail.value].CIVILREGIONALISMID);
-    } else if (e.detail.column == 1) {
-      this.chooseAdress3(this.data.multiArray[1][e.detail.value].CIVILREGIONALISMID);
-    } else if (e.detail.column == 2) {
-      this.chooseAdress4(this.data.multiArray[2][e.detail.value].CIVILREGIONALISMID);
-    } else if (e.detail.column == 3) {
-      this.chooseAdress5(this.data.multiArray[3][e.detail.value].CIVILREGIONALISMID);
-    }
-  },
-  //现居地址picker
-  bindMultiPickerChange1: function (e) {
-    if (!this.data.adressChangeStatus) {
-      let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
-      let province = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMNAME;
-      let city = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMNAME;
-      let area = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMNAME;
-      let town = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMNAME;
-      let village = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMNAME;
-      let provinceCode = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMCODE;
-      let cityCode = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMCODE;
-      let areaCode = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMCODE;
-      let townCode = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMCODE;
-      let villageCode = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMCODE;
-      this.setData({
-        multiIndex1: e.detail.value,
-        [arr]: []
-      })
-      let codeArr = [];
-      codeArr.push(provinceCode, cityCode, areaCode, townCode, villageCode)
-      this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.push(province, city, area, town, village)
-      let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.join("/");
-      let b = codeArr.join(",")
-      this.SubmitOldmanInfo({
-        id: this.data.nameArr[this.data.activeIndex]._id,
-        address: a,
-        addressId: b
-      })
-      this.setData({
-        [arr]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr1
-      })
-    } else {
-      let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
+  bindChange(e) {
+    wx.showLoading({
+      title: '加载中',
+      mask: true
+    })
+    console.log(e.detail.value)
+    if (e.detail.value[0] != this.data.multiIndex[0]) {
+      this.chooseAdress2(this.data.provinceArr[e.detail.value[0]].CIVILREGIONALISMID);
+    } else if (e.detail.value[1] != this.data.multiIndex[1]) {
+      this.chooseAdress3(this.data.cityArr[e.detail.value[1]].CIVILREGIONALISMID);
+    } else if (e.detail.value[2] != this.data.multiIndex[2]) {
+      this.chooseAdress4(this.data.areaArr[e.detail.value[2]].CIVILREGIONALISMID);
+    } else if (e.detail.value[3] != this.data.multiIndex[3]) {
+      this.chooseAdress5(this.data.townArr[e.detail.value[3]].CIVILREGIONALISMID);
+    } else if (e.detail.value[4] != this.data.multiIndex[4]) {
       this.setData({
-        [arr]: []
-      })
-      wx.showToast({
-        title: '现居地址不匹配,请重新选择',
-        icon: 'none',
-        duration: 2000,
+        village:this.data.villageArr[e.detail.value[4]].CIVILREGIONALISMNAME,
+        villageCode:this.data.villageArr[e.detail.value[4]].CIVILREGIONALISMCODE
       })
+      wx.hideLoading()
     }
+    this.setData({
+      multiIndex: e.detail.value
+    })
+  },
+  // bindChange1(e) {
+  //   if (e.detail.value[0] != this.data.multiIndex[0]) {
+  //     this.chooseAdress2(this.data.provinceArr[e.detail.value[0]].CIVILREGIONALISMID);
+  //   } else if (e.detail.value[1] != this.data.multiIndex[1]) {
+  //     this.chooseAdress3(this.data.cityArr[e.detail.value[1]].CIVILREGIONALISMID);
+  //   } else if (e.detail.value[2] != this.data.multiIndex[2]) {
+  //     this.chooseAdress4(this.data.areaArr[e.detail.value[2]].CIVILREGIONALISMID);
+  //   } else if (e.detail.value[3] != this.data.multiIndex[3]) {
+  //     this.chooseAdress5(this.data.townArr[e.detail.value[3]].CIVILREGIONALISMID);
+  //   }
+  //   this.setData({
+  //     multiIndex: e.detail.value,
+  //     province: this.data.provinceArr[e.detail.value[0]].CIVILREGIONALISMNAME,
+  //     city: this.data.cityArr[e.detail.value[1]].CIVILREGIONALISMNAME,
+  //     area: this.data.areaArr[e.detail.value[2]].CIVILREGIONALISMNAME,
+  //     town: this.data.townArr[e.detail.value[3]].CIVILREGIONALISMNAME,
+  //     village: this.data.villageArr[e.detail.value[4]].CIVILREGIONALISMNAME,
+  //     provinceCode: this.data.provinceArr[e.detail.value[0]].CIVILREGIONALISMCODE,
+  //     cityCode: this.data.cityArr[e.detail.value[1]].CIVILREGIONALISMCODE,
+  //     areaCode: this.data.areaArr[e.detail.value[2]].CIVILREGIONALISMCODE,
+  //     townCode: this.data.townArr[e.detail.value[3]].CIVILREGIONALISMCODE,
+  //     villageCode: this.data.villageArr[e.detail.value[4]].CIVILREGIONALISMCODE
+  //   })
+  // },
+  bindpickstart(e) {
+    console.log(e, '滚动开始了')
+    // wx.showLoading({
+    //   title: '加载中',
+    //   mask:true
+    // })
+  },
+  bindpickend(e) {
+    console.log(e, '滚动结束了')
+    // wx.hideLoading()
   },
   // 补充户籍地址
   tab1Change6(e) {
@@ -1227,6 +1586,59 @@ Page({
       addressExt: e.detail.value
     })
   },
+  pickSure() {
+    let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr';
+    let codeArr = [];
+    this.setData({
+      [arr]: []
+    })
+    console.log(this.data.province, this.data.city, this.data.area, this.data.town, this.data.village)
+    codeArr.push(this.data.provinceCode, this.data.cityCode, this.data.areaCode, this.data.townCode, this.data.villageCode)
+    this.data.oldInfo[this.data.activeIndex].chooseAdressArr.push(this.data.province, this.data.city, this.data.area, this.data.town, this.data.village)
+    let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr.join("/");
+    let b = codeArr.join(",")
+    this.SubmitOldmanInfo({
+      id: this.data.nameArr[this.data.activeIndex]._id,
+      nativePlace: a,
+      nativePlaceId: b
+    })
+    this.setData({
+      showAdressBox: false,
+      oldInfo: this.data.oldInfo
+    })
+  },
+  pickEsc() {
+    this.setData({
+      showAdressBox: false
+    })
+  },
+  pickSure1() {
+    console.log('111111111')
+    let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1';
+    let codeArr = [];
+    this.setData({
+      [arr]: []
+    })
+    codeArr.push(this.data.provinceCode, this.data.cityCode, this.data.areaCode, this.data.townCode, this.data.villageCode)
+    this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.push(this.data.province, this.data.city, this.data.area, this.data.town, this.data.village)
+    console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1, '00000000000')
+    let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.join("/");
+    let b = codeArr.join(",")
+    this.SubmitOldmanInfo({
+      id: this.data.nameArr[this.data.activeIndex]._id,
+      address: a,
+      addressId: b
+    })
+    this.setData({
+      showAdressBox1: false,
+      oldInfo: this.data.oldInfo
+    })
+  },
+  pickEsc1() {
+    this.setData({
+      showAdressBox1: false
+    })
+  },
   // 婚姻以及配偶情况
   tab1Change8: function (e) {
     let data = this.data.oldInfo[this.data.activeIndex].oldMarry.map(v => {
@@ -2072,28 +2484,16 @@ Page({
     this.setData({
       [child]: e.detail.value
     })
-    // let han = /^[\u4e00-\u9fa5]+$/;
     if (!e.detail.value) {
-      let flag = 'childNameNull[' + e.currentTarget.dataset.index + '] ';
       this.setData({
-        [flag]: true
+        ['childNameNull[' + e.currentTarget.dataset.index + ']']: true
       })
       return false;
+    } else {
+      this.setData({
+        ['childNameNull[' + e.currentTarget.dataset.index + ']']: false
+      })
     }
-    // if (!han.test(e.detail.value)) {
-    //   wx.showModal({
-    //     showCancel: false,
-    //     content: '您输入的内容不是汉字哦'
-    //   })
-    //   return false;
-    // };
-    // if (e.detail.value.length < 2) {
-    //   wx.showModal({
-    //     showCancel: false,
-    //     content: '赡养人姓名不可以少于两个字哦'
-    //   })
-    //   return false
-    // }
     this.SubmitOldmanInfo({
       id: this.data.nameArr[this.data.activeIndex]._id,
       childInfo: JSON.stringify(this.data.childInfo[this.data.activeIndex].Info)
@@ -2117,11 +2517,14 @@ Page({
       [child]: e.detail.value
     })
     if (!e.detail.value) {
-      let flag = 'childPhoneNull[' + e.currentTarget.dataset.index + '] ';
       this.setData({
-        [flag]: true
+        ['childPhoneNull[' + e.currentTarget.dataset.index + ']']: true
       })
       return false;
+    } else {
+      this.setData({
+        ['childPhoneNull[' + e.currentTarget.dataset.index + ']']: false
+      })
     }
     this.SubmitOldmanInfo({
       id: this.data.nameArr[this.data.activeIndex]._id,
@@ -2145,12 +2548,22 @@ Page({
     this.setData({
       [child]: e.detail.value
     })
+    // if (!e.detail.value) {
+    //   let flag = 'ischildOutReason[' + e.currentTarget.dataset.index + '] ';
+    //   this.setData({
+    //     [flag]: true
+    //   })
+    //   return false;
+    // }
     if (!e.detail.value) {
-      let flag = 'ischildOutReason[' + e.currentTarget.dataset.index + '] ';
       this.setData({
-        [flag]: true
+        ['ischildOutReason[' + e.currentTarget.dataset.index + ']']: true
       })
       return false;
+    } else {
+      this.setData({
+        ['ischildOutReason[' + e.currentTarget.dataset.index + ']']: false
+      })
     }
     this.SubmitOldmanInfo({
       id: this.data.nameArr[this.data.activeIndex]._id,
@@ -2198,11 +2611,14 @@ Page({
       [child]: e.detail.value
     })
     if (!e.detail.value) {
-      let flag = 'ischildMarryName[' + e.currentTarget.dataset.index + '] ';
       this.setData({
-        [flag]: true
+        ['ischildMarryName[' + e.currentTarget.dataset.index + ']']: true
       })
       return false;
+    } else {
+      this.setData({
+        ['ischildMarryName[' + e.currentTarget.dataset.index + ']']: false
+      })
     }
     this.SubmitOldmanInfo({
       id: this.data.nameArr[this.data.activeIndex]._id,
@@ -2216,11 +2632,14 @@ Page({
       [child]: e.detail.value
     })
     if (!e.detail.value) {
-      let flag = 'ischildMarryPhone[' + e.currentTarget.dataset.index + '] ';
       this.setData({
-        [flag]: true
+        ['ischildMarryPhone[' + e.currentTarget.dataset.index + ']']: true
       })
       return false;
+    } else {
+      this.setData({
+        ['ischildMarryPhone[' + e.currentTarget.dataset.index + ']']: false
+      })
     }
     this.SubmitOldmanInfo({
       id: this.data.nameArr[this.data.activeIndex]._id,
@@ -2264,21 +2683,6 @@ Page({
   },
   // 其他赡养人姓名
   tab3Change2: function (e) {
-    // let han = /^[\u4e00-\u9fa5]+$/;
-    // if (!han.test(e.detail.value)) {
-    //   wx.showModal({
-    //     showCancel: false,
-    //     content: '您输入的内容不是汉字哦'
-    //   })
-    //   return false;
-    // };
-    // if (e.detail.value.length < 2) {
-    //   wx.showModal({
-    //     showCancel: false,
-    //     content: '赡养人姓名不可以少于两个字哦'
-    //   })
-    //   return false
-    // }
     let Info = 'otherInfo[' + this.data.activeIndex + '].Info.name'
     this.setData({
       [Info]: e.detail.value,
@@ -3731,8 +4135,6 @@ Page({
       wx.redirectTo({
         url: '/pages/login/login',
       })
-    } else {
-      this.chooseAdress();
     }
   },
   // 表单校验老人身份证号

+ 65 - 7
pages/collectInfo/collectInfo.wxml

@@ -90,12 +90,41 @@
 				<view class="block"><text class="red">*</text>联系电话<input bindblur="tab1Change5" value="{{oldInfo[activeIndex].phone}}" /></view>
 				<view wx:if="{{oldPhoneNull}}" class="required">老人联系电话不能为空哦!</view>
 				<view class="block"><text class="red">*</text>户籍地址
-					<picker style="z-index:1" mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}" range-key="{{'CIVILREGIONALISMNAME'}}">
+					<view class="picker1">
+						<view wx:if="{{oldInfo[activeIndex].chooseAdressArr.length==0}}" bindtap="showAdressShow">点我选择现居地址</view>
+						<textarea style="width:450rpx;height:auto" disabled="true" wx:else  bindtap="showAdressShow">{{oldInfo[activeIndex].chooseAdressArr}}</textarea>
+					</view>
+					<view class="picker_container" wx:if='{{showAdressBox}}'>
+						<view style="height:50px;width:300px">
+							<view class="pick_sure" bindtap="pickSure">确定</view>
+							<view class="pick_esc" bindtap="pickEsc">取消</view>
+						</view>
+						<view class="page-body">
+							<picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{value}}" bindchange="bindChange" bindpickstart="bindpickstart" bindpickend="bindpickend">
+								<picker-view-column>
+									<view wx:for="{{provinceArr}}" wx:key="{{provinceArr}}" style="line-height: 50px; text-align: center;">{{item.CIVILREGIONALISMNAME}}</view>
+								</picker-view-column>
+								<picker-view-column>
+									<view wx:for="{{cityArr}}" wx:key="{{cityArr}}" style="line-height: 50px; text-align: center;">{{item.CIVILREGIONALISMNAME}}</view>
+								</picker-view-column>
+								<picker-view-column>
+									<view wx:for="{{areaArr}}" wx:key="{{areaArr}}" style="line-height: 50px; text-align: center;">{{item.CIVILREGIONALISMNAME}}</view>
+								</picker-view-column>
+								<picker-view-column>
+									<view wx:for="{{townArr}}" wx:key="{{townArr}}" style="line-height: 50px; text-align: center;">{{item.CIVILREGIONALISMNAME}}</view>
+								</picker-view-column>
+								<picker-view-column>
+									<view wx:for="{{villageArr}}" wx:key="{{villageArr}}" style="line-height: 50px; text-align: center;">{{item.CIVILREGIONALISMNAME}}</view>
+								</picker-view-column>
+							</picker-view>
+						</view>
+					</view>
+					<!-- <picker style="z-index:1" mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}" range-key="{{'CIVILREGIONALISMNAME'}}">
 						<view class="picker1">
 							<view wx:if="{{oldInfo[activeIndex].chooseAdressArr.length==0}}">点我选择户籍地址</view>
 							<textarea style="width:450rpx;height:auto" disabled="true" wx:else>{{oldInfo[activeIndex].chooseAdressArr}}</textarea>
 						</view>
-					</picker>
+					</picker> -->
 					<input bindblur="tab1Change6" placeholder="请填写补充户籍地址" value="{{oldInfo[activeIndex].nativePlaceExt}}" />
 				</view>
 				 <checkbox-group bindchange="tab1change6_1">
@@ -104,12 +133,41 @@
 					</label>
 				</checkbox-group>
 				<view class="block"><text class="red">*</text>现居地址
-					<picker disabled="{{nowAdress}}" mode="multiSelector" bindchange="bindMultiPickerChange1" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex1}}" range="{{multiArray}}" range-key="{{'CIVILREGIONALISMNAME'}}">
+					<!-- <picker disabled="{{nowAdress}}" mode="multiSelector" bindchange="bindMultiPickerChange1" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex1}}" range="{{multiArray}}" range-key="{{'CIVILREGIONALISMNAME'}}">
 						<view class="picker1">
 							<view wx:if="{{oldInfo[activeIndex].chooseAdressArr1.length==0}}">点我选择现居地址</view>
 							<textarea style="width:450rpx;height:auto" disabled="true" wx:else>{{oldInfo[activeIndex].chooseAdressArr1}}</textarea>
 						</view>
-					</picker>
+					</picker> -->
+					<view class="picker1">
+						<view wx:if="{{oldInfo[activeIndex].chooseAdressArr1.length==0}}" bindtap="showAdressShow1">点我选择现居地址</view>
+						<textarea style="width:450rpx;height:auto" disabled="true" wx:else  bindtap="showAdressShow1">{{oldInfo[activeIndex].chooseAdressArr1}}</textarea>
+					</view>
+					<view class="picker_container" wx:if='{{showAdressBox1}}'>
+						<view style="height:50px">
+							<view class="pick_sure" bindtap="pickSure1">确定</view>
+							<view class="pick_esc" bindtap="pickEsc1">取消</view>
+						</view>
+						<view class="page-body">
+							<picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{value}}" bindchange="bindChange" bindpickstart="bindpickstart1" bindpickend="bindpickend1">
+								<picker-view-column>
+									<view wx:for="{{provinceArr}}" wx:key="{{provinceArr}}" style="line-height: 50px; text-align: center;">{{item.CIVILREGIONALISMNAME}}</view>
+								</picker-view-column>
+								<picker-view-column>
+									<view wx:for="{{cityArr}}" wx:key="{{cityArr}}" style="line-height: 50px; text-align: center;">{{item.CIVILREGIONALISMNAME}}</view>
+								</picker-view-column>
+								<picker-view-column>
+									<view wx:for="{{areaArr}}" wx:key="{{areaArr}}" style="line-height: 50px; text-align: center;">{{item.CIVILREGIONALISMNAME}}</view>
+								</picker-view-column>
+								<picker-view-column>
+									<view wx:for="{{townArr}}" wx:key="{{townArr}}" style="line-height: 50px; text-align: center;">{{item.CIVILREGIONALISMNAME}}</view>
+								</picker-view-column>
+								<picker-view-column>
+									<view wx:for="{{villageArr}}" wx:key="{{villageArr}}" style="line-height: 50px; text-align: center;">{{item.CIVILREGIONALISMNAME}}</view>
+								</picker-view-column>
+							</picker-view>
+						</view>
+					</view>
 					<input disabled="{{nowAdress}}" bindblur="tab1Change7" placeholder="请填写补充现居地址" value="{{oldInfo[activeIndex].addressExt}}" />
 				</view>
 				<view class="block">
@@ -247,7 +305,7 @@
 							</label>
 						</radio-group>
 					</view>
-					<view class="block"><text class="red">*</text>主要照料人电话<input value="{{oldInfo[activeIndex].mainLookPhone}}" bindblur="tab1Change23"/></view>
+					<view class="block"><text class="red">*</text>主要照料人电话<input value="{{oldInfo[activeIndex].mainLookPhone}}" bindblur="tab1Change23" /></view>
 					<view class="required" wx:if="{{islookPhoneNull}}">主要照料人电话不能为空哦!</view>
 				</view>
 				<view class="block">
@@ -361,7 +419,7 @@
 							</label>
 						</radio-group>
 					</view>
-					<view class="block"><text class="red">*</text>其他赡养人电话<input bindblur="tab3Change4" value="{{otherInfo[activeIndex].Info.phone}}"/></view>
+					<view class="block"><text class="red">*</text>其他赡养人电话<input bindblur="tab3Change4" value="{{otherInfo[activeIndex].Info.phone}}" /></view>
 					<view wx:if="{{isothersyrPhone}}" class="required">其他赡养人电话不能为空哦!</view>
 					<view class="name"><text class="red">*</text>与被赡养人关系</view>
 					<picker bindchange="tab3Change5" value="{{otherInfo[activeIndex].Info.relation}}" range="{{othersyrRelation}}">
@@ -369,7 +427,7 @@
 							{{otherInfo[activeIndex].Info.relation}}
 						</view>
 					</picker>
-					<view class="block" wx:if="{{otherInfo[activeIndex].Info.relation  == '其他'}}"><text class="red">*</text>与被赡养人其他关系<input bindblur="tab3Change6" value="{{otherInfo[activeIndex].Info.relationExt}}"/></view>
+					<view class="block" wx:if="{{otherInfo[activeIndex].Info.relation  == '其他'}}"><text class="red">*</text>与被赡养人其他关系<input bindblur="tab3Change6" value="{{otherInfo[activeIndex].Info.relationExt}}" /></view>
 					<view wx:if="{{isothersyRelation}}" class="required">与被赡养人其他关系不能为空哦!</view>
 					<view class="name"><text class="red">*</text>是否外出</view>
 					<picker bindchange="tab3Change7" value="{{otherInfo[activeIndex].Info.isHasGoOut}}" range="{{othersyrIsout}}">

+ 33 - 0
pages/collectInfo/collectInfo.wxss

@@ -439,4 +439,37 @@ radio .wx-radio-input.wx-radio-input-checked::before {
   z-index: 99999;
   position: fixed;
   bottom: 0;
+}
+.picker_container{
+  width: 750rpx;
+  height: 100vh;
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  background-color: rgba(0, 0, 0, 0.5);
+  z-index: 999;
+}
+.page-body{
+  background-color: #fff;
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 750rpx;
+  height: 300px;
+}
+.pick_sure{
+  color: #2087f7;
+  position: fixed;
+  z-index: 999;
+  bottom: 260px;
+  right: 20px;
+  font-size: 28rpx;
+}
+.pick_esc{
+  color: #2087f7;
+  position: fixed;
+  z-index: 999;
+  bottom: 260px;
+  left: 20px;
+  font-size: 28rpx;
 }

+ 5 - 23
pages/idCard/idCard.js

@@ -1,12 +1,11 @@
 const app = require('../../utils/util.js');
-var util = require('../../utils/md5.js')
+// var util = require('../../utils/md5.js')
 Page({
   data: {
     imgPath: '',
     isTrue: true,
   },
   goShenFen() {
- 
     if (!this.data.isTrue) {
       wx.request({
         url: app.globalData.publicUrl + '/applet/suppleUserInfo',
@@ -18,12 +17,12 @@ Page({
           headPicPath: this.data.imgPath
         },
         success: (res) => {
-          console.log(res, "000");
+          console.log(res, "111");
+          wx.redirectTo({
+            url: '/pages/idCardDetail/idCardDetail',
+          })
         }
       })
-      wx.redirectTo({
-        url: '/pages/idCardDetail/idCardDetail',
-      })
     } else {
       wx.showToast({
         title: "请上传照片",
@@ -31,23 +30,6 @@ Page({
         duration: 2000,
       })
     }
-  
-    // wx.request({
-    //   url: app.globalData.publicUrl + '/applet/suppleUserInfo',
-    //   method: "POST",
-    //   header: {
-    //     appletsId: wx.getStorageSync('openId')
-    //   },
-    //   data: {
-    //     headPicPath: this.data.imgPath
-    //   },
-    //   success: (res) => {
-    //     console.log(res, "000");
-    //   }
-    // })
-    // wx.redirectTo({
-    //   url: '/pages/idCardDetail/idCardDetail',
-    // })
   },
   goPhoto() {
     var that = this;

+ 1 - 3
pages/idCardDetail/idCardDetail.js

@@ -1,5 +1,5 @@
 const app = require('../../utils/util.js');
-var util = require('../../utils/md5.js')
+// var util = require('../../utils/md5.js')
 var formateTime = require('../../utils/formateTime.js')
 Page({
   data: {
@@ -25,7 +25,6 @@ Page({
       complete: (e) => {
         wx.hideLoading();
       }
-
     })
     var that = this;
     var time = time;
@@ -33,7 +32,6 @@ Page({
       that.setData({
         time: formateTime.setNowTimes(new Date())
       });
-
     }, 1000);
     
   },

+ 4 - 5
pages/idCardDetail/idCardDetail.wxml

@@ -2,8 +2,7 @@
 <view class="home">
 	<image class="bg-photo" src="/images/shenfenka.jpg"></image>
 	<!-- style="width:750rpx;height:1334rpx" -->
-	<image class="photo" src="{{urls.url(info.headPicPath)}}"></image>
-
+	<image class="photo" src="{{urls.url(info.headPicPath)}}" wx:if='{{info.headPicPath}}'></image>
 	<view class="userName">
 		<view class="xunfangtitle">采集巡访员</view>
 		<view>{{info.userName}}</view>
@@ -13,13 +12,13 @@
 			<view class="title1">身份证号:</view>
 			<view class="title2">{{info.idCardNumber}}</view>
 		</view>
-		<view style="display:flex;margin-top:15rpx">
+		<!-- <view style="display:flex;margin-top:15rpx">
 			<view class="title1">认证时间:</view>
 			<view class="title2">2020年09月15日</view>
-		</view>
+		</view> -->
 		<view style="display: flex;margin-top:15rpx">
 			<view class="title1">认证地点:</view>
-			<view class="title2">{{info.dept1.name}}{{info.dept2.name}}{{info.dept3.name}}{{info.dept4.name}}{{info.dept15.name}}</view>
+			<view class="title2">{{info.dept1.name}}{{info.dept2.name}}{{info.dept3.name}}{{info.dept4.name}}{{info.dept5.name}}</view>
 		</view>
 		<view style="display: flex;margin-top:15rpx">
 			<view class="title1">联系方式:</view>

+ 16 - 14
pages/index/index.js

@@ -118,18 +118,20 @@ Page({
         success: (res) => {
           if (res.data.code == 0) {
             console.log(res);
-            let result = res.data.data[0].title
-            this.data.msgList.push({
-              // url: '',
-              title: result
-            });
-            this.data.msgList.push({
-              // url: '',
-              title: result
-            });
-            this.setData({
-              msgList: this.data.msgList
-            })
+            if(res.data.data.length!=0){
+              let result = res.data.data[0].title
+              this.data.msgList.push({
+                // url: '',
+                title: result
+              });
+              this.data.msgList.push({
+                // url: '',
+                title: result
+              });
+              this.setData({
+                msgList: this.data.msgList
+              })
+            }
           }
         }
       })
@@ -146,11 +148,11 @@ Page({
             if (res.data.data.length == 0) {
               this.data.msgList.push({
                 // url: '',
-                title: '暂无数据!!!'
+                title: '暂无通知'
               });
               this.data.msgList.push({
                 // url: '',
-                title: '暂无数据!!!'
+                title: '暂无通知'
               });
               this.setData({
                 msgList: this.data.msgList

+ 8 - 2
pages/personInfo/personInfo.js

@@ -25,7 +25,7 @@ Page({
       url: '/pages/updatepassword/updatepassword',
     })
   },
-  userBook(){
+  userBook() {
     wx.navigateTo({
       url: '/pages/userBook/userBook',
     })
@@ -47,12 +47,18 @@ Page({
               appletsId: wx.getStorageSync('openId')
             },
             success: (res) => {
+              console.log(res)
+              wx.hideLoading()
               if (res.data.code == 0) {
-                wx.hideLoading()
                 wx.clearStorageSync();
                 wx.switchTab({
                   url: '/pages/index/index',
                 })
+              } else {
+                wx.showModal({
+                  showCancel: false,
+                  content: '退出失败请联系管理员'
+                })
               }
             },
             fail: () => {

+ 4 - 4
pages/visitandinfo/visitandinfo.wxss

@@ -19,13 +19,11 @@
   text-align: center;
   border-top: 1px solid #d3d7e0;
 }
-
 .tabs-item.selected {
   color: #2892ff;
   background-color: white;
   border: none;
 }
-
 .tabs-item {
   width: 50%;
   color: #666;
@@ -33,7 +31,6 @@
   font-size: 27rpx;
   border: 1px solid #d3d7e0;
 }
-
 .table {
   background-color: #fff;
   border: 1px solid #dadada;
@@ -121,8 +118,8 @@
   font-weight: 800;
   margin-left: 5rpx;
   margin-right: 5rpx;
+  font-size:32rpx;
 }
-
 checkbox .wx-checkbox-input {
   width: 30rpx;
   height: 30rpx;
@@ -217,4 +214,7 @@ checkbox .wx-checkbox-input {
 
 .box-end {
   margin-left: 200rpx;
+}
+.ordert-detail{
+  margin-top:20rpx;
 }

+ 1 - 1
utils/photoUrl.wxs

@@ -1,5 +1,5 @@
 var url = function (val) {
-  return  'http://info.windd.cn:8080/test/' + val
+  return  'https://info.windd.cn/collection' + val
 }
 module.exports = {
   url: url

+ 2 - 1
utils/util.js

@@ -1,5 +1,6 @@
 const globalData = {
-  publicUrl: 'http://info.windd.cn:8080/test',
+  // publicUrl: 'http://info.windd.cn:8080/test',
+  publicUrl: 'https://info.windd.cn/collection',
   //publicUrl: 'http://10.16.4.12:7001',
   //publicUrl: 'http://10.16.4.8:7001',
   // publicUrl:'http://10.16.4.7:7001'//立秋