Jelajahi Sumber

提交测试

zhuxinbo 5 tahun lalu
induk
melakukan
00a86f5730

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

@@ -421,6 +421,7 @@ export default {
         postAction('/kuaishou/batch/campaignCreate', params).then(res => {
           if (res.success) {
             this.jihua = true
+            this.loadingGroup = false
             this.refuseReason = ''
             this.unitId = ''
             // 7156834

+ 2 - 1
src/views/modules/kuaishouapp/account/originality.vue

@@ -21,7 +21,7 @@
         <!-- :tabList="title" :activeTabKey="titleKey" @tabChange="key => onTabChange(key, 'titleKey')" -->
         <a-tabs v-model="titleKey" type="editable-card" hideAdd @edit="remove" @change="onTabChange">
           <a-tab-pane v-for="pane in title" :tab="pane.tab" :key="pane.key">
-            <a-button @click="dianji" style="margin-bottom:15px">新增创意</a-button>
+            <a-button @click="dianji" style="margin-bottom:15px" :disabled="ipagination.total==15">新增创意</a-button>
             <div v-show="selectedRowKeys.length > 0">
               批量操作:
               <a-select style="width: 120px" v-model="allType">
@@ -460,6 +460,7 @@ export default {
               showSwich: v.putStatus == 1 ? true : false
             }
           })
+          this.ipagination.total = res.result.total
         }
       })
     },

+ 31 - 14
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -39,9 +39,7 @@
           <a-form-item label="创意内容" :labelCol="labelCol">
             <a-layout>
               <a-layout-content style="padding:10px;">
-                <div :style="{ marginBottom: '16px' }">
-                  <a-button @click="addCreative(bestIndex)">添加创意</a-button>
-                </div>
+
                 <a-row>
                   <a-col :span="24" v-for="(item, index) of pane.list" :key="index">
                     <a-card title :ref="item">
@@ -56,9 +54,6 @@
                             v-if="item.videoList"></video>
                         </a-form-item>
                         <div class="downLoad" style="overflow:auto">
-                          <!-- <a-button @click="onCheckAllImageChange(index,item)" v-if="item.imageUrlList.length > 0">{{
-                            item.checkAllImage ? '取消  (  ' + item.checkArrImage.length + '  )' : '全选'
-                            }}</a-button> -->
                           <ul class="actor-photo-list"
                             :style="{ width: item.imageUrlList.length>4?25 * item.imageUrlList.length + '%':'100%' }"
                             v-if="item.imageUrlList.length > 0">
@@ -88,14 +83,15 @@
                     </a-card>
                   </a-col>
                 </a-row>
+                <div :style="{ marginBottom: '16px' }">
+                  <a-button @click="addCreative(bestIndex)"
+                    :disabled="contentAll>=15||(pans[0].list[pans[0].list.length-1].imageUrlList.length==0&&pans[0].list[pans[0].list.length-1].imageList.length==0)">
+                    添加创意</a-button>
+                </div>
               </a-layout-content>
             </a-layout>
           </a-form-item>
           <a-form-item label="行动号召" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <!-- <a-radio-group buttonStyle="solid" v-decorator="['action_bar_text', { initialValue: '1' }]">
-              <a-radio-button value="1">竖版视频</a-radio-button>
-              <a-radio-button value="2">横版视频</a-radio-button>
-            </a-radio-group> -->
             <a-select v-decorator="['actionBarText', { rules: [{ required: true, message: '行动号召按钮文案' }] }]" showSearch
               allowClear placeholder="选择行动号召按钮文案" optionFilterProp="children" :filterOption="filterOption">
               <a-select-option v-for="appModel in appList" :key="appModel.id" :value="appModel.actionBarText">
@@ -140,7 +136,7 @@
         </div>
       </div>
       <template slot="footer">
-        <a-button key="back" @click="handleCancel">关闭</a-button>
+        <!-- <a-button key="back" @click="handleCancel">关闭</a-button> -->
         <a-button key="submit" type="primary" @click="handleOk">
           返回列表
         </a-button>
@@ -220,7 +216,8 @@
         loading: false,
         imageUrlList: [],
         checkAllImage: false,
-        checkArrImage: []
+        checkArrImage: [],
+        content: 0
       }
     },
     methods: {
@@ -319,6 +316,8 @@
         this.form.resetFields()
         if (this.pans.length == 0) {
           this.$bus.$emit('remove', '/account/stepForm')
+        } else {
+          this.addCreative(0)
         }
       },
       handleOk() {
@@ -340,7 +339,7 @@
         var data = this.pans[index].list.map(item => {
           return item.imageList.length + item.imageUrlList.length
         })
-        if (eval(data.join('+')) > 15) {
+        if (this.contentAll> 15) {
           this.$message.error('封面最多15张')
           return
         }
@@ -455,6 +454,14 @@
         d = d < 10 ? '0' + d : d
 
         return 'video/' + y + '-' + MM + '-' + d + '/'
+      },
+      contentAll() {
+        var count, arr = []
+        for (let i = 0; i < this.pans[0].list.length; i++) {
+
+          arr.push(...this.pans[0].list[i].imageUrlList, ...this.pans[0].list[i].imageList)
+        }
+        return arr.length + this.content
       }
     },
     watch: {},
@@ -466,8 +473,18 @@
             list: []
           }
         })
-        console.log(this.pans)
+
         this.pansKey = this.pans[0].key
+        this.addCreative(0)
+        //  unitId: this.pansKey,
+        //               accountId: localStorage.getItem('accountId')
+        getAction('/kuaishou/batch/checkCreativeCount', {
+          unitId: this.pansKey,
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          console.log(res)
+          this.content = res.result
+        })
         getAction('/kuaishou/batch/getActionBarText', {
           campaignId: localStorage.getItem('campaignId')
         }).then(res => {

+ 3 - 0
src/views/modules/kuaishouapp/account/stepForm/stepModule/checkMatemal.vue

@@ -122,6 +122,9 @@ export default {
       params.materialType = typeName
       params.pageSize = this.ipagination.pageSize
       params.pageNo = this.ipagination.current
+      if(typeString == 'video'){
+          params.channelType = 0
+      }
       this.active = typeString
       this.numberType = typeName
       this.url.list = url