Ver código fonte

fix: 软件锁去掉下载相同路径

outaozhen 5 anos atrás
pai
commit
157a7c7d97

+ 2 - 1
src/pages/Product/Lock/Lockstore/components/DownUpdateFile/index.jsx

@@ -5,6 +5,7 @@ import styles from '@/pages/Product/Lock/LockStore/components/ChangeClient/index
 import { isEmpty, isNullOrUnDef } from '@/utils/is'
 
 const DownUpdateFile = ({ updateFile }) => {
+  const NewupdateFile = updateFile?.replace('/upload/longle/', '')
   if (isNullOrUnDef(updateFile) || isEmpty(updateFile)) return null
   const handleDownExcel = () => {
     const oa = document.createElement('a')
@@ -17,7 +18,7 @@ const DownUpdateFile = ({ updateFile }) => {
     <div className={styles.companyInput}>
       <Card size="small">
         <div className="flex justify-between">
-          <div className={`${styles.nameContent} ${styles.nameContentWidth}`}>{updateFile}</div>
+          <div className={`${styles.nameContent} ${styles.nameContentWidth}`}>{NewupdateFile}</div>
           <Tooltip placement="right" title="下载" className="ml-5px">
             <span className={styles.switchIcon}>
               <Download onClick={handleDownExcel} />