|
|
@@ -7,6 +7,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
+import { onShow } from '@dcloudio/uni-app'
|
|
|
import { computed } from 'vue'
|
|
|
import { useAuthStore } from '@/stores/auth'
|
|
|
import SalesHome from '@/components/home/SalesHome.vue'
|
|
|
@@ -15,4 +16,10 @@ import ConstructionHome from '@/components/home/ConstructionHome.vue'
|
|
|
|
|
|
const authStore = useAuthStore()
|
|
|
const role = computed(() => authStore.userRole || 'sales')
|
|
|
+
|
|
|
+onShow(() => {
|
|
|
+ const pages = getCurrentPages()
|
|
|
+ const page = pages[pages.length - 1] as any
|
|
|
+ page?.getTabBar?.()?.setSelected?.(0)
|
|
|
+})
|
|
|
</script>
|