|
|
@@ -184,43 +184,64 @@ const WFirstPay=()=>{
|
|
|
precent=''+Math.floor((give+second_give)*100/money)+'%';
|
|
|
}
|
|
|
let isdone=first_pay.timeleft!=null;
|
|
|
- return (
|
|
|
- <div className={styles.f_main}>
|
|
|
- <img className={styles.bglight} src={require('@assets/firstPay/bglight.png')}/>
|
|
|
- <div className={styles.pack_con}>
|
|
|
- <img className={styles.pack_bg} src={require('@assets/firstPay/pack.png')}/>
|
|
|
- <div className={`${styles.bonus_con} ${styles.p_left}`}>
|
|
|
- <img className={styles.l_bg} src={require('@assets/firstPay/l_bg.png')}/>
|
|
|
- <span data-title={global.DOLLAR + total}
|
|
|
- className={styles.p_text}>{global.DOLLAR + total}</span>
|
|
|
- <span className={styles.p_label}>{i18n.t("firstPay.today")}</span>
|
|
|
- </div>
|
|
|
- <div className={`${styles.bonus_con} ${styles.p_right}`}>
|
|
|
- <img className={styles.r_bg} src={require('@assets/firstPay/r_bg.png')}/>
|
|
|
- <span data-title={global.DOLLAR + second_give}
|
|
|
- className={styles.p_text}>{global.DOLLAR + second_give}</span>
|
|
|
- <span className={styles.p_label}>{i18n.t("firstPay.day_2")}</span>
|
|
|
+ if (second_give>0){
|
|
|
+ return (
|
|
|
+ <div className={styles.f_main}>
|
|
|
+ <img className={styles.bglight} src={require('@assets/firstPay/bglight.png')}/>
|
|
|
+ <div className={styles.pack_con}>
|
|
|
+ <img className={styles.pack_bg} src={require('@assets/firstPay/pack.png')}/>
|
|
|
+ <div className={`${styles.bonus_con} ${styles.p_left}`}>
|
|
|
+ <img className={styles.l_bg} src={require('@assets/firstPay/l_bg.png')}/>
|
|
|
+ <span data-title={global.DOLLAR + total}
|
|
|
+ className={styles.p_text}>{global.DOLLAR + total}</span>
|
|
|
+ <span className={styles.p_label}>{i18n.t("firstPay.today")}</span>
|
|
|
+ </div>
|
|
|
+ <div className={`${styles.bonus_con} ${styles.p_right}`}>
|
|
|
+ <img className={styles.r_bg} src={require('@assets/firstPay/r_bg.png')}/>
|
|
|
+ <span data-title={global.DOLLAR + second_give}
|
|
|
+ className={styles.p_text}>{global.DOLLAR + second_give}</span>
|
|
|
+ <span className={styles.p_label}>{i18n.t("firstPay.day_2")}</span>
|
|
|
+ </div>
|
|
|
+ {/*<div className={styles.percent_con}>*/}
|
|
|
+ {/*<div data-title={precent} className={styles.text}>{precent}</div>*/}
|
|
|
+ {/*</div>*/}
|
|
|
+ <div className={styles.percent_con}>
|
|
|
+ <div data-title={precent + " " + i18n.t("firstPay.up")}
|
|
|
+ className={styles.p_text}>{precent + " " + i18n.t("firstPay.up")}</div>
|
|
|
+ </div>
|
|
|
+ {
|
|
|
+ isdone ? (
|
|
|
+ <div className={styles.already_con}>
|
|
|
+ <img className={styles.mask} src={require('@assets/firstPay/mask.png')}/>
|
|
|
+ <div className={styles.flag_con}>
|
|
|
+ <img className={styles.flag_bg} src={require('@assets/firstPay/flag.png')}/>
|
|
|
+ <div className={styles.flag_label}>{i18n.t("firstPay.already_got")}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ ) : (<></>)
|
|
|
+ }
|
|
|
</div>
|
|
|
- {/*<div className={styles.percent_con}>*/}
|
|
|
- {/*<div data-title={precent} className={styles.text}>{precent}</div>*/}
|
|
|
- {/*</div>*/}
|
|
|
- <div className={styles.percent_con}>
|
|
|
- <div data-title={precent+" "+i18n.t("firstPay.up")} className={styles.p_text}>{precent+" "+i18n.t("firstPay.up")}</div>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return (
|
|
|
+ <div className={styles.f_main}>
|
|
|
+ <img className={styles.bglight} src={require('@assets/firstPay/bglight.png')}/>
|
|
|
+ <div className={styles.pack_con}>
|
|
|
+ <img className={styles.pack_bg} src={require('@assets/firstPay/pack.png')}/>
|
|
|
+ <div className={styles.percent_con_old}>
|
|
|
+ <div data-title={'+'+precent} className={styles.text}>{'+'+precent}</div>
|
|
|
+ </div>
|
|
|
+ <div className={styles.percent_con}>
|
|
|
+ <div data-title={global.DOLLAR+total}
|
|
|
+ className={styles.p_text}>{global.DOLLAR+total}</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- {
|
|
|
- isdone? (
|
|
|
- <div className={styles.already_con}>
|
|
|
- <img className={styles.mask} src={require('@assets/firstPay/mask.png')}/>
|
|
|
- <div className={styles.flag_con}>
|
|
|
- <img className={styles.flag_bg} src={require('@assets/firstPay/flag.png')}/>
|
|
|
- <div className={styles.flag_label}>{i18n.t("firstPay.already_got")}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- ):(<></>)
|
|
|
- }
|
|
|
</div>
|
|
|
- </div>
|
|
|
- )
|
|
|
+ )
|
|
|
+ }
|
|
|
}
|
|
|
const renderPayBtn = () => {
|
|
|
let payItem = getPayItem();
|
|
|
@@ -230,7 +251,7 @@ const WFirstPay=()=>{
|
|
|
let payType = 0;
|
|
|
if (first_pay != null) {
|
|
|
money = Number(first_pay.money);
|
|
|
- payType=first_pay.id;
|
|
|
+ payType = first_pay.id;
|
|
|
let gear = first_pay.gear;
|
|
|
if (gear != null) {
|
|
|
gear = JSON.parse(gear);
|
|
|
@@ -306,7 +327,7 @@ const WFirstPay=()=>{
|
|
|
if (firstPayMulti){
|
|
|
items=firstPayMulti.items;
|
|
|
}
|
|
|
- if (items==null||items.length<=1)return (<></>);
|
|
|
+ if (items==null||items.length<=1)return (<div></div>);
|
|
|
return (
|
|
|
<div className={styles.f_ptabs_con}>
|
|
|
{
|