1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <template>
- <view class="box">
- <image class="img" src="https://minio.menduner.com/dev/fe9890be9b1176f84f2aa282b0f6adce300b133f65eb3d7b45ae057aa5698324.png"></image>
- <view class="color-primary font-size-20 font-weight-bold">门墩儿 专注顶尖招聘</view>
- <view class="icons">
- <uni-icons type="spinner-cycle" size="24" />
- </view>
- </view>
- </template>
- <script setup>
- import { onShow } from '@dcloudio/uni-app'
- import { getAccessToken } from '@/utils/request'
- import { showAuthModal } from '@/hooks/useModal'
- import { userStore } from '@/store/user'
- const useUserStore = userStore()
- const tabBarControl = (show = false) => { // 显示/隐藏 TabBar
- const currentPage = getCurrentPages()
- if (!currentPage) return
- const currentTabBar = currentPage[0]?.getTabBar?.()
- currentTabBar?.setData({ show })
- }
- onShow(async() => {
- tabBarControl(false) // 隐藏页面底部导航
-
- // 检查是否是个人令牌
- if (getAccessToken() && uni.getStorageSync('isPersonalToken')) {
- // 查看用户是否有在申请中的数据
- const { code } = await useUserStore.getPersonalApplyingData()
- uni.redirectTo({ url: code ? '/pages/register/review?hasData=true' : '/pages/register/index' })
- return
- }
- if (!getAccessToken()) showAuthModal()
- uni.reLaunch({ url: '/pages/index/search' }) // 进入门墩儿
- })
- </script>
- <style lang="scss" scoped>
- .box {
- text-align: center;
- .img {
- width: 105px;
- height: 45px;
- margin-top: 30vh;
- margin-bottom: 16px;
- }
- .icons {
- position: fixed;
- bottom: 20vh;
- width: 100%;
- margin: 0 auto;
- }
- }
- </style>
|