zhoulisen 5 anni fa
parent
commit
18f41cc54e
1 ha cambiato i file con 21 aggiunte e 4 eliminazioni
  1. 21
    4
      src/pages/carouselFigure/editAdvertising.jsx

+ 21
- 4
src/pages/carouselFigure/editAdvertising.jsx Vedi File

37
   let isHaveActive = false
37
   let isHaveActive = false
38
   let isCanChoose = true
38
   let isCanChoose = true
39
   let isHavePosition = false
39
   let isHavePosition = false
40
+  let islet = true
40
 
41
 
41
   const setExtraData = (data) => {
42
   const setExtraData = (data) => {
42
-    if (data.isHaveActive != undefined) {
43
+    if (data.isHaveActive !== undefined) {
43
       isHaveActive = data.isHaveActive
44
       isHaveActive = data.isHaveActive
44
       if (!isHaveActive) {
45
       if (!isHaveActive) {
45
         // data.contentType=null
46
         // data.contentType=null
46
         data.buildingId = null
47
         data.buildingId = null
47
       }
48
       }
48
     }
49
     }
49
-
50
+    islet = isHaveActive
50
     if (data.showPosition == 'index') {
51
     if (data.showPosition == 'index') {
51
       isHavePosition = true;
52
       isHavePosition = true;
52
     } else {
53
     } else {
69
     h5Visible = data.contentType === 'h5';
70
     h5Visible = data.contentType === 'h5';
70
 
71
 
71
     cityId = data.cityId
72
     cityId = data.cityId
73
+    // console.log(data.buildingId, ' data.buildingId')
72
     buildingId = data.buildingId
74
     buildingId = data.buildingId
73
   }
75
   }
74
 
76
 
75
   const setExtraData1 = data => {
77
   const setExtraData1 = data => {
76
     console.log(data, "data.buildingIddata.buildingId2")
78
     console.log(data, "data.buildingIddata.buildingId2")
79
+    islet = isHaveActive
80
+
77
     if ((data.contentType === 'h5' && data.buildingId == null) || data.contentType === '' || data.contentType === 'nothing' || (data.contentType === 'live' && data.buildingId == null)) {
81
     if ((data.contentType === 'h5' && data.buildingId == null) || data.contentType === '' || data.contentType === 'nothing' || (data.contentType === 'live' && data.buildingId == null)) {
78
       isHaveActive = false
82
       isHaveActive = false
79
     } else {
83
     } else {
80
       isHaveActive = true
84
       isHaveActive = true
81
     }
85
     }
86
+    // if (!isHaveActivea && data.contentType === 'h5') {
87
+    //   // data.contentType=null
88
+    //   data.buildingId = null
89
+    // }
82
 
90
 
91
+    // if (data.isHaveActive !== undefined) {
92
+    //   isHaveActive = data.isHaveActive
93
+    //   if (!isHaveActive) {
94
+    //     // data.contentType=null
95
+    //     data.buildingId = null
96
+    //   }
97
+    // }
83
     if (data.showPosition == 'index') {
98
     if (data.showPosition == 'index') {
84
       isHavePosition = true;
99
       isHavePosition = true;
85
     } else {
100
     } else {
94
     salesBatchVisible = data.contentType === 'salesBatch';
109
     salesBatchVisible = data.contentType === 'salesBatch';
95
     liveVisible = data.contentType === 'live';
110
     liveVisible = data.contentType === 'live';
96
     h5Visible = data.contentType === 'h5';
111
     h5Visible = data.contentType === 'h5';
112
+
113
+    console.log(data.buildingId, ' data.buildingId')
97
     buildingId = data.buildingId
114
     buildingId = data.buildingId
98
   }
115
   }
99
 
116
 
270
         ],
287
         ],
271
       },
288
       },
272
       {
289
       {
273
-        label: '是否发布H5活动',
290
+        label: '发布H5活动',
274
         name: 'targetId',
291
         name: 'targetId',
275
-        render: <SelectH5 buildingId={() => buildingId} />,
292
+        render: <SelectH5 buildingId={() => islet ? buildingId : ''} />,
276
         hidden: () => !h5Visible,
293
         hidden: () => !h5Visible,
277
         value: data.targetId,
294
         value: data.targetId,
278
         rules: [
295
         rules: [