浏览代码

修改登录之后跳到首页

shaogen1995 3 月之前
父节点
当前提交
438dd2b50d
共有 2 个文件被更改,包括 10 次插入3 次删除
  1. 1 1
      展示端/src/pages/B4form/index.tsx
  2. 9 2
      展示端/src/pages/Z1login/index.tsx

+ 1 - 1
展示端/src/pages/B4form/index.tsx

@@ -85,7 +85,7 @@ function B4form() {
   //  通过校验点击确定
   const onFinish = useCallback(
     async (values: any) => {
-      if (values.teamPcs && values.teamPcs > 20) return MessageFu.warning('参团人数最多20人!')
+      if (values.teamPcs && values.teamPcs > 100) return MessageFu.warning('参团人数最多100人!')
 
       const cityArr = selectCityRef.current.getValue()
       if (cityArr.length < 2) return MessageFu.warning('请选择地区!')

+ 9 - 2
展示端/src/pages/Z1login/index.tsx

@@ -2,12 +2,12 @@ import React, { useCallback, useEffect } from 'react'
 import styles from './index.module.scss'
 import TopCom from '@/components/TopCom'
 import { Button } from 'antd'
-import history from '@/utils/history'
 import { setTokenInfo } from '@/utils/storage'
 import { MessageFu } from '@/utils/message'
 import { useParams } from 'react-router-dom'
 import { API_login } from '@/store/action/all'
 import { baseUrlTemp } from '@/utils/http'
+import { domShowFu } from '@/utils/domShow'
 function Z1login() {
   // 获取地址栏参数 1:课程 2:展馆
   const urlObjTemp: any = useParams()
@@ -50,7 +50,14 @@ function Z1login() {
       // // 跳到首页
       setTokenInfo(res.data)
       MessageFu.success('登录成功!')
-      history.replace(window.location.href.includes('/login/1') ? '/' : '/exhi')
+      domShowFu('#AsyncSpinLoding', true)
+
+      setTimeout(() => {
+        domShowFu('#AsyncSpinLoding', false)
+        window.location.href = `${baseUrlTemp}/web/home.html`
+      }, 400)
+
+      // history.replace(window.location.href.includes('/login/1') ? '/' : '/exhi')
     }
   }, [])