Ver Fonte

提交代码

zhuxinbo há 5 anos atrás
pai
commit
42be52ff2c

+ 5 - 0
src/components/layouts/TabLayout.vue

@@ -82,6 +82,11 @@
 
       if(!this.linkList.includes("/account/stepForm")){
           localStorage.removeItem("step")
+          localStorage.removeItem("campaignId")
+      }
+      if(!this.linkList.includes("/account/advertisingGroup")){
+          localStorage.removeItem("advertisingGroup")
+          localStorage.removeItem("advertisingGroupKey")
       }
     },
     watch: {

+ 1 - 0
src/store/modules/user.js

@@ -51,6 +51,7 @@ const user = {
             commit('SET_INFO', userInfo)
             commit('SET_NAME', {username: userInfo.username, realname: userInfo.realname, welcome: welcome()})
             commit('SET_AVATAR', userInfo.avatar)
+            
             resolve(response)
           } else {
             reject(response)

+ 6 - 1
src/views/modules/advertiser/ProjectList.vue

@@ -104,11 +104,16 @@ export default {
           scopedSlots: { customRender: 'maxBid' }
         },
         {
-          title: '负责人',
+          title: '运营负责人',
           align: 'center',
           dataIndex: 'responsibleName'
         },
         {
+          title: '设计负责人',
+          align: 'center',
+          dataIndex: 'designResponsibleName'
+        },
+        {
           title: '操作',
           dataIndex: 'action',
           align: 'center',

+ 3 - 2
src/views/modules/advertiser/ProjectMemberList.vue

@@ -115,8 +115,9 @@
           :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
         >
           <a-radio-group buttonStyle="solid" v-model="mode" @change="onChageLogin">
+              <a-radio-button value="authorization">授权</a-radio-button>
             <a-radio-button value="login">登录</a-radio-button>
-            <a-radio-button value="authorization">授权</a-radio-button>
+            
           </a-radio-group>
         </a-form-item>
 
@@ -197,7 +198,7 @@ export default {
       // 表头
       visible: false,
       keyWord: '',
-      mode: 'login',
+      mode: 'authorization',
       mediaId: '2',
       accountName: '',
       password: '',

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

@@ -22,27 +22,6 @@
           <countTo :startVal="0" :endVal="cost" :duration="duration" :decimals="2" class="count"></countTo>
         </a-card>
       </a-col>
-      <!-- <a-col :span="8">
-        <a-card hoverable title="预算">
-          
-          <countTo
-            :startVal="0"
-            :endVal="many"
-            :duration="duration"
-            :decimals="2"
-            v-show="!showEdit"
-            class="count"
-          ></countTo>
-          <span v-show="!showEdit" class="count">{{ many > 0 ? many.toFixed(2) : '不限制预算' }}</span>
-          <a-input-number :min="0" :step="0.01" v-show="showEdit" v-model="manyTwo" style="width:200px" />
-          <a-input v-show="showEdit" v-model="manyTwo" style="width:200px"></a-input>
-          <a-icon
-            :type="showEdit ? 'check' : 'edit'"
-            @click=";(showEdit = !showEdit), show()"
-            style="margin-left:10px"
-          />
-        </a-card>
-      </a-col> -->
       <a-col :span="12">
         <a-card hoverable title="余额">
           <countTo :startVal="0" :endVal="balance" :duration="duration" :decimals="2" class="count"></countTo>

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

@@ -157,6 +157,9 @@ export default {
   },
   methods: {
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    getCampaignId(campaignId) {
+      alert(1)
+    },
     handleConfirmValue(rule, value, callback) {
       if (value == '' || value < 500 || value >= 100000000) {
         callback('请输入正确预算金额')

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

@@ -14,6 +14,7 @@
         label="目标应用"
         :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+        v-if="campaignType == '2'"
       >
         <a-select
           v-model="appId"
@@ -28,7 +29,7 @@
           :filterOption="filterOption"
         >
           <a-select-option value="0">请选择目标应用</a-select-option>
-          <a-select-option v-for="appModel in appList" :key="appModel.id" :value="appModel.id">
+          <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
             {{ appModel.appName }}&#12288;&nbsp;&#12288; {{ appModel.appVersion }}&#12288;&#12288;&#12288;{{
               appModel.platform | platform
             }}
@@ -144,7 +145,7 @@
           </div>
         </div>
       </a-form-item>
-      <targeted-population />
+      <targeted-population ref="population" />
       <a-form-item :wrapperCol="{ span: 20 }" style="text-align: center">
         <a-button htmlType="submit" type="primary" :loading="loading">下一步</a-button>
         <a-button style="margin-left: 8px" @click="prevStep" v-show="step == 1">上一步</a-button>
@@ -247,7 +248,8 @@ export default {
       appList: [],
       appId: '',
       loading: false,
-      campaignTemplateId: ''
+      campaignTemplateId: '',
+      campaignType: '2'
     }
   },
   computed: {
@@ -379,6 +381,7 @@ export default {
     },
     handleChange(value) {
       console.log(`selected ${value}`)
+      this.$refs.population.getAppList(value)
     },
     handleBlur() {
       console.log('blur')
@@ -395,7 +398,7 @@ export default {
       that.$emit('nextStep', that.list)
     },
     prevStep() {
-      this.$emit('prevStep')
+      this.$emit('prevStep', this.campaignId ? this.campaignId : localStorage.getItem('campaignId'))
     },
     getAppList() {
       let params = {}
@@ -421,11 +424,24 @@ export default {
           }
         })
       }
+    },
+    getCampaignList() {
+      var params = {}
+      params.accountId = localStorage.getItem('accountId')
+      params.campaignId = this.campaignId ? this.campaignId : localStorage.getItem('campaignId')
+      getAction('/kuaishou/batch/getCampaignList', params).then(res => {
+        if (res.success) {
+          this.campaignType = res.result.records[0].campaignType
+        }
+      })
     }
   },
   mounted: function() {
-    this.step = localStorage.getItem('step')
-    this.getAppList()
+    this.$nextTick(() => {
+      this.step = localStorage.getItem('step')
+      this.getAppList()
+      this.getCampaignList()
+    })
   }
 }
 

+ 5 - 2
src/views/modules/kuaishouapp/account/stepForm/StepForm.vue

@@ -7,7 +7,7 @@
       <!-- <a-step title="完成" /> -->
     </a-steps>
     <div class="content">
-      <step1 v-if="currentTab === 0" @nextStep="nextStep" />
+      <step1 v-if="currentTab === 0" @nextStep="nextStep" ref="step" />
       <step2 v-if="currentTab === 1" :campaignId="campaignId" @nextStep="nextStepTwo" @prevStep="prevStep" />
       <step3 :pans="pans" v-show="currentTab === 2" @prevStep="prevStepTwo" />
       <!-- <step4 v-if="currentTab === 3" @prevStep="prevStep" @finish="finish" /> -->
@@ -52,9 +52,12 @@ export default {
         this.currentTab += 1
       }
     },
-    prevStep() {
+    prevStep(campaignId) {
       if (this.currentTab > 0) {
         this.currentTab -= 1
+        this.$nextTick(() => {
+          this.$refs.step.getCampaignId(campaignId)
+        })
       }
     },
     prevStepTwo() {

+ 121 - 8
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -18,7 +18,7 @@
 }
 </style>
 <template>
-  <a-form :form="form" class="module-form">
+  <a-form :form="form" class="module-form" @submit="handleSubmit">
     <a-form-item
       label="地区"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
@@ -98,6 +98,88 @@
         <a-radio-button value="2">男性</a-radio-button>
       </a-radio-group>
     </a-form-item>
+    <a-form-item
+      label="最低版本"
+      :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+      :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+    >
+      <a-radio-group
+        buttonStyle="solid"
+        v-decorator="[
+          'platform_os',
+          {
+            initialValue: '0'
+          }
+        ]"
+      >
+        <a-radio-button value="0" v-if="getApp == '0'">不限</a-radio-button>
+        <a-radio-button value="1" v-if="getApp == '0' || getApp == '1'">Android系统</a-radio-button>
+        <a-radio-button value="2" v-if="getApp == '0' || getApp == '2'">IOS系统</a-radio-button>
+        {{ getData('platform_os') }}
+        <div v-if="getData('platform_os') == '1'" style="margin-top:10px">
+          <a-radio-group
+            v-decorator="[
+              'android_osv',
+              {
+                initialValue: '3'
+              }
+            ]"
+          >
+            <a-radio value="3">不限</a-radio>
+            <a-radio value="4">4X+</a-radio>
+            <a-radio value="5">5x+</a-radio>
+            <a-radio value="6">6x+</a-radio>
+            <a-radio value="7">7x+</a-radio>
+          </a-radio-group>
+        </div>
+        <div v-if="getData('platform_os') == '2'" style="margin-top:10px">
+          <a-radio-group
+            v-decorator="[
+              'ios_osv',
+              {
+                initialValue: '6'
+              }
+            ]"
+          >
+            <a-radio value="6">不限</a-radio>
+            <a-radio value="7">7X+</a-radio>
+            <a-radio value="8">8x+</a-radio>
+            <a-radio value="9">9x+</a-radio>
+            <a-radio value="10">10x+</a-radio>
+          </a-radio-group>
+        </div>
+      </a-radio-group>
+      <a-button htmlType="submit" type="primary">确定</a-button>
+    </a-form-item>
+    <a-form-item
+      v-if="getData('platform_os') != '2'"
+      label="设备品牌"
+      :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+      :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+    >
+      <a-radio-group buttonStyle="solid" v-model="allForm.device">
+        <a-radio-button value="0">不限</a-radio-button>
+        <a-radio-button value="1">选择品牌</a-radio-button>
+      </a-radio-group>
+      <div v-if="allForm.device == '1'" style="width:120%">
+        <a-checkbox-group
+          v-decorator="['device_brand', { rules: [{ required: true, message: '请选择设备品牌' }] }]"
+          style="width:120%"
+        >
+          <a-checkbox value="1">OPPO</a-checkbox>
+          <a-checkbox value="2">VIVO</a-checkbox>
+          <a-checkbox value="3">华为</a-checkbox>
+          <a-checkbox value="4">小米</a-checkbox>
+          <a-checkbox value="5">荣耀</a-checkbox>
+          <a-checkbox value="6">三星</a-checkbox>
+          <a-checkbox value="7">金立</a-checkbox>
+          <a-checkbox value="8">魅族</a-checkbox>
+          <a-checkbox value="9">乐视</a-checkbox>
+          <a-checkbox value="10">其他</a-checkbox>
+          <a-checkbox value="11" v-if="getData('platform_os') == '0'">苹果</a-checkbox>
+        </a-checkbox-group>
+      </div>
+    </a-form-item>
   </a-form>
 </template>
 
@@ -137,12 +219,7 @@ export default {
         55: '55岁'
       },
       step: 0,
-      people: '2',
-      targeted: '2',
-      appList: [],
-      appId: '',
       loading: false,
-      campaignTemplateId: '',
       allForm: {
         regionType: 'noLimit',
         region: [
@@ -151,7 +228,8 @@ export default {
         ],
         ageType: 'noLimit',
         ages_range: [],
-        age: []
+        age: [],
+        device: '0'
       },
       options: [],
       optionsAll: [],
@@ -160,13 +238,45 @@ export default {
         label: 'name',
         children: 'children',
         multiple: true
-      }
+      },
+      getApp: '0'
     }
   },
   computed: {
     count() {}
   },
   methods: {
+    handleSubmit(e) {
+      e.preventDefault()
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          console.log('Received values of form: ', values)
+        }
+      })
+    },
+    getAppList(value) {
+      console.log(value)
+      if (value == undefined) {
+        this.getApp = '0'
+      } else {
+        let params = {}
+        params.accountId = localStorage.getItem('accountId')
+        params.appId = value
+        getAction('/kuaishou/batch/getAppList', params).then(res => {
+          console.log(res)
+          if (res.success) {
+            console.log(res.result[0].platform)
+            if (res.result[0].platform == '1' || res.result[0].platform == '2') {
+              this.form.setFieldsValue({ platform_os: '1' })
+              this.getApp = '1'
+            } else if (res.result[0].platform == '3' || res.result[0].platform == '4') {
+              this.form.setFieldsValue({ platform_os: '2' })
+              this.getApp = '2'
+            }
+          }
+        })
+      }
+    },
     handleConfirmValue(rule, value, callback) {
       console.log(value)
       if (Math.abs(value[0] - value[1]) < 5) {
@@ -190,6 +300,9 @@ export default {
         return [item.substring(0, 2), item]
       })
       console.log(dataElse)
+    },
+    getData(className) {
+      return this.form.getFieldValue(className)
     }
   },
   mounted: function() {

+ 23 - 5
src/views/modules/material/fragmentMatemal.vue

@@ -215,7 +215,6 @@ a {
 
     <div class="table-operator" style="position:relative;z-index:100">
       <a-button @click="dirVideoGet" type="primary" icon="plus">新增</a-button>
-      <a-button @click="joinMatemal" type="primary">素材拼接</a-button>
       <a-button @click="onCheckAllChange" v-if="active == 'VIDEO_PART'">{{
         checkAll ? '取消  (  ' + checkArr.length + '  )' : '全选'
       }}</a-button>
@@ -291,7 +290,7 @@ a {
         <div v-else>
           <div style="margin-bottom:20px">
             <a-button @click="addMatemal" type="primary" icon="plus" style="margin-right:15px">新增一行</a-button>
-            <a-button type="primary">开始拼接</a-button>
+            <a-button type="primary" @click="joinMatemal">开始拼接</a-button>
           </div>
 
           <a-table :columns="columns" :dataSource="dataList" :pagination="false">
@@ -530,7 +529,7 @@ import { mapGetters } from 'vuex'
 import moment from 'moment'
 
 import BMF from 'browser-md5-file'
-
+import qs from 'qs'
 import accountCheck from './accountCheck'
 import checkMatemal from './checkMatemal'
 export default {
@@ -690,6 +689,9 @@ export default {
     }
   },
   methods: {
+    startConcat() {
+      console.log(this.dataList)
+    },
     handleDragStart(e, item) {
       this.dragging = item
     },
@@ -737,9 +739,25 @@ export default {
       this.setDir()
     },
     joinMatemal() {
-      if (this.joinVideo.head != '' && this.joinVideo.foot != '' && this.joinVideo.content.length > 0) {
+      var data = this.dataList.filter(item => {
+        return item.VIDEO_PART.length > 0
+      })
+      console.log(data)
+      if (data.length > 0) {
+        //    {"startPart":"","endPart":"","parts":["",""]}
+        var params = this.dataList.map(item => {
+          return {
+            startPart: item.VIDEO_HEAD,
+            parts: item.VIDEO_PART,
+            endPart: item.VIDEO_TAIL
+          }
+        })
+        // params = qs.stringify({ videoMergeList: params })
+        postAction('/ctop/materialpart/merge', { videoMergeList: params }).then(res => {
+          console.log(res)
+        })
       } else {
-        this.$message.error('请选择片头片尾以及内容')
+        that.$message.error('还未选择素材片段')
       }
     },
     dirVideoGet() {

+ 43 - 7
src/views/modules/material/videoMaterial.vue

@@ -512,7 +512,7 @@ a {
         </div>
         <div style="flex:3;padding:10px;box-sizing:border-box;">
           <a-form v-if="detail" class="detail">
-            <!-- <a-form-item
+            <a-form-item
               label="视频时长"
               :label-col="{ span: 6 }"
               :wrapper-col="{ span: 18 }"
@@ -525,7 +525,7 @@ a {
             </a-form-item>
             <a-form-item label="大小" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
               {{ detail.parameter.size }}
-            </a-form-item> -->
+            </a-form-item>
             <a-form-item label="策划" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
               {{ detail.ascription.planName }}
             </a-form-item>
@@ -543,8 +543,20 @@ a {
             <a-form-item label="标签" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
               <a-tag v-for="(item, index) of detail.tag" :key="index">{{ item }}</a-tag>
             </a-form-item>
-            <a-form-item label="水印素材下载" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="showUrlWater">
-              <a-button type="primary" @click="downloadByBlob">下载</a-button>
+            <a-form-item label="水印素材下载" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="name">
+              <a-button type="primary" @click="downloadByBlob" v-if="showUrlWater">下载</a-button>
+              <span v-else>水印素材生成中......</span>
+            </a-form-item>
+            <a-form-item label="水印素材链接" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="showUrlWater">
+              <a-input v-model="showUrlWater" type="text" readonly/>
+            </a-form-item>
+            <a-form-item label="生成水印素材" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
+              <a-select :defaultValue="1" style="width:50%" v-model="size">
+                <a-select-option :value="item.id" :key="item.id" v-for="item of sizeType">{{
+                  item.name
+                }}</a-select-option>
+              </a-select>
+              <a-button type="primary" @click="getWater">生成</a-button>
             </a-form-item>
             <a-form-item label="审核人" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="active == '2'">
               {{ detail.auditorName }}
@@ -635,7 +647,7 @@ import JEllipsis from '@/components/jeecg/JEllipsis'
 import UploadToAli from '@femessage/upload-to-ali'
 import { fileCheck, fileInsert, fileEdit } from '@/api/actor'
 import { getAction, postAction, postFile } from '@/api/manage'
-
+import qs from 'qs'
 import { mapGetters } from 'vuex'
 import moment from 'moment'
 
@@ -713,7 +725,9 @@ export default {
       id: '',
       role: { roleCode: '', roleName: '' },
       key: '0',
-      mediaId: null
+      mediaId: null,
+      sizeType: [],
+      size: 1
     }
   },
   filters: {
@@ -761,6 +775,12 @@ export default {
     getAction('/sys/user/getRoleInfo', { userId: this.userInfo().id }).then(res => {
       this.role = res
     })
+    getAction('/ctop/videoWatermarkTemplate/list').then(res => {
+      console.log(res)
+      if (res.success) {
+        this.sizeType = res.result.records
+      }
+    })
   },
   watch: {
     $route: function(n, o) {
@@ -878,11 +898,27 @@ export default {
         inputValue: ''
       })
     },
+    getWater() {
+      var params = qs.stringify({
+        id: this.id,
+        watermarkTemplateId: this.size
+      })
+      postAction('/ctop/materialInfo/watermark', params).then(res => {
+        if (res.success) {
+          // getAction("/ctop/videoWatermarkTask/list").then(res=>{
+          //     console.log(res)
+          // })
+          this.$message.success('水印素材生成中')
+          this.visibleDetail = false
+          this.loadData()
+        }
+      })
+    },
     showDetail(item) {
       this.visibleDetail = true
       this.showUrl = item.url
       this.showUrlWater = item.watermarkUrl ? item.watermarkUrl : null
-      this.name = item.watermarkMaterialName ? item.watermarkMaterialName : null
+      this.name = item.watermarkCode ? item.watermarkCode : null
       this.id = item.id
       if (this.active == '2') {
         this.refuseReason = item.refuseReason

+ 2 - 2
vue.config.js

@@ -65,8 +65,8 @@ module.exports = {
        },*/
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
-        // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
-        target: 'http://192.168.2.130:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://192.168.2.130:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.2.133:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.185:8080', //请求本地 需要jeecg-boot后台项目  祚云