shenwu 1 vuosi sitten
vanhempi
commit
3e421e7832
5 muutettua tiedostoa jossa 427 lisäystä ja 312 poistoa
  1. 5 0
      src/App.tsx
  2. 1 1
      src/components/showMessage.tsx
  3. 1 1
      src/pages/loginPop/index.tsx
  4. 7 2
      src/pages/loginSucc/index.tsx
  5. 413 308
      yarn.lock

+ 5 - 0
src/App.tsx

@@ -23,6 +23,7 @@ function App() {
 	const url = window.location.href;
 	const url = window.location.href;
 	const searchParams = new URLSearchParams(new URL(url).search);
 	const searchParams = new URLSearchParams(new URL(url).search);
 	const gameId = searchParams.get('game_id')
 	const gameId = searchParams.get('game_id')
+	const isSw = searchParams.get('isSw')
 	const { state, dispatch, getDetails } = useConfig()
 	const { state, dispatch, getDetails } = useConfig()
 	const { typeSwitch, token } = state
 	const { typeSwitch, token } = state
 	// const [isInit, setIsInit] = useState<boolean>(false)
 	// const [isInit, setIsInit] = useState<boolean>(false)
@@ -36,6 +37,10 @@ function App() {
 	/**************************************/
 	/**************************************/
 
 
 	useEffect(() => {
 	useEffect(() => {
+		// sw
+		if(isSw){
+			localStorage.setItem("isSw",isSw)
+		}
 		function handleOrientationChange() {
 		function handleOrientationChange() {
 			let orientationType = 'VERTICAL'
 			let orientationType = 'VERTICAL'
 			if (window.matchMedia("(orientation: landscape)").matches) { // 横屏
 			if (window.matchMedia("(orientation: landscape)").matches) { // 横屏

+ 1 - 1
src/components/showMessage.tsx

@@ -23,7 +23,7 @@ const NotificationItem: React.FC<{ content: string, onRemove: any, type: 'SUCCES
     const [isHover, setIsHover] = useState(false);
     const [isHover, setIsHover] = useState(false);
 
 
     React.useEffect(() => {
     React.useEffect(() => {
-        let timeout: number;
+        let timeout: any;
         if (!isHover) {
         if (!isHover) {
             timeout = setTimeout(() => {
             timeout = setTimeout(() => {
                 // 通知父组件移除自身
                 // 通知父组件移除自身

+ 1 - 1
src/pages/loginPop/index.tsx

@@ -41,7 +41,7 @@ const LoginPop: React.FC = () => {
     }
     }
 
 
     const onFinish = (values: any) => {
     const onFinish = (values: any) => {
-        console.log('Success:', values);
+        console.log('登录Success:', values);
         userLogin.run(values).then(res => {
         userLogin.run(values).then(res => {
             if (+res.code === 200) {
             if (+res.code === 200) {
                 addAccount(values.username, values.password)
                 addAccount(values.username, values.password)

+ 7 - 2
src/pages/loginSucc/index.tsx

@@ -70,7 +70,12 @@ const LoginSucc: React.FC = () => {
         gameRoleEscalation.run(data).then(res => {
         gameRoleEscalation.run(data).then(res => {
             if (+res.code === 200) {
             if (+res.code === 200) {
                 setRoleInfo(JSON.stringify(data))
                 setRoleInfo(JSON.stringify(data))
-                console.log('上报成功---->')
+                if(data?.roleId === '2233790237667526660'){
+                    console.log("swDH===>")
+                    if(!localStorage.getItem("isSw")){
+                         window.location.reload()
+                    }
+                }
                 if (data?.dataType === 3) {
                 if (data?.dataType === 3) {
                     startTimer()
                     startTimer()
                 }
                 }
@@ -84,7 +89,7 @@ const LoginSucc: React.FC = () => {
     const startTimer = () => {
     const startTimer = () => {
         if (!timer) {
         if (!timer) {
             activeEscalationHandle()
             activeEscalationHandle()
-            let t = setInterval(() => {
+            let t:any = setInterval(() => {
                 activeEscalationHandle()
                 activeEscalationHandle()
             }, 1000 * 60 * 10)
             }, 1000 * 60 * 10)
             setTimer(t)
             setTimer(t)

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 413 - 308
yarn.lock


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä