Explorar o código

无第二天配置修改

zhejiushizhuce %!s(int64=2) %!d(string=hai) anos
pai
achega
e8a7e1e6a9

+ 24 - 14
src/widgets/WDeposit/BR/BRDeposit.jsx

@@ -190,11 +190,14 @@ const BRDeposit=()=>{
             }}>
                 <div className={styles.pay_info}>
                     <div className={styles.title}>{title}</div>
-                    <div className={styles.price_con}>
+                    <div className={`${styles.price_con} ${second_give<=0?styles.price_con_offset:''}`}>
                         {
                             status === -1 ? (
                                 <>
-                                    <span className={styles.label}>{i18n.t("firstPay.today")}</span>
+                                    {
+                                        second_give>0? (
+                                            <span className={styles.label}>{i18n.t("firstPay.today")}</span>):(<></>)
+                                    }
                                     <span data-title={global.DOLLAR + total}
                                           className={styles.p_text_f}>
                                         {global.DOLLAR + total}
@@ -202,7 +205,10 @@ const BRDeposit=()=>{
                                 </>
                             ) : (
                                 <>
-                                    <span className={styles.label}>{i18n.t("firstPay.today")}</span>
+                                    {
+                                        second_give>0? (
+                                            <span className={styles.label}>{i18n.t("firstPay.today")}</span>):(<></>)
+                                    }
                                     <span data-title={global.DOLLAR + total}
                                           className={styles.p_text_al}>
                                         {global.DOLLAR + total}
@@ -216,17 +222,21 @@ const BRDeposit=()=>{
                         {/*    <div className={styles.ori_line}/>*/}
                         {/*</div>*/}
                     </div>
-                    <div className={styles.price_con}>
-                        <span className={styles.label}>{i18n.t("firstPay.day_2")}</span>
-                        <span data-title={global.DOLLAR + second_give}
-                              className={styles.p_text}>{global.DOLLAR + second_give}</span>
-                        {/*<div className={styles.origin}>*/}
-                        {/*    {global.DOLLAR + price}*/}
-                        {/*    <div className={styles.ori_line}/>*/}
-                        {/*</div>*/}
-                    </div>
+                    {
+                        second_give>0?(
+                            <div className={styles.price_con}>
+                                <span className={styles.label}>{i18n.t("firstPay.day_2")}</span>
+                                <span data-title={global.DOLLAR + second_give}
+                                      className={styles.p_text}>{global.DOLLAR + second_give}</span>
+                                {/*<div className={styles.origin}>*/}
+                                {/*    {global.DOLLAR + price}*/}
+                                {/*    <div className={styles.ori_line}/>*/}
+                                {/*</div>*/}
+                            </div>
+                        ):(<></>)
+                    }
                     <button className={styles.price_btn}>
-                    {/*{global.DOLLAR + price}*/}
+                        {/*{global.DOLLAR + price}*/}
                         {btnlabel}
                     </button>
                 </div>
@@ -235,7 +245,7 @@ const BRDeposit=()=>{
                 <div className={styles.percent}>
                     <img src={img_sc} className={styles.percent}/>
                     <div className={styles.text}>
-                        {'+' + Math.floor((give+second_give) * 100 / price) + '%'}
+                    {'+' + Math.floor((give+second_give) * 100 / price) + '%'}
                     </div>
                 </div>
             </button>

+ 3 - 0
src/widgets/WDeposit/BR/styles.module.scss

@@ -40,6 +40,9 @@
       border: 1px solid #f0c461;
       text-shadow: -1px -1px 0 #987233, 1px -1px 0 #987233, -1px 1px 0 #987233, ;
     }
+    & .price_con_offset{
+      margin-top: 1rem;
+    }
     & .price_con{
       //margin-top: 1rem;
       width: 100%;

+ 57 - 36
src/widgets/WFirstPay/index.jsx

@@ -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}>
                 {

+ 33 - 0
src/widgets/WFirstPay/styles.module.scss

@@ -128,6 +128,39 @@ $r_bg:"./../../assets/firstPay/r_bg.png";
         width: 100%;
         height: 21%;
       }
+      & .percent_con_old{
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        position: absolute;
+        z-index: 2;
+        background: url($pbg);
+        background-size: 100% 100%;
+        width: 24%;
+        aspect-ratio: 137/136;
+        right: 16%;
+        bottom: 15%;
+        transform: rotate(-10deg);
+        & .text{
+          &::before{
+            content: attr(data-title);
+            position: absolute;
+            background-image: linear-gradient(to right,#ffd63c,#ffd63c, #fdfdd1);
+            background-clip: text;
+            -webkit-background-clip: text;
+            -webkit-text-fill-color: transparent;
+            -webkit-text-stroke: 0px #483be3;
+            font-weight: bold;
+            font-size: 1rem;
+            pointer-events: none;
+          }
+          font-weight: bold;
+          font-size: 1rem;
+          -webkit-text-stroke: 2px #483be3;
+          filter: drop-shadow(0 1px 1px #3615a0);
+        }
+      }
       & .already_con{
         position: absolute;
         left: 10.3%;