Przeglądaj źródła

提交代码,切换分支

朱鑫波 4 lat temu
rodzic
commit
e7a4ac4c8e

+ 2 - 1
public/index.html

@@ -9,7 +9,8 @@
   <title>汇创投放助手</title>
   <link rel="icon" href="<%= BASE_URL %>logo.png">
   <link href="<%= BASE_URL %>color.less">
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.2.5/polyfill.js"></script>
+  <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.2.5/polyfill.js"></script> -->
+  <script src="<%= BASE_URL %>polyfill.js"></script>
   <script src="<%= BASE_URL %>web-office-sdk-v1.1.1.umd.js"></script>
   <style>
     html,

Plik diff jest za duży
+ 6953 - 0
public/polyfill.js


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

@@ -947,15 +947,15 @@
                 this.allForm.success = res.result.success
                 this.loading = false
                 if (res.result.success.length > 0) {
-                  var dataJson = JSON.stringify(
-                    res.result.success.map(item => {
+                  var dataElse =  res.result.success.map(item => {
                       return {
                         tab: item.unitName,
                         key: item.unitId,
-                        bidType: item.ocpxActionType
+                        bidType: item.ocpxActionType,
+                        sceneId:JSON.stringify(item.sceneId)
                       }
                     })
-                  )
+                  var dataJson = JSON.stringify(dataElse)
                   localStorage.setItem('pans', dataJson)
                   localStorage.setItem('appId', this.getData('appId'))
                 }

+ 52 - 28
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -125,7 +125,8 @@
           <a-form-item label="广告组名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-input v-model="pane.tab" readOnly></a-input>
           </a-form-item>
-          <a-form-item label="素材类型" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="JSON.parse(pane.sceneId).indexOf(1)>0||JSON.parse(pane.sceneId).indexOf(3)>0||JSON.parse(pane.sceneId).indexOf(6)>0">
+
+          <a-form-item label="素材类型" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="pane.sceneId.indexOf(1)>=0||pane.sceneId.indexOf(3)>=0||pane.sceneId.indexOf(6)>=0">
             <a-radio-group buttonStyle="solid" v-decorator="['creativeMaterialType', { initialValue: '1' }]"  @change="changeType(bestIndex)">
               <a-radio-button value="1">竖版视频</a-radio-button>
               <a-radio-button value="2">横版视频</a-radio-button>
@@ -136,7 +137,7 @@
           <!-- <a-form-item label="素材同步" :labelCol="labelCol" :wrapperCol="wrapperCol">
            
           </a-form-item> -->
-          <a-form-item label="创意内容" :labelCol="labelCol"  v-if="JSON.parse(pane.sceneId).indexOf(1)>=0||JSON.parse(pane.sceneId).indexOf(3)>=0||JSON.parse(pane.sceneId).indexOf(6)>=0">
+          <a-form-item label="创意内容" :labelCol="labelCol"  v-if="pane.sceneId.indexOf(1)>=0||pane.sceneId.indexOf(3)>=0||pane.sceneId.indexOf(6)>=0">
             <a-layout>
               <a-layout-content style="padding:10px;">
 
@@ -213,7 +214,7 @@
             </a-layout>
           </a-form-item>
 
-          <a-form-item label="便利贴广告" :labelCol="labelCol"  v-if="JSON.parse(pane.sceneId).indexOf(7)>=0">
+          <a-form-item label="便利贴广告" :labelCol="labelCol"  v-if="pane.sceneId.indexOf(7)>=0">
             <a-layout>
               <a-layout-content style="padding:10px;">
 
@@ -240,7 +241,7 @@
                         </div>
                         <a-form-item label="">
                           <a @click="getVideoList('image', index, item, bestIndex)">选择封面</a>
-                          <a @click="uploadImages(index,bestIndex,item)" style="margin-left:10px">上传封面</a>
+                          <a @click="uploadImages(index,bestIndex,item,'postAdList')" style="margin-left:10px">上传封面</a>
                           <a @click="showImages(index,bestIndex)" v-if="item.chouzhenShow"
                             style="margin-left:10px">推荐封面</a>
                           <br />
@@ -267,7 +268,7 @@
                             @click="getChange(item, itemTag, index)">{{itemTag.name}}</a-tag>
                         </a-form-item>
                         
-                        <a-form-item label="创意标题">
+                        <a-form-item label="短广告语">
                             <a-textarea class="rending" placeholder="请输入短广告语" v-model.trim="item.shortSlogan"
                             :autosize="{ minRows: 2, maxRows: 6 }" :maxLength="8"></a-textarea>
                             <span v-if="item.shortSlogan.length>8" style="color:red">短广告语长度不能超过30个字符</span>
@@ -739,7 +740,8 @@
         messageTip: null,
         verticalPhoto:[],
         horizontalPhoto:[],
-        creativeMaterialType:'1'
+        creativeMaterialType:'1',
+        postAdTrue:false,
       }
     },
     methods: {
@@ -1278,17 +1280,17 @@
             }
             console.log(params)
             this.loading = false
-            // postAction('/kuaishou/batch/createCreative', params).then(res => {
-            //   if (res.success) {
-            //     this.visible = true
-            //     this.allForm.fail = res.result.fail
-            //     this.allForm.success = res.result.success
-            //     this.loading = false
-            //   } else {
-            //     this.loading = false
-            //     this.$message.error(res.message)
-            //   }
-            // })
+            postAction('/kuaishou/batch/createCreative', params).then(res => {
+              if (res.success) {
+                this.visible = true
+                this.allForm.fail = res.result.fail
+                this.allForm.success = res.result.success
+                this.loading = false
+              } else {
+                this.loading = false
+                this.$message.error(res.message)
+              }
+            })
           }
         })
       },
@@ -1422,12 +1424,18 @@
           }
         })
       },
-      uploadImages(index, bestIndex,item) {
+      uploadImages(index, bestIndex,item,type) {
+
         nowIndex = index
         bestIndex = bestIndex
         this.addImageVisible = true
         this.loadingImage = false
         this.creativeMaterialType = item.creativeMaterialType 
+        if(type){
+          this.postAdTrue = true
+        }else{
+          this.postAdTrue = false
+        }
       },
       closeImage() {
         this.addImageVisible = false
@@ -1459,15 +1467,28 @@
         }
         postAction("/kusiShouUpload/image", params).then(res => {
           if (res.success) {
-            if (res.result.length + this.contentAll > 15) {
-              this.$message.error('当前上传封面' + res.result.length + '张,最多可上传' + (15 - this.contentAll) + '张')
-              this.loadingImage = false
-              return
-            } else {
-              this.pans[bestIndex].list[nowIndex].imageList.push(...res.result)
-              this.closeImage()
-              this.loadingImage = false
+            if(!this.postAdTrue){
+              if (res.result.length + this.contentAll > 15) {
+                this.$message.error('当前上传封面' + res.result.length + '张,最多可上传' + (15 - this.contentAll) + '张')
+                this.loadingImage = false
+                return
+              } else {
+                this.pans[bestIndex].list[nowIndex].imageList.push(...res.result)
+                this.closeImage()
+                this.loadingImage = false
+              }
+            }else{
+              if (res.result.length + this.contentAll > 15) {
+                this.$message.error('当前上传封面' + res.result.length + '张,最多可上传' + (15 - this.contentAll) + '张')
+                this.loadingImage = false
+                return
+              } else {
+                this.pans[bestIndex].postAdList[nowIndex].imageList.push(...res.result)
+                this.closeImage()
+                this.loadingImage = false
+              }
             }
+           
 
           } else {
             this.$message.error('封面上传失败')
@@ -1866,10 +1887,13 @@
             return {
               ...item,
               list: [],
-              postAdList:[]
+              postAdList:[],
+              sceneId:JSON.parse(item.sceneId).map(item=>{
+                return parseInt(item)
+              })
             }
           })
-          this.sceneIdValue = (JSON.parse(this.pans[0].sceneId).indexOf(1)>0||JSON.parse(this.pans[0].sceneId).indexOf(3)>0||JSON.parse(this.pans[0].sceneId).indexOf(6)>0)?'1':'4'
+          console.log(this.pans)
           this.pansKey = this.pans[0].key
           setTimeout(() => {
             this.addCreative(0)