Bladeren bron

修改充值界面在首冲范围内弹首冲弹框

zhejiushizhuce 2 jaren geleden
bovenliggende
commit
0fe75cafd5
1 gewijzigde bestanden met toevoegingen van 56 en 17 verwijderingen
  1. 56 17
      src/widgets/WDeposit/BR/BRDeposit.jsx

+ 56 - 17
src/widgets/WDeposit/BR/BRDeposit.jsx

@@ -176,17 +176,18 @@ const BRDeposit=()=>{
         }
         return (
             <button className={styles.first_pay} onClick={() => {
-                if (status===-1){
-                    onGetPaymentOder({
-                        price: item.money,
-                        goodsName: "firstpay",
-                        payType: item.id,
-                        GiftsID: item.gift_id
-                    })
-                }
-                else if (status===1){
-                    onGetSecond();
-                }
+                // if (status===-1){
+                //     onGetPaymentOder({
+                //         price: item.money,
+                //         goodsName: "firstpay",
+                //         payType: item.id,
+                //         GiftsID: item.gift_id
+                //     })
+                // }
+                // else if (status===1){
+                //     onGetSecond();
+                // }
+                global.showFirstPay();
             }}>
                 <div className={styles.pay_info}>
                     <div className={styles.title}>{title}</div>
@@ -367,6 +368,43 @@ const BRDeposit=()=>{
             </div>
         )
     }
+    const checkOrdinary=(price,goodsName,payType,GiftsID)=>{
+        let isInFirst=false;
+        if (firstPayMulti!==null){
+            let items=firstPayMulti.items;
+            if (items!=null){
+                for (let i = 0; i < items.length; i++) {
+                    let item=items[i];
+                    let fmoney=Number(item.money);
+                    price=Number(price);
+                    if (fmoney===price){
+                        isInFirst=true;
+                        break;
+                    }
+                }
+            }
+        }
+        if (isInFirst){
+            let isPopFirst=false;
+            let priceInFirst=global.priceInFirst;
+            if (priceInFirst==null)priceInFirst={};
+            if (priceInFirst[price]==null){
+                priceInFirst[price]=1;
+                global.priceInFirst=priceInFirst;
+                isPopFirst=true;
+            }
+            if (isPopFirst){
+                global.showFirstPay();
+                return;
+            }
+        }
+        onGetPaymentOder({
+            price:price,
+            goodsName:goodsName,
+            payType:payType,
+            GiftsID:GiftsID
+        })
+    }
     const renderDepositBtn=()=>{
         return (
             <button className={"button-green"} onClick={()=>{
@@ -388,12 +426,13 @@ const BRDeposit=()=>{
                         gift_id=activity.gift_id;
                     }
                 }
-                onGetPaymentOder({
-                    price:money,
-                    goodsName:"chip",
-                    payType:id,
-                    GiftsID:gift_id
-                })
+                // onGetPaymentOder({
+                //     price:money,
+                //     goodsName:"chip",
+                //     payType:id,
+                //     GiftsID:gift_id
+                // })
+                checkOrdinary(money,"chip",id,gift_id);
             }}>
                 {orderStatus===REQ_STATUS.LOADING?(<SmallLoading fill={"#fff"}/>):i18n.t("deposit.pay_btn")}
             </button>