shaogen1995 1 день назад
Родитель
Сommit
2b94eae6d6

+ 6 - 0
src/pages/ZgoodsInfo/index.module.scss

@@ -14,6 +14,7 @@
       }
       }
       i {
       i {
         margin-right: 20px;
         margin-right: 20px;
+        color: var(--txtColor);
       }
       }
       .ant-tag {
       .ant-tag {
         display: inline-block;
         display: inline-block;
@@ -79,5 +80,10 @@
       font-size: 20px;
       font-size: 20px;
       letter-spacing: 4px;
       letter-spacing: 4px;
     }
     }
+    .GItag {
+      border-color: var(--txtColor);
+      border-radius: 10px;
+      color: var(--txtColor);
+    }
   }
   }
 }
 }

+ 5 - 1
src/pages/ZgoodsInfo/index.tsx

@@ -234,7 +234,11 @@ function ZgoodsInfo() {
       if (txt) {
       if (txt) {
         const arr = txt.split(';')
         const arr = txt.split(';')
         arr.forEach((v, i) => {
         arr.forEach((v, i) => {
-          dom.push(<Tag key={i}>{v}</Tag>)
+          dom.push(
+            <Tag key={i} className='GItag'>
+              {v}
+            </Tag>
+          )
         })
         })
       }
       }
     }
     }

+ 16 - 1
src/pages/Zother/AddGoods/index.tsx

@@ -201,7 +201,7 @@ function AddGoods({
         const keyArr: string[] = []
         const keyArr: string[] = []
 
 
         for (const k in obj) {
         for (const k in obj) {
-          if (!['delStoryIds', 'storyIds'].includes(k)) {
+          if (!['delStoryIds', 'storyIds', 'fileIds'].includes(k)) {
             if ((oldInfoObj[k] || obj[k]) && oldInfoObj[k] !== obj[k]) {
             if ((oldInfoObj[k] || obj[k]) && oldInfoObj[k] !== obj[k]) {
               keyArr.push(k)
               keyArr.push(k)
               flag = false
               flag = false
@@ -209,6 +209,21 @@ function AddGoods({
           }
           }
         }
         }
 
 
+        const oldFileIds = (oldInfoObj.fileIds || '')
+          .split(',')
+          .map((c: any) => Number(c))
+          .sort((a: any, b: any) => b - a)
+          .join(',')
+        const newFileIds = (obj.fileIds || '')
+          .split(',')
+          .map((c: any) => Number(c))
+          .sort((a: any, b: any) => b - a)
+          .join(',')
+        if (oldFileIds !== newFileIds) {
+          flag = false
+          keyArr.push('fileIds')
+        }
+
         // if (1 + 1 === 2) {
         // if (1 + 1 === 2) {
         //   console.log('---------', keyArr, oldInfoObj, obj)
         //   console.log('---------', keyArr, oldInfoObj, obj)
         //   return
         //   return