zhejiushizhuce 2 سال پیش
والد
کامیت
e25982500a
3فایلهای تغییر یافته به همراه17 افزوده شده و 4 حذف شده
  1. 7 1
      src/utils/helpers.js
  2. 1 2
      src/widgets/WCashWheel/index.jsx
  3. 9 1
      src/widgets/WCashWheel/styles.module.scss

+ 7 - 1
src/utils/helpers.js

@@ -227,9 +227,15 @@ export const validateBRPhone=(t)=>{
 export const validateCountryPhone=(country,phone)=>{
     return validateBRPhone(phone);
 }
-export const formatCash=(cash,fixed=2)=>{
+export const formatCash=(cash,fixed=2,isIntIgnore=false)=>{
     cash=Number(cash);
     cash=cash/global.CASH_BASE;
+    if (isIntIgnore){
+        let temp=parseInt(cash);
+        if (temp===cash){
+            fixed=0;
+        }
+    }
     return cash.toFixed(fixed);
 }
 export const getUrlParam=(name)=>{

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

@@ -69,7 +69,7 @@ const WCashWheel=({close})=>{
     }
     const renderCashMain=()=>{
         let collect=turnplate.collect_amount;
-        // collect=9556;
+        // collect=10000;
         let total=turnplate.total_amount;
         let left=total-collect;
         let isEnableCash=collect>0;
@@ -87,7 +87,6 @@ const WCashWheel=({close})=>{
                             decimals={2}
                             prefix={global.DOLLAR+" "}
                             startOnMount
-
                         >
                             {({ countUpRef, start }) => {
                                 if (countUpRef.current){

+ 9 - 1
src/widgets/WCashWheel/styles.module.scss

@@ -22,6 +22,14 @@
   display: flex;
   flex-direction: column;
   padding: 1rem 1.9rem;
+  @media screen and (max-width: 360px) {
+    padding: 1rem 1rem;
+    & .have_cash{
+      & .cash_text{
+        font-size: 2rem !important;
+      }
+    }
+  }
   align-items: center;
   justify-content: center;
   background-color: var(--standard);
@@ -37,7 +45,7 @@
       height: auto;
     }
     & .cash_text{
-      font-size: 2.2rem;
+      font-size: 2.1rem;
       font-family: "Roboto";
       color: #6ddf38;
     }