Pārlūkot izejas kodu

修改快手上传素材 绑定到账号

yumeng 5 gadi atpakaļ
vecāks
revīzija
590dce6141

+ 5 - 0
src/views/modules/kuaishouapp/creativeCreate.vue

@@ -724,6 +724,7 @@
           params.pageSize = '1000'
           params.loginId = this.userInfo().id
           params.positionType = '1'
+          params.accountId = this.accountId
 
           if (this.creativeMaterialType == '1') {
             // 竖版视频
@@ -757,6 +758,7 @@
             this.showUploadSinglePicType = false
             this.tiepianImageLocalUpload = false
             let params = {}
+            params.accountId = this.accountId
             params.pageSize = '1000'
             params.loginId = this.userInfo().id
             params.positionType = '2'
@@ -883,6 +885,7 @@
         }
         let params = {}
         params.pageSize = '1000'
+        params.accountId = this.accountId
         params.loginId = this.userInfo().id
         if (this.singlePicTiepianType == '1') {
           params.materialType = '2'
@@ -948,6 +951,7 @@
               this.tiepianImageLocalUpload = false
               let params2 = {}
               params2.pageSize = '1000'
+              params2.accountId = this.accountId
               params2.materialType = '1'
               params2.positionType = '1'
               params2.loginId = this.userInfo().id
@@ -981,6 +985,7 @@
               this.hasSinglePicVideoUpload = true
 
               let params2 = {}
+              params2.accountId = this.accountId
               params2.pageSize = '1000'
               params2.materialType = '1'
               params2.positionType = '2'

+ 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>