소스 검색

快手创意创建、素材管理、应用管理页面以及素材封面查询页面调整

刘政和 5 년 전
부모
커밋
72b7cc31ed

+ 1 - 1
src/utils/request.js

@@ -8,7 +8,7 @@ import {ACCESS_TOKEN} from "@/store/mutation-types"
 // 创建 axios 实例
 const service = axios.create({
   baseURL: '/jeecg-boot', // api base_url
-  timeout: 600000 // 请求超时时间
+  timeout: 6000000 // 请求超时时间
 })
 
 const err = (error) => {

+ 6 - 6
src/views/modules/bytedance/model/InternalModel.vue

@@ -12,7 +12,7 @@
             optionFilterProp="children"
             style="width: 200px"
           >
-            <a-select-option v-for="user in userList" :key="user.accountId" :value="user.accountId">{{user.authName}}</a-select-option>
+            <a-select-option v-for="user in userList" :key="user.id" :value="user.id">{{user.accountName}}</a-select-option>
           </a-select>
       </a-form-item>
 
@@ -42,7 +42,7 @@
           <a-radio-button value="2">原生</a-radio-button>
         </a-radio-group>
       </a-form-item>
-      <a-form-item
+      <!--<a-form-item
         label="广告类别"
         :labelCol="labelCol"
         :wrapperCol="wrapperCol">
@@ -53,7 +53,7 @@
           <a-radio-button value="5">内广</a-radio-button>
           <a-radio-button value="7">补量</a-radio-button>
         </a-radio-group>
-      </a-form-item>
+      </a-form-item>-->
       <a-form-item
         label="投放目标"
         :labelCol="labelCol"
@@ -373,7 +373,7 @@
         form: this.$form.createForm(this),
         url: {
           urllist: '/ctop/bytedanceUrlInfo/list',
-          userAllocationList:'/template/allocation/list',
+          userAllocationList:'/template/bind/login/list',
           dictListUrl: 'toutiao/dictitem/list',
           insertUrl: 'test/create',
           convertList:'template/convert/list/url'
@@ -556,7 +556,7 @@
         console.log("目标转化出价:" + this.convertPrice);
 
         params.templateName = this.templateName;
-
+        params.accountId = this.accountId;
         params.deliveryRange = this.deliveryRange;
         params.deliveryForm =this.deliveryForm;
         params.adCategory =this.adCategory;
@@ -651,7 +651,7 @@
       this.refreshUrl("android");
       let params = {};
       params.pageSize = '1000';
-      params.mediaId='1';
+      params.id = this.accountId;
       postAction(this.url.userAllocationList, params).then((res) => {
         if (res.success) {
           this.userList = res.result.records

+ 30 - 20
src/views/modules/kuaishouapp/creativeCreate.vue

@@ -17,7 +17,8 @@
             v-for="userAccount in accountList"
             :key="userAccount.accountId"
             :value="userAccount.accountId"
-          >{{userAccount.authName}}</a-select-option>
+          >{{userAccount.authName}}
+          </a-select-option>
         </a-select>
       </a-form-item>
 
@@ -157,7 +158,8 @@
                           class="video"
                           :src="video.localUrl"
                           controls="controls"
-                        >您的浏览器不支持 video 标签。</video>
+                        >您的浏览器不支持 video 标签。
+                        </video>
                         <a-checkbox :value="video.localUrl" class="checkbox_item">
                           <div class="item_txt">{{video.videoName}}</div>
                         </a-checkbox>
@@ -220,7 +222,7 @@
                 <div class="image_item_container">
                   <div v-for="(item ,index) in imageList" class="image_item" :key="index">
                     <label :for="item.id" class="label_item">
-                      <img :src="item.src" alt class="item_img" />
+                      <img :src="item.src" alt class="item_img"/>
                       <p class="item_text">{{item.name}}</p>
                       <p class="item_checkbox">
                         <input
@@ -308,12 +310,12 @@
                 @click="checkAll($event)"
                 class="select_all"
               /> 全选
-              <br />
-              <br />
+              <br/>
+              <br/>
               <div class="image_item_container">
                 <div v-for="(item ,index) in imageList" class="image_item" :key="index">
                   <label :for="item.id" class="label_item">
-                    <img :src="item.src" alt class="item_img" />
+                    <img :src="item.src" alt class="item_img"/>
                     <p class="item_text">{{item.name}}</p>
                     <p class="item_checkbox">
                       <input
@@ -371,12 +373,13 @@
             v-for="actionBar in actionBarTextList"
             :key="actionBar.id"
             :value="actionBar.actionBarText"
-          >{{actionBar.actionBarText}}</a-select-option>
+          >{{actionBar.actionBarText}}
+          </a-select-option>
         </a-select>
       </a-form-item>
 
       <a-form-item label="作品广告语" :labelCol="labelCol" :wrapperCol="wrapperCol">
-        <a-textarea style="width: 650px" v-model="description" :rows="2" />
+        <a-textarea style="width: 650px" v-model="description" :rows="2"/>
       </a-form-item>
 
       <a-form-item label="创意名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -402,7 +405,7 @@
       </a-form-item>
 
       <a-form-item :wrapperCol="{ span: 24 }" style="text-align: center">
-        <a-button htmlType="submit" type="primary">提交</a-button>
+        <a-button htmlType="submit" type="primary" :loading="loading">提交</a-button>
         <a-button style="margin-left: 8px">保存</a-button>
       </a-form-item>
     </a-form>
@@ -410,8 +413,8 @@
 </template>
 
 <script>
-  import { getAction, postAction } from '@/api/manage'
-  import { mapGetters } from 'vuex'
+  import {getAction, postAction} from '@/api/manage'
+  import {mapGetters} from 'vuex'
   import UploadToAli from '@femessage/upload-to-ali'
   import moment from 'moment'
   import VuePreview from 'vue-preview'
@@ -484,6 +487,7 @@
         isAllChecked: false,
         showClickTrackUrl: true,
         showImpressionUrl: false,
+        loading: false,
         impressionUrl: '',
         positionType: '',
         checkeds: [],
@@ -614,7 +618,7 @@
         this.haveSinglePicimagesList = []
       },
 
-      checkeda: function(id) {
+      checkeda: function (id) {
         let indexOf = this.checkeds.indexOf(id)
         if (indexOf >= 0) {
           this.$delete(this.checkeds, id)
@@ -692,6 +696,7 @@
           params.pageSize = '1000'
           params.loginId = this.userInfo().id
           params.positionType = '1'
+          params.accountId = this.accountId
 
           if (this.creativeMaterialType == '1') {
             // 竖版视频
@@ -713,10 +718,7 @@
           getAction(this.url.imageListUrl, params).then(res => {
             this.imageList = res
           })
-        } else if (
-          (this.creativeMaterialType == '1' || this.creativeMaterialType == '2' || this.creativeMaterialType == '3') &&
-          this.sceneId == '3'
-        ) {
+        } else if ((this.creativeMaterialType == '1' || this.creativeMaterialType == '2' || this.creativeMaterialType == '3') && this.sceneId == '3') {
           // 横版竖版有单张图片
           if (this.creativeMaterialType == '1' || this.creativeMaterialType == '2') {
             // 切换横版或竖版
@@ -728,6 +730,7 @@
             this.showUploadSinglePicType = false
             this.tiepianImageLocalUpload = false
             let params = {}
+            params.accountId = this.accountId
             params.pageSize = '1000'
             params.loginId = this.userInfo().id
             params.positionType = '2'
@@ -757,7 +760,7 @@
             })
           } else if (this.creativeMaterialType == '3') {
             // 切换单张图片
-            this.positionType = '1'
+            this.positionType = '2'
             this.singlePicTiepianType = '1'
             this.showImageUpload = true
             this.showUploadType = false
@@ -854,6 +857,7 @@
         }
         let params = {}
         params.pageSize = '1000'
+        params.accountId = this.accountId
         params.loginId = this.userInfo().id
         if (this.singlePicTiepianType == '1') {
           params.materialType = '2'
@@ -919,6 +923,7 @@
               this.tiepianImageLocalUpload = false
               let params2 = {}
               params2.pageSize = '1000'
+              params2.accountId = this.accountId
               params2.materialType = '1'
               params2.positionType = '1'
               params2.loginId = this.userInfo().id
@@ -952,6 +957,7 @@
               this.hasSinglePicVideoUpload = true
 
               let params2 = {}
+              params2.accountId = this.accountId
               params2.pageSize = '1000'
               params2.materialType = '1'
               params2.positionType = '2'
@@ -1007,6 +1013,7 @@
         e.preventDefault()
         this.form.validateFields((err, values) => {
           if (!err) {
+            this.loading = true;
             let params = {}
             params.accountId = this.accountId
             if (this.ids.length == 2) {
@@ -1039,6 +1046,7 @@
                   params.haveSinglePicVideoUrl = this.tiepianVideoLocalUploadList
                 }
               } else if (this.creativeMaterialType == '3') {
+                params.singlePicTiepianType = this.singlePicTiepianType;
                 if (this.changeSinglePicType == '1') {
                   params.haveSinglePicimagesList = this.haveSinglePicimagesList
                 } else if (this.changeSinglePicType == '2') {
@@ -1049,9 +1057,11 @@
             postAction(this.url.creativeUrl, params).then(res => {
               console.log(res)
               if (res.success) {
+                this.loading = false;
                 alert('广告创意创建成功')
-              }else{
-                alert(res.message)
+              } else {
+                this.loading = false;
+                alert(res.message);
               }
             })
           }
@@ -1059,7 +1069,7 @@
       }
     },
 
-    created: function() {
+    created: function () {
       let params = {}
       params.pageSize = '1000'
       params.mediaId = '2'

+ 6 - 7
src/views/modules/kuaishouapp/groupCreate.vue

@@ -298,7 +298,7 @@
       <a-form-item
         :wrapperCol="{ span: 20 }"
         style="text-align: center">
-        <a-button htmlType="submit" type="primary">提交</a-button>
+        <a-button htmlType="submit" type="primary" :loading="loading">提交</a-button>
         <a-button style="margin-left: 8px">保存</a-button>
       </a-form-item>
     </a-form>
@@ -336,6 +336,7 @@
         showMode: '2', // 1 轮播 2 优选
         bidType: '2',
         showBid: true,
+        loading: false,
         bid: 0,// bid_type 为 CPC/eCPC 出价
         ocpxActionType: '2',// 2行为数 180 激活数
         showOcpxActionType: false,
@@ -415,7 +416,7 @@
           this.showOcpxActionType = true;
           this.showCpaBid = true;
 
-          if(this.ocpxActionType == '180' && this.deepConversionTypes.length > 0){
+          if (this.ocpxActionType == '180' && this.deepConversionTypes.length > 0) {
             this.showDeepConversionType = true;
             this.showDeepConversionBid = true;
 
@@ -491,6 +492,7 @@
         e.preventDefault()
         this.form.validateFields((err, values) => {
           if (!err) {
+            this.loading = true;
             console.log('Received values of form: ', values);
             console.log('预算金额: ', this.dayBudget);
             console.log('投放方式: ', this.speed);
@@ -516,11 +518,6 @@
             }
 
 
-            console.log('资源位置: ', this.sceneId);
-            console.log('创意制作防水: ', this.unitType);
-            console.log('深度转化目标: ', this.deepConversionType);
-            console.log('深度转化目标出价: ', this.deepConversionBid);
-            console.log('广告组名称: ', this.unitName);
             let params = {};
             params.dayBudget = this.dayBudget * 1000;
             params.speed = this.speed;
@@ -560,8 +557,10 @@
             postAction(this.url.insertTemplateUrl, params).then((res) => {
               console.log(res)
               if (res.success) {
+                this.loading = false;
                 alert("广告组模板创建成功");
               } else {
+                this.loading = false;
                 alert(res.message);
               }
             });

+ 50 - 8
src/views/modules/kuaishouapp/uploadApp.vue

@@ -1,6 +1,25 @@
 <template>
   <a-card :body-style="{padding: '24px 32px'}" :bordered="false">
     <a-form>
+      <a-form-item
+        label="选择快手账户"
+        :labelCol="{xs: {span: 24},sm: {span: 5}}"
+        :wrapperCol="{xs: {span: 24},sm: {span: 16}}">
+        <a-select
+          v-model="accountId"
+          showSearch
+          showArrow
+          allowClear
+          placeholder="选择需创建的快手账户"
+          optionFilterProp="children"
+          style="width: 500px"
+          :filterOption="filterOption"
+        >
+          <a-select-option v-for="userAccount in accountList" :key="userAccount.accountId"
+                           :value="userAccount.accountId">{{userAccount.authName}}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
 
       <a-form-item
         label="设备类型"
@@ -167,6 +186,8 @@
     },
     data() {
       return {
+        accountId: '',
+        accountList: {},
         appType: 'android',//设备类型
         platform: '1',//应用类型   : 1 Android 应用下载,2: Android 网页游戏,3: iOS 应用下载, 4:iOS 网页游戏
         uploadType: '1',//上传类型 1 本地上传 2 填写链接
@@ -190,7 +211,8 @@
         form: this.$form.createForm(this),
         url: {
 
-          insertTemplateUrl: '/kuaishou/kuaiShouCreateAppTemplate/insert'
+          insertTemplateUrl: '/kuaishou/kuaiShouCreateAppTemplate/insert',
+          userAllocationList: '/ctop/userAllocation/list',
         }
       }
     },
@@ -247,17 +269,23 @@
           if (!err) {
             console.log('Received values of form: ', values);
             let params = {};
-            if (this.uploadType == '1') {
-              if (this.file != '') {
-                params.file = this.file;
-              }
-            } else if (this.uploadType == '2') {
-              params.url = this.downloadUrl;
-            }
+            params.accountId = this.accountId;
             if (this.imageUrl != '') {
               params.imageUrl = this.imageUrl;
             }
+            if (this.platform == '2') {
+              params.url = this.downloadUrl;
+            } else {
+              if (this.uploadType == '1') {
+                if (this.file != '') {
+                  params.file = this.file;
+                }
+              } else if (this.uploadType == '2') {
+                params.url = this.downloadUrl;
+              }
+            }
             params.platform = this.platform;
+            params.uploadType = this.uploadType;
             params.appType = this.appType;
             params.packageName = this.packageName;
             params.appName = this.appName;
@@ -291,8 +319,10 @@
           if (!err) {
             console.log('Received values of form: ', values);
             let params = {};
+            params.accountId = this.accountId;
             params.appType = this.appType;
             params.platform = this.platform;
+            params.uploadType = '2';
             params.url = this.downloadUrl;
             params.appName = this.appName;
             params.appVersion = this.appVersion;
@@ -316,6 +346,18 @@
       },
 
 
+    },
+    created: function () {
+      let params = {};
+      params.pageSize = '1000';
+      params.mediaId = '2';
+      params.userId = this.userInfo().id;
+      getAction(this.url.userAllocationList, params).then((res) => {
+        if (res.success) {
+          this.accountList = res.result.records
+        }
+      });
     }
+
   }
 </script>

+ 36 - 0
src/views/modules/kuaishouapp/uploadVideo.vue

@@ -13,6 +13,27 @@
 
 
       <a-form-item
+        label="选择快手账户"
+        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
+        <a-select
+          v-model="accountId"
+          showSearch
+          showArrow
+          allowClear
+          placeholder="选择需创建的快手账户"
+          optionFilterProp="children"
+          style="width: 500px"
+          :filterOption="filterOption"
+        >
+          <a-select-option v-for="userAccount in accountList" :key="userAccount.accountId"
+                           :value="userAccount.accountId">{{userAccount.authName}}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
+
+
+      <a-form-item
         label="素材投放位置"
         :labelCol="{lg: {span: 7}, sm: {span: 7}}"
         :wrapperCol="{lg: {span: 8}, sm: {span: 8} }">
@@ -121,6 +142,8 @@
     },
     data() {
       return {
+        accountId: '',
+        accountList: {},
         localUrl: '',
         localImageUrl: '',
         positionType: '1',
@@ -136,6 +159,7 @@
         form: this.$form.createForm(this),
         url: {
           addUrl: '/kuaishou/kuaiShouVideo/insert',
+          userAllocationList: '/ctop/userAllocation/list',
         }
       }
     },
@@ -158,6 +182,7 @@
           if (!err) {
             console.log('Received values of form: ', values);
             let params = {};
+            params.accountId = this.accountId;
             params.localUrl = this.localUrl;
             params.positionType = this.positionType;
             params.materialType = this.materialType;
@@ -174,6 +199,17 @@
           }
         })
       },
+    },
+    created: function () {
+      let params = {};
+      params.pageSize = '1000';
+      params.mediaId = '2';
+      params.userId = this.userInfo().id;
+      getAction(this.url.userAllocationList, params).then((res) => {
+        if (res.success) {
+          this.accountList = res.result.records
+        }
+      });
     }
   }
 </script>