@@ -13,10 +13,12 @@ import { useTheme } from '@/hooks';
1313import { ThemeType , LangType } from '@/constants/' ;
1414import styles from './index.less' ;
1515import { getLang , setLang } from '@/utils/localStorage' ;
16- import { clearOlderLocalStorage , getCookie } from '@/utils' ;
16+ import { clearOlderLocalStorage } from '@/utils' ;
1717import registerMessage from './init/registerMessage' ;
1818import registerNotification from './init/registerNotification' ;
1919import MyNotification from '@/components/MyNotification' ;
20+ import Iconfont from '@/components/Iconfont' ;
21+ import Setting from '@/blocks/Setting' ;
2022import indexedDB from '@/indexedDB' ;
2123
2224declare global {
@@ -79,7 +81,7 @@ function AppContainer() {
7981 const { token } = useToken ( ) ;
8082 const [ initEnd , setInitEnd ] = useState ( false ) ;
8183 const [ appTheme , setAppTheme ] = useTheme ( ) ;
82- const [ startSchedule , setStartSchedule ] = useState ( 1 ) ; // 0 初始状态 1 服务启动中 2 启动成功
84+ const [ startSchedule , setStartSchedule ] = useState ( 0 ) ; // 0 初始状态 1 服务启动中 2 启动成功
8385 const [ serviceFail , setServiceFail ] = useState ( false ) ;
8486 const [ isLogin , setIsLogin ] = useState < boolean | null > ( null ) ;
8587
@@ -152,9 +154,6 @@ function AppContainer() {
152154 . testService ( )
153155 . then ( ( ) => {
154156 clearInterval ( time ) ;
155- // if (__ENV__ === 'desktop') {
156- // window.location.href = 'http://127.0.0.1:10824/'
157- // }
158157 setStartSchedule ( 2 ) ;
159158 flag ++ ;
160159 } )
@@ -174,12 +173,20 @@ function AppContainer() {
174173 { initEnd && (
175174 < div className = { styles . app } >
176175 { /* 服务启动中 */ }
177- { ( startSchedule === 1 || isLogin === null ) && (
176+ { ( startSchedule < 2 || isLogin === null ) && (
178177 < div className = { styles . loadingBox } >
179178 < Spin spinning = { ! serviceFail } size = "large" />
180- { /* <div className={styles.hint}>
181- <Setting />
182- </div> */ }
179+ { /* 状态等于1时,说明没服务起来需要轮训接口,这时可能服务配置又问题,需要设置来修改 */ }
180+ { startSchedule === 1 && (
181+ < Setting
182+ render = {
183+ < div className = { styles . settingBox } >
184+ < Iconfont code = "" />
185+ </ div >
186+ }
187+ noLogin
188+ />
189+ ) }
183190 { serviceFail && (
184191 < >
185192 < div className = { styles . github } >
0 commit comments