roose hace 4 años
padre
commit
a977671b83
Se han modificado 2 ficheros con 31 adiciones y 50 borrados
  1. 25 44
      pages/collectInfo/collectInfo.js
  2. 6 6
      pages/collectInfo/collectInfo.wxml

+ 25 - 44
pages/collectInfo/collectInfo.js

@@ -1064,7 +1064,6 @@ Page({
                 _this.setData({
                   showBj: false,
                 })
-                isTwoOnshow = true;
               }
             })
           } else {
@@ -1210,11 +1209,16 @@ Page({
       this.setData({
         oldPhone1: false
       })
-      this.SubmitOldmanInfo({
-        id: this.data.nameArr[this.data.activeIndex]._id,
-        phone: e.detail.value
-      })
     }
+    let phone = 'oldInfo[' + this.data.activeIndex + '].phone'
+    this.setData({
+      [phone]:e.detail.value
+    })
+    this.SubmitOldmanInfo({
+      id: this.data.nameArr[this.data.activeIndex]._id,
+      phone: e.detail.value
+    })
+    console.log(this.data.oldInfo)
   },
   // 补充户籍地址
   tab1Change6(e) {
@@ -1966,8 +1970,7 @@ Page({
       })
     }
   },
-  // 其他收入来源sourceOfIncomeExt
-  tab1Change14_1: function (e) {
+  tab1change25: function (e) {
     if (e.detail.value == null || e.detail.value == '') {
       this.setData({
         isloveNull: true
@@ -1982,38 +1985,7 @@ Page({
       })
     }
   },
-  // 其他关爱服务需求
-  tab1change25: function (e) {
-    console.log(e.detail.value)
-    const items = this.data.oldInfo[this.data.activeIndex].oldType
-    const values = e.detail.value
-    for (let i = 0, lenI = items.length; i < lenI; ++i) {
-      items[i].checked = false
-      for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
-        if (items[i].name === values[j]) {
-          items[i].checked = true
-          break
-        }
-      }
-    }
-    let oldType = 'oldInfo[' + this.data.activeIndex + '].oldType'
-    this.setData({
-      [oldType]: items
-    })
-    if (e.detail.value == '' || e.detail.value == null) {
-      this.setData({
-        isloveQtNull: true
-      })
-    } else {
-      this.setData({
-        isloveQtNull: false,
-      })
-      this.SubmitOldmanInfo({
-        id: this.data.nameArr[this.data.activeIndex]._id,
-        demandExt: e.detail.value
-      })
-    }
-  },
+
   // 老年人类别
   tab1Change26: function (e) {
     console.log(e.detail.value)
@@ -2107,7 +2079,8 @@ Page({
   },
   goPhoto() {
     let that = this;
-
+    isTwoOnshow = true;
+    wx.setStorageSync('isTwoOnshow', true)
     wx.showLoading({
       title: '加载中',
     })
@@ -2116,6 +2089,8 @@ Page({
       sizeType: ['compressed'],
       sourceType: ['camera'],
       success: function (res) {
+        console.log(isTwoOnshow, "我是照片");
+        console.log(wx.getStorageSync('isTwoOnshow'), "我是照片");
         let tempFilePaths = res.tempFilePaths
         wx.uploadFile({
           url: util.globalData.publicUrl + '/sys/user/upload',
@@ -2128,6 +2103,8 @@ Page({
             appletsId: wx.getStorageSync('openId'),
           },
           success: function (res) {
+            console.log(isTwoOnshow, "我是上唇");
+            console.log(wx.getStorageSync('isTwoOnshow'), "我是上唇");
             console.log(JSON.parse(res.data), "45454545");
             let datas = JSON.parse(res.data)
             let imgPath = 'oldInfo[' + that.data.activeIndex + '].imgPath'
@@ -2145,7 +2122,6 @@ Page({
         })
       },
       complete: (e) => {
-        isTwoOnshow = true;
         wx.hideLoading();
       }
     })
@@ -3931,13 +3907,18 @@ Page({
     })
   },
   onShow() {
-    console.log("11111111111111111111111111111111111");
     if (isTwoOnshow) {
-      isTwoOnshow = false;
+      // isTwoOnshow = false;
       return;
     };
+    // if (wx.getStorageSync('isTwoOnshow')) {
+    //   console.log("啊啊啊","打印了锕");
+      
+    //   wx.setStorageSync('isTwoOnshow', false)
+    //   return;
+    // }
     if (isonShow) {
-      isonShow = false;
+      // isonShow = false;
       return;
     };
 

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 6 - 6
pages/collectInfo/collectInfo.wxml