Browse Source

Merge branch 'master' of http://git.cc-lotus.info/roose/mzxiaochengxu

ssfg 4 years ago
parent
commit
37ae0e9983

+ 31 - 18
pages/personInfo/personInfo.js

@@ -2,6 +2,7 @@ const app = require('../../utils/util.js');
 Page({
   data: {
     info: {},
+    isTure: false,
   },
   wanshan() {
     wx.navigateTo({
@@ -31,6 +32,7 @@ Page({
     })
   },
   tuichu() {
+    var that =this;
     wx.showModal({
       showCancel: true,
       content: "您确认要退出吗?",
@@ -40,6 +42,9 @@ Page({
             mask: true,
             title: '退出中',
           })
+          that.setData({
+            isTure :false 
+          })
           wx.request({
             url: app.globalData.publicUrl + '/applet/unbind',
             method: "GET",
@@ -71,28 +76,36 @@ Page({
 
   },
   onShow() {
-  
-    wx.request({
-      url: app.globalData.publicUrl + '/applet/findUserInfo',
-      method: "GET",
-      header: {
-        appletsId: wx.getStorageSync('openId')
-      },
-      success: (res) => {
-        console.log(res, "000");
-        this.setData({
-          info: res.data.data
-        })
-      }
-    })
-  },
-  onLoad() {
-    console.log( "onload .......................");
+    console.log(wx.getStorageSync('user'), "打印");
     if (wx.getStorageSync('user') == '') {
       wx.redirectTo({
         url: '/pages/login/login',
       })
-      return
+      this.setData({
+        isTure: false,
+      })
+    } else {
+      this.setData({
+        isTure: true,
+      })
+      wx.request({
+        url: app.globalData.publicUrl + '/applet/findUserInfo',
+        method: "GET",
+        header: {
+          appletsId: wx.getStorageSync('openId')
+        },
+        success: (res) => {
+          console.log(res, "000");
+          this.setData({
+            info: res.data.data
+          })
+        }
+      })
     }
+
+
+  },
+  onLoad() {
+
   }
 })

+ 1 - 1
pages/personInfo/personInfo.wxml

@@ -1,4 +1,4 @@
-<view>
+<view wx:if='{{isTure}}'>
 	<image src="/images/mybj.png" style="width: 100%; height: 400rpx;"></image>
 	<view class="personxx">
 		<view class="tx">

+ 5 - 3
pages/personInfo/personInfo.wxss

@@ -1,6 +1,6 @@
-page {
+/* page {
   background-color: #f2f2f2;
-}
+} */
 
 .personxx {
   width: 710rpx;
@@ -16,9 +16,11 @@ page {
   justify-content: center;
 
 }
+
 .title {
   color: #a7a7a7;
   font-size: 30rpx;
+  box-shadow: 0px 0px 10px 0px rgba(153, 153, 153, 0.15);
 }
 
 .tx {
@@ -47,7 +49,7 @@ page {
 }
 
 .small-title {
-  display: flex; 
+  display: flex;
   align-items: center;
   justify-content: center;
   color: #333333;

+ 21 - 14
pages/visitandinfo/visitandinfo.js

@@ -4,6 +4,7 @@ Page({
     logs: [],
     currentTabIndex: 0,
     select_all: false,
+    isTrue: false,
     isAllTrue: false, // 控制全选和反选的按钮
     listData: [
       // {
@@ -343,8 +344,12 @@ Page({
   computeScrollViewHeight1() {
     let that = this
     let query = wx.createSelectorQuery().in(this)
+    console.log(query,"..........................");
+    
     query.select('.zizi').boundingClientRect()
     query.exec(res => {
+      console.log(res);
+      
       let searchHeight = res[0].height
       let windowHeight = wx.getSystemInfoSync().windowHeight
       let scrollHeight = windowHeight - searchHeight - 30 - 5 - 50
@@ -355,16 +360,7 @@ Page({
   },
 
   onLoad() {
-    if (wx.getStorageSync('user') == '') {
-      wx.redirectTo({
-        url: '/pages/login/login',
-      })
-      return
-    }
-    this.oldInfo();
-    this.visitInfo();
-    this.computeScrollViewHeight();
-    this.computeScrollViewHeight1();
+
   },
   onShow() {
     console.log(wx.getStorageSync('user'), "打印");
@@ -372,11 +368,22 @@ Page({
       wx.redirectTo({
         url: '/pages/login/login',
       })
-    }else {
+      this.setData({
+        isTrue: false,
+      })
+    } else {
       this.setData({
         isAllTrue: false,
-        select_all: false
+        select_all: false,
+        isTrue: true,
       })
+      if(this.data.isTrue){
+        this.computeScrollViewHeight();
+        this.computeScrollViewHeight1();
+      }
+      this.oldInfo();
+      this.visitInfo();
+     
       switch (this.data.number) {
         case 0:
           this.openIdInfo();
@@ -413,9 +420,9 @@ Page({
       this.visitInfo();
     }
   },
-  onHide(){
+  onHide() {
     this.setData({
-      show :false
+      show: false
     })
   }
 })

+ 1 - 1
pages/visitandinfo/visitandinfo.wxml

@@ -5,7 +5,7 @@
 	<wxs module="oldMind" src="../../utils/oldmind.wxs"></wxs>
 	<wxs module="oldHealth" src="../../utils/oldhealth.wxs"></wxs>
 	<wxs module="oldSecurity" src="../../utils/oldsecurity.wxs"></wxs>
-	<view style="margin-bottom:100rpx">
+	<view style="margin-bottom:100rpx" wx:if='{{isTrue}}'>
 		<view id='tabs'>
 			<view class='tabs-box'>
 				<block wx:for="{{['采集记录','探访记录']}}" wx:key="index">