Ver código fonte

middle 账户配置迭代 下载链接

jiayufei 4 anos atrás
pai
commit
79e356c7f5

BIN
src/assets/img/spLbLAbh.jpg


+ 2 - 2
src/views/modules/account-config/account-config-server.js

@@ -3,7 +3,7 @@
  * @author jiayufei
  */
 
-export const urlAcount = 'http://118.24.244.213:8080'; // 线上
+// export const urlAcount = 'http://118.24.244.213:8080'; // 线上
 // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
-// export const urlAcount = 'http://192.168.1.43:8080'; // 子安
+export const urlAcount = 'http://192.168.1.43:8080'; // 子安
 // export const urlAcount = 'http://139.186.165.84:8080'; // 测试

+ 68 - 0
src/views/modules/account-config/components/configuration-modal.less

@@ -234,6 +234,25 @@
             .adver-position-radio {
                 margin-left: 140px;
                 margin-bottom: 15px;
+                .create-web-url-class {
+                    width: 320px;
+                    height: 110px;
+                    background-color: #f9f8f8;
+                    display: flex;
+                    .web-url-img {
+                        width: 53px;
+                        img {
+                            width: 100%;
+                        }
+                    }
+                    .web-url-content {
+                        margin-top: 10px;
+                        margin-left: 10px;
+                        .url-content-id {
+                            margin-top: 10px;
+                        }
+                    }
+                }
                 .creative-label-content {
                     width: 400px;
                     height: 200px;
@@ -269,4 +288,53 @@
             }
         }
     }
+}
+.web-url-modal {
+    width: 1000px !important;
+    .mater-viedo-content {
+        .viedo-header-class {
+            display: flex;
+            justify-content: space-between;
+            border-bottom: 1px solid #eee;
+            .refush-btn-mat {
+                margin-left: 20px;
+            }
+        }
+        .viedo-serach-class {
+            margin-top: 20px;
+        }
+        .viedo-content-class {
+            .viedo-content-group {
+                display: flex;
+                flex-wrap: wrap;
+            }
+            .content-modal-li {
+                border: 1px solid #e4e4e4;
+                width: 180px;
+                height: 425px;
+                text-align: center;
+                position: relative;
+                margin: 0 10px 10px 0;
+                .checkbox-select-show,
+                .checkbox-select-time {
+                    text-align: left;
+                    margin-top: 14px;
+                    padding-left: 10px;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                }
+                img {
+                    width: 90%;
+                    margin-top: 20px;
+                }
+                .viedo-content-checkbox {
+                    position: absolute;
+                    z-index: 100;
+                    left: 0;
+                    top: 0;
+                }
+            }
+        }
+    }
 }

+ 155 - 2
src/views/modules/account-config/components/configuration-modal.vue

@@ -201,6 +201,27 @@
                         allow-clear
                     />
                 </a-form-model-item>
+                <a-form-model-item v-if="platformLoadingType === 'APP_ANDROID'" label="应用下载详情页" prop="creativeWebUrl">
+                    <a-input
+                        class="common-input-long"
+                        v-model="configForm.creativeWebUrl"
+                        placeholder="请输入应用下载详情页"
+                        disabled
+                    />
+                    <span style="margin-left: 10px;"><a :disabled="modalTitle === 'edit'" @click="handleHaveWebUrl">使用已有</a></span>
+                </a-form-model-item>
+                <div v-if="platformLoadingType === 'APP_ANDROID'" class="adver-position-radio">
+                    <div class="create-web-url-class">
+                        <div class="web-url-img">
+                            <img v-if="landingPageShowData.thumbnail" :src="landingPageShowData.thumbnail"/>
+                            <img v-else src="@/assets/noImg.png"/>
+                        </div>
+                        <div class="web-url-content">
+                            <div class="url-content-name"><a>{{ landingPageShowData.name }}</a></div>
+                            <div class="url-content-id">ID:{{ landingPageShowData.siteId || '暂无' }}</div>
+                        </div>
+                    </div>
+                </div>
                 <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="优先应用商店下载">
                     <a-radio-group
                         v-model="configForm.adDownloadMode"
@@ -934,6 +955,42 @@
             </div>
         </a-form-model>
     </div>
+    <a-modal
+        v-if="isWebUrl"
+        title="使用落地页"
+        :visible="isWebUrl"
+        dialog-class="web-url-modal"
+        :footer="false"
+        @cancel="handleCancelAll"
+    >
+        <div class="mater-viedo-content">
+            <a-row class="viedo-serach-class" :gutter="24">
+                <a-col :span="9">
+                    <a-form-item label="落地页名称" :labelCol="modalCol" :wrapperCol="modalWrapper">
+                        <a-input v-model="weburlModel" placeholder="请输入落地页名称关键字"/>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="4">
+                    <a-button type="primary" style="position: relative;top: 4px;" @click="handleWebUrlSearch">搜索</a-button>
+                </a-col>
+            </a-row>
+            <div class="viedo-content-class">
+                <div class="viedo-content-group">
+                    <li
+                        class="content-modal-li"
+                        v-for="(item, index) in viedoDefaultList"
+                        :key="index"
+                        @click="handleViedoListClick(item)"
+                    >
+                        <img v-if="item.thumbnail" :src="item.thumbnail"/>
+                        <img v-else src="@/assets/noImg.png"/>
+                        <div class="checkbox-select-show"><a>{{ item.name }}</a></div>
+                        <div class="checkbox-select-time">ID:{{ item.siteId }}</div>
+                    </li>
+                </div>
+            </div>
+        </div>
+    </a-modal>
 </div>
 </template>
 <script>
@@ -1043,6 +1100,23 @@ export default {
             }
         };
         return {
+            landingPageShowData: {},
+            weburlModel: '',
+            modalCol: {
+                lg: {span: 6},
+                sm: {span: 6},
+                xs: {span: 6},
+                md: {span: 6}
+            },
+            modalWrapper: {
+                lg: {span: 18},
+                sm: {span: 18},
+                xs: {span: 14},
+                md: {span: 14}
+            },
+            viedoDefaultList: [],
+            viedoDefaultListUpdate: [],
+            isWebUrl: false,
             sureLoading: false,
             subTitleMsgStatus: false,
             subTitleMsg: '',
@@ -1317,6 +1391,7 @@ export default {
                     {required: true, message: '请输入', trigger: 'blur'},
                     {min: 1, max: 7, message: '请输入1-7个字', trigger: 'blur'}
                 ],
+                creativeWebUrl: [{required: true, message: '请选择', trigger: 'blur'}],
                 adAudiencePackageId: [{required: true, message: '请选择', trigger: 'change'}],
                 creativeCallToAction: [{required: true, message: '请选择', trigger: 'change'}],
                 adConvertType: [{required: true, message: '请选择', trigger: 'change'}],
@@ -1324,6 +1399,7 @@ export default {
                 creativeThirdIndustryIds: [{required: true, message: '请选择', trigger: 'change'}]
             },
             configForm: {
+                creativeWebUrl: '',
                 adAppType: '',
                 adDirectionalFlag: 'add',
                 adInterestActionMode: 'UNLIMITED',
@@ -1453,6 +1529,13 @@ export default {
             if (newVal) {
                 this.configForm.adAppType = newVal;
             }
+            if (newVal && this.configForm.accountId) {
+                this.handleGetChengZiSite();
+            }
+            else {
+                this.landingPageShowData = {};
+                this.configForm.creativeWebUrl = '';
+            }
         },
         NewAdExternalUrl(newVal, oldVal) {
             if (newVal && this.configForm.accountId) {
@@ -1496,11 +1579,18 @@ export default {
                 };
                 this.handleGetOptimizationObjective(paramsData);
             }
+            if (newVal && this.platformLoadingType) {
+                this.handleGetChengZiSite();
+            }
+            else {
+                this.landingPageShowData = {};
+                this.configForm.creativeWebUrl = '';
+            }
             if (newVal) {
                 this.handleGetCreativeClassification();
                 this.handleGetAdvertiserStrategy();
                 this.handleDirectionalList();
-                this.handleGetAdAudiencePackage()
+                this.handleGetAdAudiencePackage();
             }
             else {
                 this.createOptions = [];
@@ -1523,6 +1613,43 @@ export default {
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
         moment,
+        handleGetChengZiSite() {
+            const paramsData = {
+                accountId: this.configForm.accountId
+            };
+            getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getChengZiSite', paramsData).then(result => {
+                if (result.code === 0) {
+                    this.viedoDefaultList = result.result;
+                    this.viedoDefaultListUpdate = result.result;
+                }
+                else {
+                    this.$message.error(result.message);
+                }
+            }).catch(error => {
+                console.log(error, 'eeee');
+            });
+        },
+        handleViedoListClick(data) {
+            this.landingPageShowData = data;
+            this.configForm.creativeWebUrl = data.creativeWebUrl;
+            this.isWebUrl = false;
+        },
+        handleWebUrlSearch() {
+            let defaultList = [];
+            this.viedoDefaultListUpdate.forEach(item => {
+                if (item.name && item.name.indexOf(this.weburlModel) !== -1) {
+                    defaultList.push(item);
+                }
+            });
+            this.viedoDefaultList = defaultList;
+        },
+        handleCancelAll() {
+            console.log('素材取消按钮');
+            this.isWebUrl = false;
+        },
+        handleHaveWebUrl() {
+            this.isWebUrl = true;
+        },
         handleAdhideConver(e) {
             const defaultValue = e.target.value;
             if (defaultValue === 'CUSTOMER' || defaultValue === 'APP') {
@@ -1934,6 +2061,9 @@ export default {
         },
         handleAdDownLoadType(e) {
             this.optimizationOption = [];
+            this.landingPageShowData = {};
+            this.configForm.creativeWebUrl = '';
+            this.platformLoadingType = '';
             const defaultValue = e.target.value;
             if (defaultValue === 'DOWNLOAD_URL') {
                 this.configForm.adExternalUrl = '';
@@ -2024,6 +2154,22 @@ export default {
                         this.configForm.adConvertType = detailData.adConvertType || '';
                         this.configForm.adDistrict = detailData.adDistrict || 'NONE';
                         this.configForm.adAppType = detailData.adAppType;
+                        getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getChengZiSite', {accountId: detailData.accountId}).then(result => {
+                            if (result.code === 0) {
+                                const defaultResult = result.result;
+                                defaultResult.forEach(item => {
+                                    if (item.creativeWebUrl === detailData.creativeWebUrl) {
+                                        this.landingPageShowData = item;
+                                    }
+                                });
+                                this.configForm.creativeWebUrl = detailData.creativeWebUrl;
+                            }
+                            else {
+                                this.$message.error(result.message);
+                            }
+                        }).catch(error => {
+                            console.log(error, 'eeee');
+                        });
                         if (detailData.adDownloadType === 'DOWNLOAD_URL') {
                             this.handleGetPackage();
                         }
@@ -2320,7 +2466,14 @@ export default {
             });
         },
         handleDownloadLink(e) {
-            this.handleGetPackage();
+            const defaultValue = e.target.value;
+            if (defaultValue) {
+                this.handleGetPackage();
+            }
+            else {
+                this.platformLoadingType = '';
+                this.configForm.adPackage = '';
+            }
         },
         handleDeleteImg() {
             this.imageUrl = '';