朱鑫波 4 rokov pred
rodič
commit
e5f2ee9f3c

+ 75 - 74
src/views/modules/kuaishouapp/account/stepForm/Step4.vue

@@ -195,7 +195,7 @@ li.chouzhen.first:before {
                       <div class="dynamically_add_form_item">
                         <a-form-item label>
                           <a @click="getVideoList('video', index, item, bestIndex)">选择视频</a>
-                          <a @click="uploadVideo(index, bestIndex)" style="margin-left: 10px">上传视频</a>
+                          <!-- <a @click="uploadVideo(index, bestIndex)" style="margin-left: 10px">上传视频</a> -->
                           <br />
                           <!-- <video
                             :src="item.videoList.url"
@@ -254,7 +254,6 @@ li.chouzhen.first:before {
                           >
                           <a
                             @click="showImages(index, bestIndex)"
-                            v-if="item.chouzhenShow"
                             style="margin-left: 10px"
                             :disabled="item.imageList.length >= 4"
                             >推荐封面</a
@@ -400,6 +399,8 @@ li.chouzhen.first:before {
               :token-separators="[',',' ',',']"
             >
             </a-select>
+             <a style="margin:0 10px" @click="collection('creativeTag')" :disabled="!getData('creativeTag')">收藏</a>
+            <a @click="showCunTitle('creativeTag')">收藏列表</a>
           </a-form-item>
 
           <a-form-item label="行动号召" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -441,6 +442,10 @@ li.chouzhen.first:before {
               ]"
               placeholder="请输入第三方点击监测链接"
             ></a-input>
+              <a v-if="getData('clickUrl')" @click="clickTrackUrlShow = true" style="margin-right: 10px"
+              >收藏监测链接</a
+            >
+            <a @click="getClickTrackUrlList()">监测链接列表</a>
           </a-form-item>
           <!-- , { validator: handleConfirmValue } -->
 
@@ -689,7 +694,7 @@ li.chouzhen.first:before {
                     <a @click="removeTitleCun(item)">删除</a>
                   </div>
                   <a-checkbox :value="item">
-                  {{ item.captions?item.captions:item.coverSlogans }}
+                  {{ item.captions?item.captions:item.coverSlogans?item.coverSlogans:item.tag }}
                   </a-checkbox>
                 </a-list-item>
 
@@ -791,9 +796,25 @@ export default {
       stickerStyles: [],
       captionsList: [{ captions: '' }],
       horizontalPhoto: [
-        { videoList: [], imageList: [], creativeMaterialType: '2', imageUrlList: [], checkArrImage: [] },
+        {
+          videoList: [],
+          imageList: [],
+          creativeMaterialType: '2',
+          imageUrlList: [],
+          checkArrImage: [],
+          chouzhenShow: false,
+        },
       ], //横板
-      verticalPhoto: [{ videoList: [], imageList: [], creativeMaterialType: '1', imageUrlList: [], checkArrImage: [] }], //竖版
+      verticalPhoto: [
+        {
+          videoList: [],
+          imageList: [],
+          creativeMaterialType: '1',
+          imageUrlList: [],
+          checkArrImage: [],
+          chouzhenShow: false,
+        },
+      ], //竖版
       trackName: '',
       showImageChouzhen: false,
       showImageStr: null,
@@ -942,8 +963,12 @@ export default {
       if (type == 'captionsList') {
         // this.captionsList.push({ captions: '' })
         params.captionsList = this.captionsList
-      } else {
+      } else if (type == 'creativeTag') {
         // this.coverSlogansList.push({ coverSlogans: '' })
+        params.creativeTag = this.getData('creativeTag').map((item) => {
+          return { tag: item }
+        })
+      } else {
         params.coverSlogansList = this.coverSlogansList
       }
       postAction('/kuaishou/collectionSlogans/add', params).then((res) => {
@@ -956,6 +981,7 @@ export default {
     deleteCaptions(index, type) {
       if (type == 'captionsList') {
         this.captionsList.splice(index, 1)
+      } else if (type == 'creativeTag') {
       } else {
         this.coverSlogansList.splice(index, 1)
       }
@@ -1012,7 +1038,7 @@ export default {
       params.accountId = localStorage.getItem('accountId')
       params.userId = this.userInfo().id
       params.trackName = this.trackUrlName
-      params.trackUrl = this.getData('clickTrackUrl')
+      params.trackUrl = this.getData('clickUrl')
       postAction('/kuaishou/kuaiShouTrackUrlCollection/add', params).then((res) => {
         if (res.success) {
           this.clickTrackUrlShow = false
@@ -1026,7 +1052,7 @@ export default {
     okClickTrackUrl(item) {
       this.clickTrackUrlList = false
       this.form.setFieldsValue({
-        clickTrackUrl: item.trackUrl,
+        clickUrl: item.trackUrl,
       })
     },
     removeClickTrackUrl(item) {
@@ -1092,7 +1118,7 @@ export default {
       var params = {}
       params.accountId = localStorage.getItem('accountId')
       params.userId = this.userInfo().id
-      params.type = typeAdd == 'captionsList' ? 2 : 1
+      params.type = typeAdd == 'captionsList' ? 2 : typeAdd == 'creativeTag' ? 3 : 1
       // params.pageNo = 1
       // params.pageSize = 500
       // /kuaishou/collectionSlogans/getByUserId?userId=12312312321&accountId=12&type=1
@@ -1116,6 +1142,16 @@ export default {
         params.captionsList = this.cunTitleList
         params.type = 'delete'
         typeAdd = 'captionsList'
+      } else if (item.tag) {
+        var index = this.cunTitleList.findIndex((v) => v.tag === item.tag)
+        this.cunTitleList.splice(index, 1)
+        var params = {}
+        params.userId = this.userInfo().id
+        params.accountId = localStorage.getItem('accountId')
+
+        params.creativeTag = this.cunTitleList
+        params.type = 'delete'
+        typeAdd = 'creativeTag'
       } else {
         var index = this.cunTitleList.findIndex((v) => v.coverSlogans === item.coverSlogans)
         this.cunTitleList.splice(index, 1)
@@ -1140,6 +1176,7 @@ export default {
         if (res.success) {
           this.$message.success('删除成功')
           this.getCunTitle(typeAdd)
+          this.guanggao = []
         }
       })
       // deleteAction('/kuaishou/kuaiShouTitleCollection/delete', {
@@ -1159,6 +1196,12 @@ export default {
           }
           this.captionsList = []
           this.captionsList.push(...this.guanggao)
+        } else if (this.guanggao[0].tag) {
+          this.form.setFieldsValue({
+            creativeTag: this.guanggao.map((t) => {
+              return t.tag
+            }),
+          })
         } else {
           if (this.guanggao.length > 6) {
             this.$message.error('封面广告语最多选择6条')
@@ -1411,13 +1454,6 @@ export default {
         this.active = 0
         this.time = []
         this.channelType = 0
-        //   var params = {}
-        //   params.accountId = localStorage.getItem('accountId')
-        //   params.materialType = this.getData('creativeMaterialType')
-        //   params.pageSize = this.ipagination.pageSize
-        //   params.pageNo = this.ipagination.current
-        //   params.params.channelType = 0 = 0
-        //   this.showVideoList('/kuaishou/batch/getVideoList', params)
       } else {
         this.$refs.check.showCheck(
           this.getData('creativeMaterialType'),
@@ -1480,39 +1516,11 @@ export default {
 
     handleSubmit(e) {
       e.preventDefault()
-      // var index = this.pans.findIndex((item) => item.key === this.pansKey)
-      // var data = this.pans[index].list.map((item) => {
-      //   return item.imageList.length + item.imageUrlList.length
-      // })
-      // if (this.contentAll > 15) {
-      //   this.$message.error('封面最多15张')
-      //   return
-      // }
 
       this.form.validateFields((err, values) => {
         if (!err) {
           this.loading = true
           var index = this.pans.findIndex((item) => item.key === this.pansKey)
-          // var data = this.verticalPhoto.map((item) => {
-          //   if (item.imageList.length > 0) {
-          //     return item.imageList.map((i) => {
-          //       return i.signature
-          //     })
-          //   } else {
-          //     return []
-          //   }
-          // })
-          // var dataTwo = this.horizontalPhoto.map((item) => {
-          //   if (item.imageList.length > 0) {
-          //     return item.imageList.map((i) => {
-          //       return i.signature
-          //     })
-          //   } else {
-          //     return []
-          //   }
-          // })
-          // var dataElse = tqFun(data)
-          // var dataTwoElse = tqFun(dataTwo)
 
           var params = {
             // dataJson: allJson,
@@ -1603,6 +1611,7 @@ export default {
         this.pans[index].imageList.push({
           imageList: [],
           creativeMaterialType: '1',
+          chouzhenShow: false,
         })
       })
     },
@@ -1655,17 +1664,17 @@ export default {
           }
         }
       }
-      if (arr.length + this.pans[bestIndex].list[nowIndex].imageList.length > 4) {
+      if (arr.length + this.pans[bestIndex].imageList[nowIndex].imageList.length > 4) {
         this.$message.error(
           '当前选择封面' +
             arr.length +
             '张,最多可选择' +
-            (4 - this.pans[bestIndex].list[nowIndex].imageList.length) +
+            (4 - this.pans[bestIndex].imageList[nowIndex].imageList.length) +
             '张'
         )
         return
       } else {
-        this.pans[bestIndex].list[nowIndex].imageList.push(...arr)
+        this.pans[bestIndex].imageList[nowIndex].imageList.push(...arr)
         this.chouzhen = false
         this.chouzhenList = []
         this.checkList = []
@@ -1677,15 +1686,16 @@ export default {
       this.chouzhenList = []
       nowIndex = index
       bestIndex = bestIndex
+
       var params = {
-        videoSignature: this.pans[bestIndex].list[index].videoList.signature,
-        pageSize: 20,
-        pageNo: 1,
+        md5Arr: this.pans[bestIndex].list[nowIndex].videoList.map((item) => {
+          return item.signature
+        }),
       }
-      getAction('/cutFrame/material/list', params).then((res) => {
+      postAction('/ctop/kuaishouProgramCreative/getProgramCreativeCover', params).then((res) => {
         console.log(res)
         if (res.success) {
-          this.chouzhenList.push(...res.result.records)
+          this.chouzhenList.push(...res.result)
         }
       })
     },
@@ -1725,18 +1735,18 @@ export default {
       }
       postAction('/kusiShouUpload/image', params).then((res) => {
         if (res.success) {
-          if (res.result.length + this.pans[bestIndex].list[nowIndex].imageList > 4) {
+          if (res.result.length + this.pans[bestIndex].imageList[nowIndex].imageList > 4) {
             this.$message.error(
               '当前上传封面' +
                 res.result.length +
                 '张,最多可上传' +
-                (4 - this.pans[bestIndex].list[nowIndex].imageList.length) +
+                (4 - this.pans[bestIndex].imageList[nowIndex].imageList.length) +
                 '张'
             )
             this.loadingImage = false
             return
           } else {
-            this.pans[bestIndex].list[nowIndex].imageList.push(...res.result)
+            this.pans[bestIndex].imageList[nowIndex].imageList.push(...res.result)
             this.closeImage()
             this.loadingImage = false
           }
@@ -1910,10 +1920,11 @@ export default {
         postAction('/kusiShouUpload/video', params).then((res) => {
           console.log(res)
           if (res.success) {
-            this.pans[bestIndex].list[nowIndex].videoList = {
+            this.pans[bestIndex].list[nowIndex].videoList.push({
               photoId: res.result.photoId,
               url: this.urlList.url,
-            }
+              coverUrl: res.result.coverUrl,
+            })
             this.loadingVideo = false
             this.closeVideo()
           } else {
@@ -1940,25 +1951,15 @@ export default {
       //
 
       this.pans[bestIndex].list[nowIndex].imageList = []
-      this.pans[bestIndex].list[nowIndex].videoList = this.checkVideo
+      if (this.pans[bestIndex].list[nowIndex].videoList.length >= 5) {
+        this.$message.error('最多选择五个视频')
+        return
+      }
+      this.pans[bestIndex].list[nowIndex].videoList = this.pans[bestIndex].list[nowIndex].videoList.concat(
+        this.checkVideo
+      )
       this.ipagination.current = 1
       this.visibleMatemal = false
-      // var params = {
-      //   videoSignature: this.checkVideo[0].signature,
-      //   pageSize: 20,
-      //   pageNo: 1,
-      // }
-      // getAction('/cutFrame/material/list', params).then((res) => {
-      //   console.log(res)
-      //   if (res.success) {
-      //     if (res.result.records.length > 0) {
-      //       this.pans[bestIndex].list[nowIndex].chouzhenShow = true
-      //     } else {
-      //       this.pans[bestIndex].list[nowIndex].chouzhenShow = false
-      //     }
-      //     this.visibleMatemal = false
-      //   }
-      // })
     },
     judge(item) {
       var re = /[(.*?)]/g

+ 2 - 2
vue.config.js

@@ -68,13 +68,13 @@ module.exports = {
     open : true,
     proxy: {
       '/jeecg-boot': {
-        //  target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+         target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
 
         // target: 'http://192.168.1.74:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        target: 'http://192.168.1.74:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        // target: 'http://192.168.1.74:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.170:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉