Explorar o código

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage into wangjianxin

wjx %!s(int64=2) %!d(string=hai) anos
pai
achega
b4d430feb5

+ 9 - 4
src/pages/launchSystemNew/launchManage/localAd/creative/modal.tsx

@@ -123,8 +123,8 @@ function CreativeModal(props: Props) {
             delete newValues.dataShow //删除数据开关
             delete newValues.actionBtn //删除行动开关
             console.log('newValues=>2', newValues)
-            if(!newValues.adcreativeElements){
-                newValues.adcreativeElements={}
+            if (!newValues.adcreativeElements) {
+                newValues.adcreativeElements = {}
             }
             callback(newValues)
         })
@@ -244,7 +244,12 @@ function CreativeModal(props: Props) {
                 setConversionList(newObj)
 
                 states = { ...states, sj_show: true }
-                values = { ...values, conversionDataType: newObj.conversion_data_type[0].value, conversionTargetType: newObj.conversion_target_type[0].value }
+                if (newObj.conversion_data_type) {
+                    values = { ...values, conversionDataType: newObj.conversion_data_type[0].value }
+                }
+                if (newObj.conversion_target_type) {
+                    values = { ...values, conversionTargetType: newObj.conversion_target_type[0].value }
+                }
             }
             //行动按钮组件存在
             if (states.xd_show) {
@@ -689,7 +694,7 @@ function CreativeModal(props: Props) {
                                         </Radio.Group>
                                     </Form.Item>
                                 </div>
-                                {conversionDataType === 'CONVERSION_DATA_ADMETRIC' && <div style={{ display: 'flex' }}>
+                                {conversionList?.conversion_target_type && conversionDataType === 'CONVERSION_DATA_ADMETRIC' && <div style={{ display: 'flex' }}>
                                     <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>转化行为</strong></p>
                                     <Form.Item name='conversionTargetType'>
                                         <Radio.Group>