wjx vor 6 Monaten
Ursprung
Commit
ca7c63042f

+ 2 - 2
src/pages/launchSystemV3/tencentAdPutIn/create/MaterialText/newText.tsx

@@ -169,7 +169,7 @@ const NewText: React.FC<Props> = ({ visible, onClose, onChange, value, textData,
                         let count = dynamicMaterialDTos.dynamicGroup.length
                         let oldtextDto: PULLIN.TextDtoProps[] = JSON.parse(JSON.stringify(textDto))
                         let length = oldtextDto.length
-                        if (value === 0) {
+                        if (value === 0 || (mediaType === 2 && value === 2)) {
                             oldtextDto = [textDto[0] || {}]
                         } else if (value === 1) {
                             if (count > length) {
@@ -254,7 +254,7 @@ const NewText: React.FC<Props> = ({ visible, onClose, onChange, value, textData,
                             </div>
                         </Card>
                     ))}
-                    {[3, 2, 4].includes(type) && !(type === 2 && textDto.length >= dynamicMaterialDTos.dynamicGroup.length) && <Form.Item style={{ marginTop: 10, marginBottom: 0 }}>
+                    {[3, 2, 4].includes(type) && !(mediaType === 2 && type === 2) && !(type === 2 && textDto.length >= dynamicMaterialDTos.dynamicGroup.length) && <Form.Item style={{ marginTop: 10, marginBottom: 0 }}>
                         <Button type="primary" onClick={() => add(newText)} block icon={<PlusOutlined />} disabled={type === 3 && textDto.length >= 30}>
                             新增
                         </Button>

+ 3 - 3
src/pages/launchSystemV3/tencentAdPutIn/create/addDynamic.tsx

@@ -354,7 +354,7 @@ const AddDynamic: React.FC<PULLIN.NewAddDynamic> = ({ visible, onChange, onClose
                                             ...ad,
                                             id: ad.id + '_' + index,
                                             dynamicGroup: aad,
-                                            textDto: aad?.textDto
+                                            textDto: textType === 2 ? textDto?.[index % textDtoLenth] : aad?.textDto
                                         })
                                     })
                                 }
@@ -374,11 +374,11 @@ const AddDynamic: React.FC<PULLIN.NewAddDynamic> = ({ visible, onChange, onClose
                                         })
                                     })
                                 } else {
-                                    let { textDto, ...dynamicGroup } = newDynamicGroup[accountIndex1 % newDynamicGroup.length]
+                                    let { textDto: nowTextDto, ...dynamicGroup } = newDynamicGroup[accountIndex1 % newDynamicGroup.length]
                                     newData.push({
                                         ...ad,
                                         dynamicGroup,
-                                        textDto,
+                                        textDto: textType === 2 ? textDto?.[0] : nowTextDto,
                                         rowSpan: 1
                                     })
                                 }

+ 3 - 3
src/pages/launchSystemV3/tencentAdPutIn/create/index.tsx

@@ -624,7 +624,7 @@ const Create: React.FC = () => {
                                     ...ad,
                                     id: ad.id + '_' + index,
                                     dynamicGroup: aad,
-                                    textDto: aad?.textDto,
+                                    textDto: textType === 2 ? textDto?.[index % textDtoLenth] : aad?.textDto,
                                     adLength: data.length,
                                     ...(mediaType === 3 ? {
                                         rowSpan: index === 0 ? averageAdDynamic.length : 0,
@@ -651,11 +651,11 @@ const Create: React.FC = () => {
                                 })
                             })
                         } else {
-                            let { textDto, ...dynamicGroup } = newDynamicGroup[accountIndex1 % newDynamicGroup.length]
+                            let { textDto: nowTextDto, ...dynamicGroup } = newDynamicGroup[accountIndex1 % newDynamicGroup.length]
                             newData.push({
                                 ...ad,
                                 dynamicGroup,
-                                textDto,
+                                textDto: textType === 2 ? textDto?.[0] : nowTextDto,
                                 rowSpan: 1,
                                 adLength: data.length
                             })