|
@@ -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 () {
|