wjx 1 yıl önce
ebeveyn
işleme
80d19aa803

+ 7 - 11
src/pages/launchSystemNew/launchManage/createAd/ad/modal/leadAd.tsx

@@ -197,14 +197,6 @@ function LeadAdModal(props: Props) {
     useEffect(() => {
         sceneTagsList.run({ typeList: ['WECHAT_POSITION', 'OFFICIAL_ACCOUNT_MEDIA_CATEGORY', 'MINI_PROGRAM_AND_MINI_GAME', 'PAY_SCENE'] })
     }, [])
-    useEffect(() => {
-        if (depthConversionEnabled) {
-            form.setFieldsValue({
-                optimizationMode: 'DEEP_CONVERSION_TARGET',
-                deepConversionType: behaviorList?.length > 0 ? 'DEEP_CONVERSION_BEHAVIOR' : worthList?.length > 0 ? 'DEEP_CONVERSION_WORTH' : ''
-            })
-        }
-    }, [depthConversionEnabled, behaviorList, worthList])
     // 数据回填
     useEffect(() => {
         if (dataInfo) {
@@ -282,6 +274,7 @@ function LeadAdModal(props: Props) {
                 date: moment().startOf('day').add(2, 'M'),
                 optimizationGoal: "OPTIMIZATIONGOAL_ECOMMERCE_ORDER",
                 bidStrategy: "BID_STRATEGY_TARGET_COST",
+                optimizationMode: 'DEEP_CONVERSION_TARGET',
                 bidAmount: '1000'
             })
         }
@@ -415,6 +408,8 @@ function LeadAdModal(props: Props) {
                     wechatSceneType: '0',
                     wechatPositionType: '0',
                     // optimizationGoal: 'OPTIMIZATIONGOAL_ECOMMERCE_ORDER',
+                    optimizationMode: 'DEEP_CONVERSION_TARGET',
+                    deepConversionType: behaviorList?.length > 0 ? 'DEEP_CONVERSION_BEHAVIOR' : worthList?.length > 0 ? 'DEEP_CONVERSION_WORTH' : '',
                     configuredStatus: 'AD_STATUS_SUSPEND',
                     siteSetPackage: [{ siteSet: ["SITE_SET_MOMENTS"], bidCoefficient: 1, deepBidCoefficient: 1 }, { siteSet: ["SITE_SET_WECHAT"], bidCoefficient: 1, deepBidCoefficient: 1 }]
                 }
@@ -575,8 +570,6 @@ function LeadAdModal(props: Props) {
             </Form.Item>
             <Form.Item label={<strong>出价方式<Tooltip title='出价方式不同将影响自定义人群,行为兴趣意向等某些功能无法使用'><ExclamationCircleOutlined style={{ color: '#e91e63', marginLeft: 5 }} /></Tooltip></strong>} name='bidMode' rules={[{ required: true, message: '请选择出价方式' }]}>
                 <Radio.Group onChange={(e) => {
-                    console.log(e.target.value);
-
                     if (e.target.value === "BID_MODE_CPM" || e.target.value === "BID_MODE_CPC") {
                         form.setFieldsValue({
                             optimizationGoal: null,
@@ -619,7 +612,10 @@ function LeadAdModal(props: Props) {
                             }
                             onChange={(e) => {
                                 if (e === 'OPTIMIZATIONGOAL_PAGE_SCAN_CODE') {
-                                    form.setFieldsValue({ depthConversionEnabled: true })
+                                    form.setFieldsValue({
+                                        depthConversionEnabled: true,
+                                        optimizationMode: 'DEEP_CONVERSION_TARGET'
+                                    })
                                 }
                             }}
                             allowClear

+ 1 - 9
src/pages/launchSystemNew/launchManage/createAd/ad/modal/wechat.tsx

@@ -177,14 +177,6 @@ function WeChatAdModal(props: Props) {
     useEffect(() => {
         sceneTagsList.run({ typeList: ['WECHAT_POSITION', 'OFFICIAL_ACCOUNT_MEDIA_CATEGORY', 'MINI_PROGRAM_AND_MINI_GAME', 'PAY_SCENE'] })
     }, [])
-    useEffect(() => {
-        if (depthConversionEnabled) {
-            form.setFieldsValue({
-                optimizationMode: 'DEEP_CONVERSION_TARGET',
-                deepConversionType: behaviorList?.length > 0 ? 'DEEP_CONVERSION_BEHAVIOR' : worthList?.length > 0 ? 'DEEP_CONVERSION_WORTH' : ''
-            })
-        }
-    }, [depthConversionEnabled, behaviorList, worthList])
     // 数据回填
     useEffect(() => {
         if (dataInfo) {
@@ -593,7 +585,7 @@ function WeChatAdModal(props: Props) {
                         <Select
                             style={{ width: 300 }}
                             onChange={(e) => {
-                                if (e === 'OPTIMIZATIONGOAL_FOLLOW') {
+                                if (e === 'OPTIMIZATIONGOAL_FOLLOW' || e === 'OPTIMIZATIONGOAL_PAGE_SCAN_CODE') {
                                     form.setFieldsValue({ depthConversionEnabled: true })
                                 }
                             }}