| | |
| | | onLoad() { |
| | | this.init(); |
| | | }, |
| | | onShow() { |
| | | uni.$on('needRefresh', () => { |
| | | this.init(); |
| | | }) |
| | | }, |
| | | onHide() { |
| | | uni.$off('needRefresh', () => { |
| | | |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | uni.$off('needRefresh', () => { |
| | | |
| | | }) |
| | | }, |
| | | data() { |
| | | return {}; |
| | | }, |
| | |
| | | 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) { |