Parcourir la source

提交代码,推荐标题

zhuxinbo il y a 5 ans
Parent
commit
676638e5d9

+ 1 - 1
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -165,7 +165,7 @@
       </template>
     </a-modal>
     <a-modal title="拷贝" v-model="visibleCopy" :width="900">
-
+      <span style="color:red;display:block;width:100%;text-align:center;margin:10px">快手后台抽帧,程序化创意暂不支持被复制</span>
       <a-form :form="form">
         <a-form-item label="广告计划名称" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
           :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }">

+ 1 - 1
src/views/modules/kuaishouapp/account/copyGroup.vue

@@ -28,7 +28,7 @@
   <a-form @submit="handleSubmit" :form="form">
     <a-form-item label="目标应用" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }" v-if="campaignType == '2'">
-      <a-select v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]" showSearch allowClear
+      <a-select disabled v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]" showSearch allowClear
         placeholder="选择应用目标" optionFilterProp="children" style="width: 500px" @focus="handleFocus" @blur="handleBlur"
         @change="handleChange" :filterOption="filterOption">
         <a-select-option value="0">请选择目标应用</a-select-option>

+ 1 - 0
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -32,6 +32,7 @@
         v-if="campaignType == '2'"
       >
         <a-select
+          disabled
           v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]"
           showSearch
           allowClear

+ 148 - 4
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -143,6 +143,7 @@
 
                         </a-form-item>
                         <a-form-item label="广告语">
+                          <a @click="showTitle(index,bestIndex)">推荐广告语</a>
                           <a-textarea class="rending" placeholder="请输入广告语" v-model="item.description"
                             :autosize="{ minRows: 2, maxRows: 6 }"></a-textarea>
                           <a-tag v-for="(itemTag,indexTag) of tags" :key="indexTag"
@@ -290,10 +291,10 @@
           <ul v-if="dataSource.length>0" style="overflow:auto;padding-left:0">
             <a-checkbox-group v-model="checkVideo" @change="onChangeVideo">
               <li v-for="(item,index) of dataSource" :key="index" class="chouzhen">
-
-                <video class="video" :src="item.url" controls="controls" style="width:100%">
+                <img :src="item.coverUrl" alt="" style="width:100%" @click="matemalVideo(item,index)">
+                <!-- <video class="video" :src="item.url" controls="controls" style="width:100%">
                   您的浏览器不支持 video 标签。
-                </video>
+                </video> -->
                 <a-checkbox :value="item" style="position:absolute;z-index: 100;right:0;top:0;"></a-checkbox>
 
               </li>
@@ -318,7 +319,41 @@
           @change="getDataSource" />
       </div>
     </a-modal>
-
+    <a-modal title="查看视频" v-model="visibleVideo" :width="300" :footer="null">
+      <video class="video" :src="videoUrlShow" controls="controls" style="width:100%">
+        您的浏览器不支持 video 标签。
+      </video>
+    </a-modal>
+    <a-modal title="推荐标题" v-model="titleVisible" :width="1000" :footer="null">
+      <a-row :gutter="10">
+        <a-col :sm="10" style="margin-bottom: 20px;z-index: 10">
+          <a-card class="search-box" style="min-height:500px">
+            <div style="margin-bottom:30px">
+              <span style="display:inline-block;width:80px">行业</span>
+              <a-cascader style="margin-top: 1rem;width:300px" v-model="dataOne" :options="options"
+                :showSearch="{ filter }" expandTrigger="hover" @change="onChangeTitle" placeholder="请选择行业">
+                <a-icon type="smile" slot="suffixIcon" class="test" />
+              </a-cascader>
+            </div>
+            <div style="margin-bottom:30px">
+              <span style="display:inline-block;width:80px">关键词</span>
+              <a-input placeholder="请输入关键词" v-model="value" style="width: 300px" />
+            </div>
+            <span style="display:inline-block;width:80px;float:left"></span>
+            <a-button type="primary" @click="searchQuery" :disabled="value == ''">生成</a-button>
+          </a-card>
+        </a-col>
+        <a-col :sm="14" style="margin-bottom: 20px;z-index: 10">
+          <a-card class="search-box" style="over-flow:auto">
+            <a-list size="large" bordered :dataSource="title">
+              <a-list-item slot="renderItem" slot-scope="item">
+                <a slot="actions" @click="okTitle(item)">选择</a>
+                {{ item }}</a-list-item>
+            </a-list>
+          </a-card>
+        </a-col>
+      </a-row>
+    </a-modal>
   </a-card>
 </template>
 
@@ -354,8 +389,17 @@
     },
     data() {
       return {
+        titleVisible: false,
+        options: [],
+        data: [],
+        value: '',
+        dataOne: [],
+        title: [],
+
         tags: [],
         visibleMatemal: false,
+        visibleVideo: false,
+        videoUrlShow: "",
         time: [],
         channelType: 0,
         checkVideo: [],
@@ -463,6 +507,101 @@
       }
     },
     methods: {
+      showTitle(index, bestIndex) {
+        nowIndex = index
+        bestIndex = bestIndex
+        this.titleVisible = true;
+        this.getHangye()
+      },
+      okTitle(item) {
+        this.pans[bestIndex].list[nowIndex].description = item
+        this.titleVisible = false;
+        this.dataOne = []
+        this.value = ""
+        this.title = []
+      },
+      searchQuery() {
+        // /ctop/creativeTitle/titleSuggestion
+        console.log(this.value)
+        getAction('/ctop/creativeTitle/titleSearch', {
+          firstCategory: this.dataOne[0],
+          secondCategory: this.dataOne[1],
+          keywords: this.value
+        }).then(res => {
+          console.log(res)
+          this.title = res.result ? res.result : []
+        })
+        // firstCategory,secondCategory,keywords
+      },
+      getHangye() {
+        getAction('/ctop/creativeTitle/getTitleLabel', '').then(res => {
+          console.log(res)
+          if (res.success) {
+            this.options = res.result.map(item => {
+              return {
+                label: item.label,
+                value: item.value,
+                children: item.children.length > 0 ? [{
+                  label: '不限',
+                  value: 0
+                }].concat(item.children) : [{
+                  label: '不限',
+                  value: 0
+                }]
+              }
+            })
+            this.options = [{
+              label: '不限',
+              value: 0
+            }].concat(this.options)
+            if (this.dataOne.length > 0) {
+              return
+            } else {
+              this.dataOne = [0]
+            }
+
+          }
+        })
+      },
+      onChangeTitle(value, selectedOptions) {
+        console.log(value, selectedOptions)
+        this.dataOne = value
+        this.value = ''
+        this.title = []
+      },
+
+      filter(inputValue, path) {
+        return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
+      },
+
+      handleSearch(value) {
+        if (this.dataOne.length > 0) {
+          const str = {
+            firstCategory: this.dataOne[0],
+            secondCategory: this.dataOne[1],
+            keyword: value
+          }
+          getAction('/ctop/creativeTitle/titleSuggestion', str).then(d => {
+            const result = d.result ? d.result : []
+            this.data = result.map(item => {
+              return {
+                value: item,
+                text: item
+              }
+            })
+          })
+        } else {
+          this.data = []
+          return
+        }
+      },
+
+
+
+      matemalVideo(item) {
+        this.visibleVideo = true
+        this.videoUrlShow = item.url
+      },
       onChange(checkedList) {
         this.indeterminate = !!checkedList.length && checkedList.length < this.chouzhenList.length;
         this.checkAll = checkedList.length === this.chouzhenList.length;
@@ -1221,6 +1360,11 @@
           this.ipagination.current = 1
           this.showVideoList('/kuaishou/batch/getVideoList', params)
         }
+      },
+      visibleVideo(n, o) {
+        if (!n) {
+          closeAllVideoFun()
+        }
       }
     },
     mounted: function () {