litian
2024-07-09 86cbb2a45a153a704bcc0d63697f83d2832caa71
pages/personalCenter/index.js
@@ -102,6 +102,7 @@
  data: {
    barHeight: '',
    navBarHeight: '',
    scoll: false,
    isWhite: false,
    userInfo: {},
    currAuthStep: 1,
@@ -120,7 +121,7 @@
      value: false
    },
    loadingProps: {
      size: '50rpx',
      size: '10rpx',
    },
    scrollTop: 0,
  },
@@ -346,15 +347,23 @@
  },
  onScroll(e) {
    if (this.data.scoll) {
      if (e.detail.scrollTop < 20) {
        this.data.scoll = false
        this.isChange(false);
      }
    } else {
      if (e.detail.scrollTop > 20) {
        this.data.scoll = true
        this.isChange(true);
      }
    }
  },
  isChange(data) {
    this.setData({
      isWhite: e.detail.scrollTop > 10 ? true : false
      isWhite: data
    })
    const {
      scrollTop
    } = e.detail;
    this.setData({
      scrollTop
    });
  },