Browse Source

提交代码

朱鑫波 4 years ago
parent
commit
fafa90a221

+ 113 - 11
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -1,6 +1,6 @@
 <style lang="scss">
-.display-none-selset{
-  display: none!important;
+.display-none-selset {
+  display: none !important;
 }
 .chouzhen span {
   display: inline-block;
@@ -449,9 +449,23 @@ li.chouzhen.first:before {
               placeholder="按回车生成标签"
               v-decorator="['creativeTag']"
               dropdownClassName="display-none-selset"
-              :token-separators="[',',' ',',']"
+              :token-separators="[',', ' ', ',']"
             >
             </a-select>
+            <a-popconfirm @confirm="getInfo(record)">
+              <div slot="title">
+                <div>
+                  分类名称:
+                  <a-input placeholder="请输入" v-model="tagName" style="display: inline-block; width: 300px" />
+                </div>
+              </div>
+              <!-- <a-button slot="okText" type="primary" :disabled="refuseReason == ''">确定</a-button> -->
+              <!-- <a @click="setData(record)">复制</a> -->
+              <a style="margin-right: 10px" :disabled="!getData('creativeTag')">收藏</a>
+              <!-- @click="collection('creativeTag')" -->
+            </a-popconfirm>
+
+            <a @click="showCunTag('creativeTag')">收藏列表</a>
           </a-form-item>
 
           <!-- @change="createChange" -->
@@ -712,7 +726,10 @@ li.chouzhen.first:before {
         您的浏览器不支持 video 标签。
       </video>
     </a-modal>
-
+    <a-modal title="收藏标题" v-model="creativeTagVisible" :width="1000" @ok="okTag">
+      <el-tree :data="optionsTag" show-checkbox node-key="id" :props="defaultProps" :check-strictly="true" ref="tree">
+      </el-tree>
+    </a-modal>
     <a-modal :maskClosable="false" title="选择素材" v-model="stickerVisible" @ok="handleOkCover" :width="1000">
       <a-radio-group v-model="stickerStylesValue" class="sticker-styles" v-if="stickerStyles.length > 0">
         <a-radio v-for="(item, index) in stickerStyles" :key="index" :value="item.overlay_type">
@@ -877,7 +894,7 @@ export default {
       value: '',
       dataOne: [],
       title: [],
-
+      creativeTagVisible: false,
       tags: [],
       visibleMatemal: false,
       visibleVideo: false,
@@ -994,9 +1011,38 @@ export default {
       horizontalPhoto: [],
       creativeMaterialType: '1',
       postAdTrue: false,
+      optionsTag: [],
+      defaultProps: {
+        children: 'children',
+        label: 'label',
+        id: 'id',
+      },
+      tagName: '',
+      optionsTag: [],
     }
   },
   methods: {
+    getInfo(item) {
+      if (this.tagName == '') {
+        this.$message.error('请输入分类名称')
+        return
+      } else {
+        let params = {}
+        params.tagName = this.tagName
+        //   params.campaignBudget = this.campaignBudget
+        params.tagArray = JSON.stringify(this.getData('creativeTag'))
+        params.userId = this.userInfo().id
+        params.accountId = localStorage.getItem('accountId')
+        postAction('/tag/kuaiShouCreativeTagCollection/add', params).then((res) => {
+          if (res.success) {
+            this.$message.success('添加成功')
+            this.tagName = ''
+          } else {
+            this.$message.error(res.message)
+          }
+        })
+      }
+    },
     getCoverUrl(index, item, bestIndex) {
       nowIndex = index
       bestIndex = bestIndex
@@ -1113,6 +1159,62 @@ export default {
         })
       }
     },
+    showCunTag(type) {
+      this.creativeTagVisible = true
+      var params = {}
+      params.accountId = localStorage.getItem('accountId')
+      params.userId = this.userInfo().id
+      params.pageSize = 1000
+      params.pageNo = 1
+
+      getAction('/tag/kuaiShouCreativeTagCollection/list', params).then((res) => {
+        if (res.success) {
+          console.log(res.result)
+          this.optionsTag = res.result.records.map((item) => {
+            return {
+              id: item.id,
+              label: item.tagName,
+              children: JSON.parse(item.tagArray).map((item) => {
+                return {
+                  id: item,
+                  label: item,
+                  disabled: true,
+                }
+              }),
+            }
+          })
+        }
+      })
+    },
+    
+    okTag() {
+      var data = this.$refs.tree.getCheckedKeys()
+      if (data.length > 1) {
+        this.$message.error('只能选择一个选项')
+        //  this.$refs.tree.setCheckedKeys([]);
+      } else {
+        var params = {}
+        params.accountId = localStorage.getItem('accountId')
+        params.userId = this.userInfo().id
+        params.pageSize = 1000
+        params.pageNo = 1
+        params.id = data[0]
+
+        getAction('/tag/kuaiShouCreativeTagCollection/list', params).then((res) => {
+          if (res.success) {
+            console.log(res.result)
+            this.form.setFieldsValue({
+              creativeTag: JSON.parse(res.result.records[0].tagArray).map((item) => {
+                return item
+              }),
+            })
+            this.creativeTagVisible = false
+          }else{
+            this.$message.error('选择出错,请稍后选择或自行手填')
+          }
+        })
+      }
+    },
     showCunTitle(index, bestIndex) {
       nowIndex = index
       bestIndex = bestIndex
@@ -1531,12 +1633,12 @@ export default {
           })
           var params = Object.assign({}, values)
           // var params = {
-            params.dataJson= allJson.concat(dataAd)
-            // ...values,
-            params.creativeCategory = params.creativeCategory?params.creativeCategory.pop():null
-            params.unitId= this.pansKey
-            params.accountId= localStorage.getItem('accountId')
-            params.content= this.content
+          params.dataJson = allJson.concat(dataAd)
+          // ...values,
+          params.creativeCategory = params.creativeCategory ? params.creativeCategory.pop() : null
+          params.unitId = this.pansKey
+          params.accountId = localStorage.getItem('accountId')
+          params.content = this.content
           // }
           postAction('/kuaishou/batch/createCreative', params).then((res) => {
             if (res.success) {

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

@@ -1027,6 +1027,7 @@ export default {
         postAction('/tag/kuaiShouCreativeTagCollection/add', params).then((res) => {
           if (res.success) {
             this.$message.success('添加成功')
+            this.tagName = ''
           } else {
             this.$message.error(res.message)
           }

+ 3 - 3
src/views/user/Login.vue

@@ -65,13 +65,13 @@
           @click.stop.prevent="handleSubmit" :disabled="loginBtn">确定
         </a-button>
       </a-form-item>
-      <div class="otherLogin" v-if="customActiveKey != 'tab1'"><span class="titleTip">其他登录方式</span></div>
-      <div class="feishu" @click="FSlogin" v-if="customActiveKey != 'tab1'">
+      <!-- <div class="otherLogin" v-if="customActiveKey != 'tab1'"><span class="titleTip">其他登录方式</span></div> -->
+      <!-- <div class="feishu" @click="FSlogin" v-if="customActiveKey != 'tab1'">
         <span class="FSicon">
           <img src="@/assets/feishu.png" alt="">
         </span>
         <span class="FSinfo">使用飞书快捷登录</span>
-      </div>
+      </div> -->
       <!-- <div class="user-login-other">
         <span>其他登陆方式</span>
         <a><a-icon class="item-icon" type="alipay-circle"></a-icon></a>

+ 1 - 1
vue.config.js

@@ -84,7 +84,7 @@ module.exports = {
          target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
-         // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
+        //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
         // target:'http://118.24.244.213:8804',