ssfg hace 4 años
padre
commit
b1e0fb4a26

+ 31 - 17
pages/collectInfo/collectInfo.js

@@ -757,7 +757,7 @@ Page({
                             if (e.data.words_result['公民身份号码'].words.substring(10, 12) < month || e.data.words_result['公民身份号码'].words.substring(10, 12) == month && e.data.words_result['公民身份号码'].words.substring(12, 14) <= day) {
                               age++;
                             }
-                            if (age >=60) {
+                            if (age >= 60) {
                               let idNumber = 'oldInfo[' + _this.data.activeIndex + '].idNumber'
                               let name = 'oldInfo[' + _this.data.activeIndex + '].name'
                               let nation = 'oldInfo[' + _this.data.activeIndex + '].nation'
@@ -950,7 +950,7 @@ Page({
           provinceArr: newdata,
         })
         // if(!this.data.adressChangeStatus){
-          this.chooseAdress2();
+        this.chooseAdress2();
         // }
       },
     })
@@ -965,9 +965,9 @@ Page({
       mid = fid
     } else {
       console.log(this.data.provinceArr[this.data.multiIndex[1]])
-      if(!this.data.provinceArr[this.data.multiIndex[1]]){
+      if (!this.data.provinceArr[this.data.multiIndex[1]]) {
         wx.hideLoading()
-      }else{
+      } else {
         mid = this.data.provinceArr[this.data.multiIndex[1]].CIVILREGIONALISMID
       }
     }
@@ -989,7 +989,7 @@ Page({
           cityArr: newdata
         })
         // if(!this.data.adressChangeStatus){
-          this.chooseAdress3();
+        this.chooseAdress3();
         // }
       }
     })
@@ -1004,9 +1004,9 @@ Page({
     if (fid) {
       mid = fid
     } else {
-      if(!this.data.cityArr[this.data.multiIndex[2]]){
+      if (!this.data.cityArr[this.data.multiIndex[2]]) {
         wx.hideLoading()
-      }else{
+      } else {
         mid = this.data.cityArr[this.data.multiIndex[2]].CIVILREGIONALISMID
       }
     }
@@ -1046,7 +1046,7 @@ Page({
           })
         } else {
           // if(!this.data.adressChangeStatus){
-            this.chooseAdress4();
+          this.chooseAdress4();
           // }
         }
       }
@@ -1063,9 +1063,9 @@ Page({
       mid = fid
     } else {
       console.log(this.data.areaArr[this.data.multiIndex[3]])
-      if(!this.data.areaArr[this.data.multiIndex[3]]){
+      if (!this.data.areaArr[this.data.multiIndex[3]]) {
         wx.hideLoading();
-      }else{
+      } else {
         mid = this.data.areaArr[this.data.multiIndex[3]].CIVILREGIONALISMID
       }
     }
@@ -1104,7 +1104,7 @@ Page({
           })
         } else {
           // if(!this.data.adressChangeStatus){
-            this.chooseAdress5();
+          this.chooseAdress5();
           // }
         }
       }
@@ -1120,9 +1120,9 @@ Page({
       mid = fid
     } else {
       console.log(this.data.townArr[this.data.multiIndex[4]])
-      if(!this.data.townArr[this.data.multiIndex[4]]){
+      if (!this.data.townArr[this.data.multiIndex[4]]) {
         wx.hideLoading()
-      }else{
+      } else {
         mid = this.data.townArr[this.data.multiIndex[4]].CIVILREGIONALISMID
       }
     }
@@ -1286,9 +1286,9 @@ Page({
       title: '加载中',
       mask: true
     })
-    setTimeout(function(){
+    setTimeout(function () {
       wx.hideLoading()
-    },5000)
+    }, 5000)
   },
   bindpickend(e) {
     // console.log(e, '滚动结束了')
@@ -3807,7 +3807,7 @@ Page({
       wx.showModal({
         showCancel: false,
         content: '当前您未登录,请登录',
-        success (res) {
+        success(res) {
           if (res.confirm) {
             wx.redirectTo({
               url: '/pages/login/login',
@@ -3883,7 +3883,21 @@ Page({
           }
         });
       },
-      fail: function () {}
+      fail: function () {
+        console.log('获取失败了打开设置')
+        // wx.openSetting({
+        //   success: function (osrs) {
+        //     wx.getUserInfo({
+        //       success: function (getuserinfo) {
+        //         console.log(getuserinfo)
+        //       },
+        //       fail: function (fres) {
+        //         console.log(fres)
+        //       }
+        //     })
+        //   }
+        // })
+      }
     });
   },
   onLoad() {

+ 11 - 10
pages/index/index.js

@@ -58,7 +58,7 @@ Page({
         url: '/pages/login/login',
       })
     } else {
-      wx.navigateTo({
+      wx.switchTab({
         url: '/pages/collectInfo/collectInfo',
       })
     }
@@ -83,15 +83,16 @@ Page({
     //     url: '/pages/visitandinfo/visitandinfo',
     //   })
     // }
-    if (wx.getStorageSync('user') == '') {
-      wx.redirectTo({
-        url: '/pages/login/login',
-      })
-    } else {
-      wx.navigateTo({
-        url: '/pages/visitandinfo/visitandinfo',
-      })
-    }
+    // if (wx.getStorageSync('user') == '') {
+    //   wx.redirectTo({
+    //     url: '/pages/login/login',
+    //   })
+    // } else {
+    //   wx.switchTab({
+    //     url: '/pages/visitandinfo/visitandinfo',
+    //   })
+    // }
+    
   },
   goTongzhi() {
     if (wx.getStorageSync('user') == '') {

+ 4 - 2
pages/index/index.wxml

@@ -55,8 +55,10 @@
 		<view class="top4-box" bindtap="goXunfang">
 			<image src="/images/indexicon5.png" style="width: 120rpx;height: 120rpx;margin-top: 10rpx;"></image>
 			<view class="top4-box1">
-				<view class="top4-title">巡访信息</view>
-				<view class="top4-smalltitle">巡访信息</view>
+				<!-- <view class="top4-title">巡访信息</view>
+				<view class="top4-smalltitle">巡访信息</view> -->
+				<view class="top4-title">巡访查询</view>
+				<view class="top4-smalltitle">巡访查询</view>
 			</view>
 		</view>
 	</view>

+ 0 - 1
pages/love/love.js

@@ -228,7 +228,6 @@ Page({
     let split = this.data.info.photoAndLocation.split("/");
     let lon = parseFloat(split[0])
     let lat = parseFloat(split[1])
-
     // 实例化API核心类
     var qqmapsdk = new QQMapWX({
       key: 'B5DBZ-NGIHP-SQMD4-LHMG3-NJ72Z-7KFOV' //申请的开发者秘钥key

+ 25 - 13
pages/updatepassword/updatepassword.js

@@ -54,13 +54,12 @@ Page({
       })
     }
   },
-
   formSubmit(e) {
     console.log(e.detail, "daying");
     if (e.detail.value.oldPwd) {
       if (e.detail.value.pwd) {
         if (e.detail.value.newPwd) {
-          if (e.detail.value.pwd.toString().length > 6) {
+          if (e.detail.value.pwd.toString().length > 5) {
             if (e.detail.value.pwd == e.detail.value.newPwd) {
               wx.request({
                 url: app.globalData.publicUrl + '/applet/updatePwd',
@@ -70,17 +69,31 @@ Page({
                 },
                 data: e.detail.value,
                 success: (res) => {
-                  console.log(res);
-                  // if (res.data.code == 0) {
-                  //   wx.switchTab({
-                  //     url: '/pages/updatepassword/updatepassword',
-                  //   })
-                  // }
+                  if (res.data.code == 0) {
+                    wx.showModal({
+                      showCancel: false,
+                      content: '密码已修改',
+                      success: () => {
+                        wx.switchTab({
+                          url: '/pages/index/index',
+                        })
+                      }
+                    })
+                  } else if(res.data.code == 1) {
+                    wx.showToast({
+                      title: "修改失败,原密码不正确",
+                      icon: 'none',
+                      duration: 2000,
+                    })
+                  }else{
+                    wx.showToast({
+                      title: "修改失败,请联系管理员",
+                      icon: 'none',
+                      duration: 2000,
+                    })
+                  }
                 }
               })
-              wx.switchTab({
-                url: '/pages/index/index',
-              })
             } else {
               wx.showToast({
                 title: "两次输入密码不一致",
@@ -90,7 +103,7 @@ Page({
             }
           } else {
             wx.showToast({
-              title: "密码长度最少为7位",
+              title: "密码长度最少为6位",
               icon: 'none',
               duration: 2000,
             })
@@ -132,6 +145,5 @@ Page({
         })
       }
     })
-
   },
 })

+ 1 - 1
project.config.json

@@ -4,7 +4,7 @@
 		"ignore": []
 	},
 	"setting": {
-		"urlCheck": false,
+		"urlCheck": true,
 		"es6": true,
 		"postcss": true,
 		"preloadBackgroundData": false,

+ 2 - 1
utils/photoUrl.wxs

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

+ 2 - 1
utils/util.js

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