roose há 4 anos atrás
pai
commit
22508f07f6
1 ficheiros alterados com 83 adições e 5 exclusões
  1. 83 5
      pages/collectInfo/collectInfo.js

+ 83 - 5
pages/collectInfo/collectInfo.js

@@ -977,6 +977,7 @@ Page({
                   filePath: res.tempFilePaths[0],
                   encoding: 'base64',
                   success: res1 => {
+                    console.log("返回临时文件路径");
                     //返回临时文件路径
                     let img = 'data:image/png;base64,' + res1.data
                     wx.request({
@@ -991,13 +992,13 @@ Page({
                       },
                       dataType: 'json',
                       success: (e) => {
+                        console.log(e,"看看那ocr返回了么数据呢");
+                        
                         // 扫描后赋值 
                         _this.setData({
                           showBj: false,
                           fid: _this.data.familyFid
                         })
-                        const app = getApp()
-                        app.globalData.id = '-2'
                         if (e.data.idcard_number_type == 1) {
                           console.log(e.data.words_result, '我是ocr识别出来的内容')
                           console.log(_this.data.oldInfo[_this.data.activeIndex].name, "啊实打实大师多撒大所多撒");
@@ -1096,11 +1097,9 @@ Page({
     } else {
       console.log(this.data.nameArr)
       let name = 'nameArr[' + this.data.activeIndex + '].name'
-      let Info = 'oldInfo[' + this.data.activeIndex + '].name'
       this.setData({
         oldName: false,
-        [name]: e.detail.value,
-        [Info]: e.detail.value
+        [name]: e.detail.value
       })
       console.log(this.data.nameArr)
     }
@@ -2108,6 +2107,8 @@ Page({
   goPhoto() {
     let that = this;
     isTwoOnshow = true;
+    const app = getApp()
+    wx.setStorageSync('isTwoOnshow', true)
     wx.showLoading({
       title: '加载中',
     })
@@ -2144,6 +2145,9 @@ Page({
               id: that.data.nameArr[that.data.activeIndex]._id,
               photo: datas.data,
             })
+
+
+
           }
         })
       },
@@ -3681,10 +3685,74 @@ Page({
           console.log(that.data.childInfo, "孩子的返现数组")
           console.log(that.data.regularsInfos, "q巡访的返现数组")
           console.log(that.data.regularsInfo, "巡访传值的返回")
+          // let ghi = res.data.data.map(item => {
+          //   console.log(item.otherInfo, ";;;;;;;;;;;;;;;;;;;;;;;;;;");
+          //   let sex = [{
+          //       name: '男',
+          //       checked: false
+          //     },
+          //     {
+          //       name: '女',
+          //       checked: false
+          //     }
+          //   ]
+          //   let otherInfo = '';
+          //   let name = '';
+          //   let phone = ''
+          //   let othersyrRelationValue = ''
+          //   let relationExt = ''
+          //   let visit = ''
+          //   if (item.otherInfo) {
+          //     let partol = this.removeExcess(item.otherInfo);
+          //     otherInfo = '是'
+          //     if (partol.name) {
+          //       name = partol.name
+          //     }
+          //     if (partol.sex) {
+          //       sex.forEach(items => {
+          //         if (items.name == partol.sex) {
+          //           items.checked = true;
+          //         }
+          //       })
+          //     }
+          //     if (partol.phone) {
+          //       phone = partol.phone
+          //     }
+          //     if (partol.relation) {
+          //       othersyrRelationValue = partol.relation
+          //     }
+          //     if (partol.relationExt) {
+          //       relationExt = partol.relationExt
+          //     }
+          //     if (partol.visit) {
+          //       visit = partol.visit;
+          //     }
+
+          //   } else {
+          //     otherInfo = ''
+          //   }
+          //   return {
+          //     ...item,
+          //     otherInfo: otherInfo, //赡养人存在
+          //     name: name,
+          //     othersyrSexArr: sex,
+          //     phone: phone,
+          //     othersyrRelationValue: othersyrRelationValue,
+          //     relationExt: relationExt,
+          //     visit: visit,
+          //   }
+          // })
+          // that.setData({
+          //   oldInfo: abc,
+          //   otherInfo: def,
+          //   childInfo: ghi
+          // })
         }
       })
     } else {
+
     }
+
   },
   chooseAdress() {
     console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr)
@@ -3870,6 +3938,16 @@ Page({
         }
         console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr, '我是添加的数组')
         wx.hideLoading()
+        // this.setData({
+        //   provinceArr: res.data.data,
+        //   isAdress: true,
+        //   [Info]: this.data.oldInfo
+        // })
+        // if (res.data.data.length == 0) {
+        //   this.setData({
+        //     pleaseChoose: false
+        //   })
+        // }
       }
     })
   },