roose 4 년 전
부모
커밋
748cb6b584
2개의 변경된 파일18개의 추가작업 그리고 91개의 파일을 삭제
  1. 8 81
      pages/collectInfo/collectInfo.js
  2. 10 10
      pages/visitandinfo/visitandinfo.js

+ 8 - 81
pages/collectInfo/collectInfo.js

@@ -971,6 +971,8 @@ Page({
               sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
               success: function (res) {
                 // 拿文件转换base64
+                const app = getApp()
+                app.globalData.id = '-1'
                 wx.getFileSystemManager().readFile({
                   filePath: res.tempFilePaths[0],
                   encoding: 'base64',
@@ -994,6 +996,8 @@ Page({
                           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, "啊实打实大师多撒大所多撒");
@@ -1092,9 +1096,11 @@ 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
+        [name]: e.detail.value,
+        [Info]: e.detail.value
       })
       console.log(this.data.nameArr)
     }
@@ -2102,8 +2108,6 @@ Page({
   goPhoto() {
     let that = this;
     isTwoOnshow = true;
-    const app = getApp()
-    wx.setStorageSync('isTwoOnshow', true)
     wx.showLoading({
       title: '加载中',
     })
@@ -2140,9 +2144,6 @@ Page({
               id: that.data.nameArr[that.data.activeIndex]._id,
               photo: datas.data,
             })
-
-
-
           }
         })
       },
@@ -3680,74 +3681,10 @@ 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)
@@ -3933,16 +3870,6 @@ 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
-        //   })
-        // }
       }
     })
   },
@@ -4016,7 +3943,7 @@ Page({
       return;
     };
     if (isonShow) {
-      // isonShow = false;
+      isonShow = false;
       return;
     };
 

+ 10 - 10
pages/visitandinfo/visitandinfo.js

@@ -77,17 +77,17 @@ Page({
       const app = getApp()
       app.globalData.id = fid
       app.globalData.name = name
-      wx.reLaunch({
-        url: '/pages/collectInfo/collectInfo?idss=' + fid +'&namess=' +name
-      })
-      // wx.switchTab({
-      //   url: `/pages/collectInfo/collectInfo`,
-      //   success: function (e) {
-      //     var page = getCurrentPages().pop();
-      //     if (page == undefined || page == null) return;
-      //     page.onLoad();
-      //   }
+      // wx.reLaunch({
+      //   url: '/pages/collectInfo/collectInfo?idss=' + fid +'&namess=' +name
       // })
+      wx.switchTab({
+        url: `/pages/collectInfo/collectInfo`,
+        success: function (e) {
+          var page = getCurrentPages().pop();
+          if (page == undefined || page == null) return;
+          page.onLoad();
+        }
+      })
     } else {
       wx.showToast({
         title: "审核中禁止修改",