qingyiay
2023-10-30 0978691dc9047c7090dca64406f5d0ac027e8df4
pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue
@@ -27,6 +27,21 @@
      onLoad() {
         this.init();
      },
      onShow() {
         uni.$on('needRefresh', () => {
            this.init();
         })
      },
      onHide() {
         uni.$off('needRefresh', () => {
         })
      },
      onUnload() {
         uni.$off('needRefresh', () => {
         })
      },
      data() {
         return {};
      },
@@ -35,6 +50,20 @@
            return uni.getStorageSync('roleType');
         }
      },
      onPullDownRefresh() {
         if (this.roleType === 3) {
            this.$nextTick(() => {
               this.$refs.driverMyRef.init();
               uni.stopPullDownRefresh()
            })
         }
         if (this.roleType === 1) {
            this.$nextTick(() => {
               this.$refs.customerMyPageRef.init();
               uni.stopPullDownRefresh()
            })
         }
      },
      methods: {
         init() {
            switch (this.roleType) {