wk
2024-06-06 04bf082f36434f1847412492576d8472c422993c
pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue
@@ -8,7 +8,7 @@
         ref="driverMyRef"></driver-my-page>
      <unload-mypage ref="UnloadMypageRef"
         v-if="roleType == 5"></unload-mypage>
      <tab-bar :current="roleType==5?1:2"></tab-bar>
      <tab-bar :current="2"></tab-bar>
   </view>
</template>
@@ -24,8 +24,23 @@
         freightForwarderMyPage,
         UnloadMypage
      },
      onShow() {
      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) {