浏览代码

门墩门户页面

lifanagju_citu 1 月之前
父节点
当前提交
01d2620d4c
共有 4 个文件被更改,包括 54 次插入28 次删除
  1. 0 10
      App.vue
  2. 3 3
      components/payPopup/index.vue
  3. 4 4
      pages.json
  4. 47 11
      pages/index/loading.vue

+ 0 - 10
App.vue

@@ -22,16 +22,6 @@
 			// })
 			console.log('App Launch')
 			uni.setStorageSync('firstOpen', true)
-			
-			// 检查是否是个人令牌
-			if (uni.getStorageSync('token') && uni.getStorageSync('isPersonalToken')) {
-				try {
-					const url = uni.getStorageSync('entRegisterData') ? '/pages/register/review?hasData=true' : '/pages/register/index'
-					uni.redirectTo({ url }) // redirectTo: 关闭当前页面,跳转(不可返回); reLaunch: 关闭所有页面,重新打开(完全重置导航栈)
-				} catch (e) {
-					console.error('Navigation error:', e)
-				}
-			}
 
 			const updateManager = uni.getUpdateManager();
 			updateManager.onCheckForUpdate(function(res){});

+ 3 - 3
components/payPopup/index.vue

@@ -320,7 +320,7 @@ const handleClose = () => { // 手动关闭emit
   emit('close')
 }
 
-const tabBarShow = (show = false) => { // 显示/隐藏 TabBar
+const tabBarControl = (show = false) => { // 显示/隐藏 TabBar
   console.log('TabBar:', show ? '展示' : '隐藏')
   const currentPage = getCurrentPages()
   if (!currentPage) return
@@ -335,10 +335,10 @@ const popupChange = (e) => {
   if (!props.tabBar) return // 页面没有底部导航菜单栏
   if (e.show) {
     // 支付弹窗打开
-    tabBarShow(false)
+    tabBarControl(false)
   } else {
     // 支付弹窗关闭
-    tabBarShow(true)
+    tabBarControl(true)
   }
 }
 

+ 4 - 4
pages.json

@@ -1,15 +1,15 @@
 {
 	"pages": [
 		{
-			"path": "pages/index/search",
+			"path": "pages/index/loading",
 			"style": {
-				"navigationBarTitleText": "人才推荐"
+				"navigationBarTitleText": "门墩儿 专注顶尖招聘"
 			}
 		},
 		{
-			"path": "pages/index/loading",
+			"path": "pages/index/search",
 			"style": {
-				"navigationBarTitleText": "门墩儿 专注顶尖招聘"
+				"navigationBarTitleText": "人才推荐"
 			}
 		},
 		{

+ 47 - 11
pages/index/loading.vue

@@ -1,23 +1,59 @@
 <template>
-  <view class="loading">
-    <view>门墩儿 专注顶尖招聘</view>
-    <uni-icons
-      class="icons"
-      type="spinner-cycle"
-      size="24"
-    />
+  <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'
+
+
+const tabBarControl = (show = false) => { // 显示/隐藏 TabBar
+  console.log('TabBar:', show ? '展示' : '隐藏')
+  const currentPage = getCurrentPages()
+  if (!currentPage) return
+  const currentTabBar = currentPage[0]?.getTabBar?.()
+  currentTabBar?.setData({ show })
+}
+
+onShow(() => {
+  tabBarControl(false)
+	if (!getAccessToken()) {
+    showAuthModal()
+    uni.reLaunch({ url: '/pages/index/search' }) // redirectTo: 关闭当前页面,跳转(不可返回); reLaunch: 关闭所有页面,重新打开(完全重置导航栈)
+  } else {
+    // 检查是否是个人令牌
+    if (uni.getStorageSync('token') && uni.getStorageSync('isPersonalToken')) {
+      try {
+        const url = uni.getStorageSync('entRegisterData') ? '/pages/register/review?hasData=true' : '/pages/register/index'
+        uni.redirectTo({ url }) // redirectTo: 关闭当前页面,跳转(不可返回); reLaunch: 关闭所有页面,重新打开(完全重置导航栈)
+      } catch (e) {
+        console.error('Navigation error:', e)
+      }
+    }
+  }
+})
 </script>
 <style lang="scss" scoped>
-.loading {
-  height: 60vh;
-  line-height: 60vh;
+.box {
   text-align: center;
+  .img {
+    width: 105px;
+    height: 45px;
+    margin-top: 30vh;
+    margin-bottom: 16px;
+  }
   .icons {
-    margin-top: 20px;
+    position: fixed;
+    bottom: 20vh;
+    width: 100%;
+    margin: 0 auto;
   }
 }
 </style>