zhejiushizhuce 2 gadi atpakaļ
vecāks
revīzija
1f6c663ed9

+ 6 - 0
src/Global.js

@@ -76,4 +76,10 @@ global.showBindPhone=()=>{
 global.hideBindPhone=()=>{
     if (global.bindPhone)global.bindPhone.hide();
 }
+global.showBindPrompt=()=>{
+    if (global.bindPrompt)global.bindPrompt.show();
+}
+global.hideBindPrompt=()=>{
+    if (global.bindPrompt)global.bindPrompt.hide();
+}
 //wd pass

BIN
src/assets/bindPrompt/bg.png


+ 10 - 1
src/components/LoadingScreen.jsx

@@ -5,12 +5,21 @@ import Spring from '@components/Spring';
 // assets
 // import ball from '@assets/logo.json';
 import logo from '@assets/logo.json';
+import {useEffect, useRef} from "react";
 
 const LoadingScreen = ({...props}) => {
+    const loadRef = useRef(null);
+    useEffect(()=>{
+        return ()=>{
+            if (loadRef.current!=null){
+                loadRef.current.destroy();
+            }
+        }
+    },[])
     return (
         <Spring {...props} className="d-flex align-items-center justify-content-center flex-1 w-100 h-100">
             {/*<Lottie animationData={ball} />*/}
-            <Lottie animationData={logo} />
+            <Lottie animationData={logo} lottieRef={loadRef}/>
         </Spring>
     )
 }

+ 2 - 0
src/layout/Layout.jsx

@@ -32,6 +32,7 @@ import useEdgeGesture from "@hooks/useEdgeGesture";
 import MailNew from "@components/MailNew";
 import WInstallBox from "@widgets/WInstallBox";
 import WBindPhone from "@widgets/WBindPhone";
+import WBindPrompt from "@widgets/WBindPrompt";
 const PageNotFound = lazy(() => import('@pages/PageNotFound'));
 
 const Layout=({...props})=>{
@@ -124,6 +125,7 @@ const Layout=({...props})=>{
                 }}></WHallWheel>
                 {/*<WInstallBox/>*/}
                 <WBindPhone/>
+                <WBindPrompt/>
             </>
         )
     }

+ 5 - 0
src/locales/languages/en_US.json

@@ -620,6 +620,11 @@
     "btn_submit": "SUBMIT",
     "tips": "Link your Mobile and get {0} chips reward"
   },
+  "bindPrompt": {
+    "title": "Binding reward",
+    "content": "After binding, you can log in to the game via your mobile phone number, which is safe!",
+    "tips": "Play guest accounts. If you replace or reinstall your phone, you will lose your account. Immediate membership is recommended"
+  },
   "web": {
     "activity": {
       "redpack_not_available": "There is no RedPack",

+ 54 - 0
src/widgets/WBindPrompt/index.jsx

@@ -0,0 +1,54 @@
+import {useEffect, useState} from "react";
+import {useSelector} from "react-redux";
+import {getUpgradeBonus} from "@features/mainSlice";
+import {formatCash} from "@utils/helpers";
+import Modal from "@mui/material/Modal";
+import Fade from "@mui/material/Fade";
+import styles from "./styles.module.scss";
+import Grow from "@mui/material/Grow";
+const i18n=global.i18n;
+const WBindPrompt=({})=>{
+    const [isShow, setIsShow] = useState(false);
+    const upgradBonus=useSelector(getUpgradeBonus);
+    const regCoins=formatCash(upgradBonus,0);
+    const show=()=>{
+        setIsShow(true);
+    }
+    const hide=()=>{
+        setIsShow(false);
+    }
+    const onOpenBind=()=>{
+        hide();
+        global.showBindPhone();
+    }
+    useEffect(()=>{
+        const bindPrompt={
+            show,
+            hide
+        };
+        global.bindPrompt=bindPrompt;
+        return ()=>{
+        }
+    },[])
+    return (
+        <Modal open={isShow} onClose={()=>{
+            hide()
+        }} closeAfterTransition>
+            <Fade in={isShow} timeout={500}>
+                <div className={styles.continer}>
+                    <Grow in={isShow} timeout={500}>
+                        <div className={styles.bind_con} onClick={onOpenBind}>
+                            <div className={styles.content}>
+                                <span className={styles.title}>{i18n.t("bindPrompt.title")}</span>
+                                <span className={styles.reward}>{global.DOLLAR+""+regCoins}</span>
+                                <span className={styles.des}>{i18n.t("bindPrompt.content")}</span>
+                            </div>
+                            <span className={styles.tips}>{i18n.t("bindPrompt.tips")}</span>
+                        </div>
+                    </Grow>
+                </div>
+            </Fade>
+        </Modal>
+    )
+}
+export default WBindPrompt;

+ 58 - 0
src/widgets/WBindPrompt/styles.module.scss

@@ -0,0 +1,58 @@
+$bg:"./../../assets/bindPrompt/bg.png";
+.continer{
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  height: 100%;
+  padding: 1rem;
+  pointer-events: none;
+  position: relative;
+}
+.bind_con{
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  background: url($bg);
+  aspect-ratio: 773/497;
+  background-size: 100% 100%;
+  pointer-events: auto;
+  align-items: center;
+  justify-content: space-between;
+  & .content{
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    align-items: center;
+    padding: 1.8rem 1rem 1.8rem 4rem;
+    transform: rotate(-6deg);
+    gap: 1rem;
+    & .title{
+      color: #6a005e;
+      font-weight: bold;
+      font-size: 1.3rem;
+    }
+    & .reward{
+      color: #3244c3;
+      font-weight: bold;
+      font-size: 2.3rem;
+    }
+    & .des{
+      color: #6a005e;
+      padding: 0rem 2.5rem;
+      line-height: 1.2rem;
+    }
+  }
+  & .tips{
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: center;
+    padding: 1rem 1rem 1.8rem 4rem;
+    color: #fff;
+    transform: rotate(-6deg);
+    line-height: 0.8rem;
+    font-size: 0.5rem;
+  }
+}

+ 2 - 1
src/widgets/WCheckIn/index.jsx

@@ -124,7 +124,8 @@ const WCheckIn = ({close}) => {
             RewardDay.slice(0,4),
             RewardDay.slice(4,7),
         ]
-        let nDayNumber=checkInData.nDayNumber;
+        let nDayNumber=checkInData.NextDayNumber;
+        nDayNumber=nDayNumber-1;
         if (nDayNumber>7)nDayNumber=7;
         let cbRecord=checkInData.cbRecord;
         let itemIndex=0;

+ 1 - 1
src/widgets/WGame/WDGame/WDGame.jsx

@@ -182,7 +182,7 @@ const WDGame=()=>{
         let play_num=gameInfo.play_num!=null?gameInfo.play_num:0;
         return (
             <div className={`${styles.game_area} ${movieMode?styles.movie_mode:''}`}>
-                <div className={`${styles.game_action_wrap} ${styles.game_action_wrap_top}`}></div>
+                {/*<div className={`${styles.game_action_wrap} ${styles.game_action_wrap_top}`}></div>*/}
                 <div className={styles.game_main}>
                     <div className={styles.game_iframe_wrap}>
                         {