|
@@ -1,5 +1,5 @@
|
|
|
import styles from './styles.module.scss';
|
|
import styles from './styles.module.scss';
|
|
|
-import {useEffect, useState} from "react";
|
|
|
|
|
|
|
+import {useEffect, useRef, useState} from "react";
|
|
|
import {reqFirstPayConfig, reqProtectCheck} from "@features/api";
|
|
import {reqFirstPayConfig, reqProtectCheck} from "@features/api";
|
|
|
import {useDispatch, useSelector} from "react-redux";
|
|
import {useDispatch, useSelector} from "react-redux";
|
|
|
import {getFirstBonus, getOpenRelief, getPopBindPhone, getUserInfo} from "@features/mainSlice";
|
|
import {getFirstBonus, getOpenRelief, getPopBindPhone, getUserInfo} from "@features/mainSlice";
|
|
@@ -62,6 +62,7 @@ const WWelfarebar = () => {
|
|
|
const {welfTabState,isMobile}=useThemeProvider();
|
|
const {welfTabState,isMobile}=useThemeProvider();
|
|
|
const {open} = useSidebar();
|
|
const {open} = useSidebar();
|
|
|
const {pathname} = useLocation();
|
|
const {pathname} = useLocation();
|
|
|
|
|
+ const starPRef=useRef(null);
|
|
|
const getWelfTabState=(key)=>{
|
|
const getWelfTabState=(key)=>{
|
|
|
if (welfTabState===key)return true;
|
|
if (welfTabState===key)return true;
|
|
|
return false;
|
|
return false;
|
|
@@ -168,6 +169,7 @@ const WWelfarebar = () => {
|
|
|
if (pathname.startsWith(ROUTE_PATH.SPORTS)){
|
|
if (pathname.startsWith(ROUTE_PATH.SPORTS)){
|
|
|
isClose=true;
|
|
isClose=true;
|
|
|
}
|
|
}
|
|
|
|
|
+ const stars=Array.from({ length: 5 }, (_, index) => index);
|
|
|
return (
|
|
return (
|
|
|
<div className={`${styles.container} ${extra}`}>
|
|
<div className={`${styles.container} ${extra}`}>
|
|
|
<div className={`${styles.content} ${isClose?styles.content_close:''}`}>
|
|
<div className={`${styles.content} ${isClose?styles.content_close:''}`}>
|
|
@@ -175,19 +177,42 @@ const WWelfarebar = () => {
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
global.showProtectReward();
|
|
global.showProtectReward();
|
|
|
}}>
|
|
}}>
|
|
|
- <img className={styles.wlf_protect} src={require("@assets/welfare/fundos_"+i18n.language+".png")}/>
|
|
|
|
|
|
|
+ <div className={styles.wlf_protect}>
|
|
|
|
|
+ <img src={require("@assets/welfare/fundos_" + i18n.language + ".png")}/>
|
|
|
|
|
+ <div ref={starPRef} className={styles.p_stars}>
|
|
|
|
|
+ {
|
|
|
|
|
+ stars.map((item,index)=>{
|
|
|
|
|
+ return (
|
|
|
|
|
+ <div key={index} className={`${styles.star} ${styles['star_ani_'+index]}`}></div>
|
|
|
|
|
+ )
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</WelfareBtn>
|
|
</WelfareBtn>
|
|
|
<WelfareBtn key={"first_pay"} open={openFirst} pressDown={getWelfTabState(APP_WELFARE.FIRST_PAY)}
|
|
<WelfareBtn key={"first_pay"} open={openFirst} pressDown={getWelfTabState(APP_WELFARE.FIRST_PAY)}
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
global.showFirstPay();
|
|
global.showFirstPay();
|
|
|
}}>
|
|
}}>
|
|
|
- <img className={styles.wlf_first} src={require("@assets/welfare/first_"+i18n.language+".png")}/>
|
|
|
|
|
|
|
+ <div className={styles.wlf_first}>
|
|
|
|
|
+ <div className={styles.wlf_first_mask} style={{
|
|
|
|
|
+ webkitMask:`url(${require("@assets/welfare/first.png")}) 0 0/100%`
|
|
|
|
|
+ }}>
|
|
|
|
|
+ <img className={styles.f_img} src={require("@assets/welfare/first.png")}/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <img className={styles.f_txt} src={require("@assets/welfare/first_"+i18n.language+".png")}/>
|
|
|
|
|
+ </div>
|
|
|
</WelfareBtn>
|
|
</WelfareBtn>
|
|
|
<WelfareBtn key={"bind"} open={openBind} pressDown={getWelfTabState(APP_WELFARE.BIND)}
|
|
<WelfareBtn key={"bind"} open={openBind} pressDown={getWelfTabState(APP_WELFARE.BIND)}
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
global.showBindPhone();
|
|
global.showBindPhone();
|
|
|
}}>
|
|
}}>
|
|
|
- <img className={styles.wlf_bind} src={require("@assets/welfare/veri_"+i18n.language+".png")}/>
|
|
|
|
|
|
|
+ <div className={styles.wlf_bind}>
|
|
|
|
|
+ <img className={`${styles.b_icon} iconshake`}
|
|
|
|
|
+ src={require("@assets/welfare/veri_" + i18n.language + ".png")}/>
|
|
|
|
|
+ <img className={`${styles.b_txt}`}
|
|
|
|
|
+ src={require("@assets/welfare/bind_txt_" + i18n.language + ".png")}/>
|
|
|
|
|
+ </div>
|
|
|
</WelfareBtn>
|
|
</WelfareBtn>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|