Browse Source

fix: 隐藏理论值

ZhaoJun 1 year ago
parent
commit
7497957809
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/pages/Home/index.js

+ 4 - 3
src/pages/Home/index.js

@@ -292,7 +292,7 @@ const Electric = (props) => {
         <li>
           <div className={styles.value}>
             {/* {open ? getValue(data?.elec) : '*****'} */}
-            {data?.elec_unit_theory || '-'}
+            {open ? data?.elec_unit_theory || '-' : '*****'}
           </div>
           <Popover title={content}>
             <div className={styles.btn1} onClick={(e) => e.stopPropagation()}>
@@ -352,11 +352,12 @@ const Medicine = (props) => {
       <ul>
         <li>
           <div className={styles.valueLong}>{open ? otc_cost : '*****'}</div>
-
           <div className={styles.btn1}>吨水药耗(元/m³)</div>
         </li>
         <li>
-          <div className={styles.valueLong}>{data?.otc_unit_theory || '-'}</div>
+          <div className={styles.valueLong}>
+            {open ? data?.otc_unit_theory || '-' : '*****'}
+          </div>
           <Popover title={content}>
             <div className={styles.btn1} onClick={(e) => e.stopPropagation()}>
               理论值(元/m³)