瀏覽代碼

行为出价

zhuxinbo 5 年之前
父節點
當前提交
15eaeaaa14

+ 2 - 3
src/components/layouts/TabLayout.vue

@@ -85,6 +85,7 @@
           localStorage.removeItem("step")
           localStorage.removeItem("campaignId")
           localStorage.removeItem("pans")
+          localStorage.removeItem("appId")
       }
       if(!this.linkList.includes("/account/advertisingGroup")){
           localStorage.removeItem("advertisingGroup")
@@ -109,6 +110,7 @@
           localStorage.removeItem("step")
           localStorage.removeItem("campaignId")
           localStorage.removeItem("pans")
+          localStorage.removeItem("appId")
         }
         if(!this.linkList.includes("/account/advertisingGroup")){
           localStorage.removeItem("advertisingGroup")
@@ -118,9 +120,6 @@
           localStorage.removeItem("originality")
           localStorage.removeItem("originalityKey")
         }
-        if(!this.linkList.includes("/account/accountIndex")){
-          localStorage.removeItem("accountId")
-        }
       },
       'activePage': function (key) {
         let index = this.linkList.lastIndexOf(key)

+ 49 - 11
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -29,9 +29,10 @@
     <a-form @submit="handleSubmit" :form="form">
       <a-form-item label="目标应用" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == '2'">
-        <a-select :disabled="typeCopy=='edit'" v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]" showSearch
-          allowClear placeholder="选择应用目标" optionFilterProp="children" style="width: 500px" @focus="handleFocus"
-          @blur="handleBlur" @change="handleChange" :filterOption="filterOption">
+        <a-select :disabled="typeCopy=='edit'"
+          v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]" showSearch allowClear
+          placeholder="选择应用目标" optionFilterProp="children" style="width: 500px" @focus="handleFocus" @blur="handleBlur"
+          @change="handleChange" :filterOption="filterOption">
           <a-select-option value="0">请选择目标应用</a-select-option>
           <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
             {{ appModel.appName }}&#12288;&nbsp;&#12288; {{ appModel.appVersion }}&#12288;&#12288;&#12288;{{
@@ -39,9 +40,20 @@
             }}
           </a-select-option>
         </a-select>
+        <br v-if="typeCopy!='edit'">
+        <span v-if="typeCopy!='edit'" style="color:red">如修改目标应用,请重新选择落地页</span>
         <!-- <a @click="addApplication" style="margin-left:10px">添加应用</a> -->
         <creat-application ref="application" />
       </a-form-item>
+      <a-form-item label=" " class="else-label" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == '2'&&showSite&&(getPlatForm(getData('appId'))=='1'||getPlatForm(getData('appId'))=='2')">
+        <a-select v-model="siteId" showSearch allowClear placeholder="选择应用下载详情页" optionFilterProp="children"
+          :filterOption="filterOption">
+          <a-select-option v-for="appModel in siteList" :key="appModel.siteId" :value="appModel.siteId">
+            {{ appModel.name }}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
       <a-form-item label="转化类型" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == '3'">
         <a-radio-group buttonStyle="solid"
@@ -237,6 +249,9 @@
                           ? '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                           : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                       }}</span>
+                       <span style="color:red;font-weight:700" v-else-if="item.bidType!=180&&item.cpaBid&&item.cpaBid>1">
+                          行为出价大于1元,请注意!!!
+                      </span>
                     </a-form-item>
                     <a-form-item label="深度转化出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                       :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
@@ -347,7 +362,10 @@
         dataList: [],
         unitId: '',
         oneCampaignId: '',
-        copyCampaignId: ''
+        copyCampaignId: '',
+        showSite: false,
+        siteId: "",
+        siteList: []
       }
     },
     computed: {},
@@ -405,19 +423,13 @@
           } else {
             this.allForm.group[index].showTipCheck = false
           }
-        } else if (this.allForm.group[index].bidType == 2) {
-          if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
-            this.allForm.group[index].showTipCheck = true
-          } else {
-            this.allForm.group[index].showTipCheck = false
-          }
         } else {
           if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
             this.allForm.group[index].showTipCheck = true
           } else {
             this.allForm.group[index].showTipCheck = false
           }
-        }
+        } 
       },
       getScheduleTime(item) {
         this.allForm.scheduleTimeData = item
@@ -540,6 +552,7 @@
       },
       handleOk(item, type, campaignId, unitNameCopy) {
         this.visible = true
+        this.showSite = false
         //   /kuaishou/batch/getUnitDetail
         this.typeCopy = type
         if (campaignId) {
@@ -677,6 +690,12 @@
             if (this.allForm.useAppMarket == true || this.allForm.useAppMarket == false) {
               params.useAppMarket = this.allForm.useAppMarket ? 1 : 0
             }
+            if (this.showSite&&(this.getPlatForm(this.getData('appId'))=='1'||this.getPlatForm(this.getData('appId'))=='2')) {
+              params.appJson = {
+                isUpdate: true,
+                siteId: this.siteId
+              }
+            }
             if (this.checkedTrue) {
               var data = this.populationData
               postAction('/kuaishou/batch/addDirectionalTemplate', {
@@ -730,8 +749,27 @@
         this.allForm.useAppMarket = e.target.checked
         //   console.log(value)
       },
+      getPageList(appId) {
+        getAction('/kuaishou/batch/getPageList', {
+          accountId: localStorage.getItem('accountId'),
+          appId: appId,
+          viewComp: 7
+        }).then(res => {
+          if (res.success) {
+            console.log(res)
+            this.siteList = res.result
+          }
+        })
+      },
       handleChange(value) {
         //   this.$refs.population.getAppList(value)
+        if (value == this.getData('appId')) {
+          this.showSite = false
+        } else {
+          this.showSite = true
+          this.siteId = ''
+          this.getPageList(value)
+        }
       },
       handleChangeMould(value) {
         if (value) {

+ 50 - 5
src/views/modules/kuaishouapp/account/editGroupNew.vue

@@ -29,9 +29,9 @@
     <a-form @submit="handleSubmit" :form="form">
       <a-form-item label="目标应用" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == '2'">
-        <a-select v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]" showSearch
-          allowClear placeholder="选择应用目标" optionFilterProp="children" style="width: 500px" @focus="handleFocus"
-          @blur="handleBlur" @change="handleChange" :filterOption="filterOption">
+        <a-select v-decorator="['appId', { rules: [{ required: true, message: '请选择目标应用' }] }]" showSearch allowClear
+          placeholder="选择应用目标" optionFilterProp="children" style="width: 500px" @focus="handleFocus" @blur="handleBlur"
+          @change="handleChange" :filterOption="filterOption">
           <a-select-option value="0">请选择目标应用</a-select-option>
           <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
             {{ appModel.appName }}&#12288;&nbsp;&#12288; {{ appModel.appVersion }}&#12288;&#12288;&#12288;{{
@@ -39,9 +39,21 @@
             }}
           </a-select-option>
         </a-select>
+        <br v-if="typeCopy!='edit'">
+        <span v-if="typeCopy!='edit'" style="color:red">如修改目标应用,请重新选择落地页</span>
         <!-- <a @click="addApplication" style="margin-left:10px">添加应用</a> -->
         <creat-application ref="application" />
       </a-form-item>
+      <a-form-item label=" " class="else-label" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+        v-if="campaignType == '2'&&showSite&&(getPlatForm(getData('appId'))=='1'||getPlatForm(getData('appId'))=='2')">
+        <a-select v-model="siteId" showSearch allowClear placeholder="选择应用下载详情页" optionFilterProp="children"
+          :filterOption="filterOption">
+          <a-select-option v-for="appModel in siteList" :key="appModel.siteId" :value="appModel.siteId">
+            {{ appModel.name }}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
       <a-form-item label="转化类型" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == '3'">
         <a-radio-group buttonStyle="solid"
@@ -237,6 +249,9 @@
                           ? '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                           : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                       }}</span>
+                      <span style="color:red;font-weight:700" v-else-if="item.bidType!=180&&item.cpaBid&&item.cpaBid>1">
+                        行为出价大于1元,请注意!!!
+                      </span>
                     </a-form-item>
                     <a-form-item label="深度转化出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                       :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
@@ -275,7 +290,7 @@
         确定
       </a-button>
     </template>
-    <a-modal v-model="visibleFail" title="错误信息" onOk="handleOk" :footer="null">
+    <a-modal v-model="visibleFail" title="错误信息" :footer="null">
       <div v-if="visibleData">
         复制条数:{{ visibleData.totalCount }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;失败条数:{{ visibleData.failCount }}
         <div style="margin-top:20px">
@@ -370,7 +385,10 @@
         unitId: '',
         oneCampaignId: '',
         copyCampaignId: '',
-        countAll: 0
+        countAll: 0,
+        showSite: false,
+        siteId: "",
+        siteList: []
       }
     },
     computed: {},
@@ -563,6 +581,7 @@
       },
       handleOk(item, type, campaignId, unitNameCopy, count) {
         this.visible = true
+        this.showSite = false
         //   /kuaishou/batch/getUnitDetail
         this.typeCopy = type
         this.countAll = count
@@ -691,6 +710,13 @@
             if (this.allForm.useAppMarket == true || this.allForm.useAppMarket == false) {
               params.useAppMarket = this.allForm.useAppMarket ? 1 : 0
             }
+            if (this.showSite && (this.getPlatForm(this.getData('appId')) == '1' || this.getPlatForm(this.getData(
+                'appId')) == '2')) {
+              params.appJson = {
+                isUpdate: true,
+                siteId: this.siteId
+              }
+            }
             if (this.checkedTrue) {
               var data = this.populationData
               postAction('/kuaishou/batch/addDirectionalTemplate', {
@@ -798,8 +824,27 @@
         this.allForm.useAppMarket = e.target.checked
         //   console.log(value)
       },
+      getPageList(appId) {
+        getAction('/kuaishou/batch/getPageList', {
+          accountId: localStorage.getItem('accountId'),
+          appId: appId,
+          viewComp: 7
+        }).then(res => {
+          if (res.success) {
+            console.log(res)
+            this.siteList = res.result
+          }
+        })
+      },
       handleChange(value) {
         //   this.$refs.population.getAppList(value)
+        if (value == this.getData('appId')) {
+          this.showSite = false
+        } else {
+          this.showSite = true
+          this.siteId = ''
+          this.getPageList(value)
+        }
       },
       handleChangeMould(value) {
         if (value) {

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

@@ -266,7 +266,7 @@
                       <a-input-number v-model="item.bid" @change="showTip(index)"
                         :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }" style="width:100%">
                       </a-input-number>
-                      <span style="color:red" v-if="item.showTipCheck">不得低于0.2元,不得高于项目最高出价{{ maxBid }}元</span>
+                      <span style="color:red" v-if="item.showTipCheck&&item.bidType==180">不得低于0.2元,不得高于项目最高出价{{ maxBid }}元</span>
                     </a-form-item>
                     <a-form-item label="目标成本" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                       :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-else>
@@ -278,6 +278,9 @@
                           ? '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                           : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                       }}</span>
+                      <span style="color:red;font-weight:700" v-else-if="item.bidType!=180&&item.cpaBid&&item.cpaBid>1">
+                          行为出价大于1元,请注意!!!     
+                      </span>
                     </a-form-item>
                     <a-form-item label="深度转化出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                       :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-if="
@@ -591,7 +594,7 @@
       },
       addGroup() {
         this.allForm.group.push({
-          bidType: 2,
+          bidType: this.campaignType == '2' && this.allForm.groupTypeData.isActivate == '1'?180:2,
           bid: '',
           cpaBid: '',
           showTipCheck: false,
@@ -646,19 +649,13 @@
           } else {
             this.allForm.group[index].showTipCheck = false
           }
-        } else if (this.allForm.group[index].bidType == 2) {
+        } else  {
           if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
             this.allForm.group[index].showTipCheck = true
           } else {
             this.allForm.group[index].showTipCheck = false
           }
-        } else {
-          if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
-            this.allForm.group[index].showTipCheck = true
-          } else {
-            this.allForm.group[index].showTipCheck = false
-          }
-        }
+        } 
       },
       getScheduleTime(item) {
         this.allForm.scheduleTimeData = item

+ 47 - 23
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -174,11 +174,11 @@
               </a-select-option>
             </a-select>
           </a-form-item>
-          <a-form-item label="下载详情" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-form-item label="下载详情" v-if="showSite" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-select v-decorator="['siteId' ]" showSearch allowClear placeholder="选择应用下载详情页"
               optionFilterProp="children" :filterOption="filterOption">
-              <a-select-option v-for="appModel in siteList" :key="appModel.id" :value="appModel.actionBarText">
-                {{ appModel.actionBarText }}
+              <a-select-option v-for="appModel in siteList" :key="appModel.siteId" :value="appModel.siteId">
+                {{ appModel.name }}
               </a-select-option>
             </a-select>
           </a-form-item>
@@ -401,6 +401,7 @@
     },
     data() {
       return {
+        showSite: true,
         titleVisible: false,
         options: [],
         data: [],
@@ -734,6 +735,7 @@
         params.pageSize = this.ipagination.pageSize
         params.pageNo = page
         params.channelType = this.channelType
+        params.status = 0
         if (this.time.length > 0) {
           params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
           params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
@@ -841,13 +843,13 @@
                 imageArr: item.imageList.map((ele, index) => {
                   return {
                     signature: ele.signature,
-                    name: index + 1 + '-' + item.name
+                    name: item.name
                   }
                 }),
                 imageArrTwo: item.checkArrImage.map((ele, index) => {
                   return {
                     signature: ele,
-                    name: (item.imageList.length + index + 1) + '-' + item.name
+                    name: item.name
                   }
                 }),
                 photoId: item.videoList.photoId,
@@ -868,7 +870,8 @@
               dataJson: allJson,
               ...values,
               unitId: this.pansKey,
-              accountId: localStorage.getItem('accountId')
+              accountId: localStorage.getItem('accountId'),
+              content: this.content 
             }
             postAction('/kuaishou/batch/createCreative', params).then(res => {
               if (res.success) {
@@ -898,13 +901,7 @@
           videoList: '',
           imageList: [],
           name: this.getData('creativeMaterialType') == '1' ?
-            '自定义创意_竖版视频_' +
-            Math.random()
-            .toString(36)
-            .substr(2, 4) : '自定义创意_横版视频_' +
-            Math.random()
-            .toString(36)
-            .substr(2, 4),
+            '自定义创意_竖版视频_' : '自定义创意_横版视频_',
           description: '',
           creativeMaterialType: '1',
           actionBarText: '',
@@ -1311,6 +1308,18 @@
           item.description = node.value
         }
       },
+      getAppList(appId) {
+        getAction('/kuaishou/batch/getPageList', {
+          accountId: localStorage.getItem('accountId'),
+          appId: appId,
+          viewComp: 7
+        }).then(res => {
+          if (res.success) {
+            console.log(res)
+            this.siteList = res.result
+          }
+        })
+      }
     },
     computed: {
       dirImg() {
@@ -1369,6 +1378,7 @@
           params.materialType = this.getData('creativeMaterialType')
           params.pageSize = this.ipagination.pageSize
           params.pageNo = 1
+          params.status = 0
           params.channelType = this.channelType
           params.startDate = moment(n[0]).format('YYYY-MM-DD')
           params.endDate = moment(n[1]).format('YYYY-MM-DD')
@@ -1379,6 +1389,7 @@
           params.materialType = this.getData('creativeMaterialType')
           params.pageSize = this.ipagination.pageSize
           params.pageNo = 1
+          params.status = 0
           params.channelType = this.channelType
           this.ipagination.current = 1
           this.showVideoList('/kuaishou/batch/getVideoList', params)
@@ -1418,16 +1429,29 @@
             this.appList = res.result
           }
         })
-        getAction('/kuaishou/batch/getPageList', {
-          accountId: localStorage.getItem('accountId'),
-          appId: localStorage.getItem('appId'),
-          viewComp: 7
-        }).then(res => {
-          if (res.success) {
-            console.log(res)
-            this.siteList = res.result
-          }
-        })
+
+        if (localStorage.getItem('appId')) {
+          this.showSite = true
+          this.getAppList(localStorage.getItem('appId'))
+        } else {
+
+          getAction('/kuaishou/batch/getAppId', {
+            accountId: localStorage.getItem('accountId'),
+            unitId: this.pansKey
+          }).then(res => {
+            if (res.success) {
+              if (res.result) {
+                this.showSite = true
+                this.getAppList(res.result)
+              } else {
+                this.showSite = false
+              }
+
+            }
+          })
+        }
+
+
       }
       getAction('/kuaishou/batch/creativeWord', {
         accountId: localStorage.getItem('accountId')

+ 2 - 2
vue.config.js

@@ -65,7 +65,7 @@ module.exports = {
        },*/
       '/jeecg-boot': {
        
-        target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        // target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
        
         // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
        
@@ -73,7 +73,7 @@ module.exports = {
         // target: 'http://192.168.1.94:8804', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://api.tjyourong.com.cn/jeecg-boot', //请求本地 需要jeecg-boot后台项目 
+        target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'http://192.168.1.251:8088', //请求本地 需要jeecg-boot后台项目 
         // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目