Browse Source

提交代码

zhuxinbo 4 years ago
parent
commit
f283d43b7a

+ 18 - 2
src/views/modules/kuaishouapp/account/stepForm/Step2.vue

@@ -39,7 +39,9 @@
             }}
           </a-select-option>
         </a-select>
-        <!-- <a @click="addApplication" style="margin-left:10px">添加应用</a> -->
+        <!-- <a @click="addApplication" style="margin-left:10px">刷新应用</a> -->
+        <a-button type="primary" @click="addApplication" :loading="tongbuLoading">
+          刷新应用</a-button>
         <creat-application ref="application" />
       </a-form-item>
       <a-form-item label="转化类型" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
@@ -487,6 +489,7 @@
 
     data() {
       return {
+        tongbuLoading: false,
         convert: false,
         convertId: "",
         convertList: [],
@@ -791,7 +794,20 @@
       },
 
       addApplication() {
-        this.$refs.application.showApplication()
+        this.tongbuLoading = true
+        // this.$refs.application.showApplication()
+        getAction('/kuaishou/batch/syncAppList', {
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          if (res.success) {
+            this.tongbuLoading = false
+            this.$message.success(res.message)
+            this.getAppList()
+          } else {
+            this.tongbuLoading = false
+            this.$message.error(res.message)
+          }
+        })
       },
       handleOk() {
         var that = this

+ 26 - 5
src/views/modules/material/supplierMaterial.vue

@@ -474,7 +474,10 @@
             </div>
             <div>
               <a-form-item label="水印链接" v-if="watermarkUrl">
-                  <a-input v-model="watermarkUrl" type="text" style="width:200%" readonly />
+                <a-input v-model="watermarkUrl" type="text" style="width:200%" readonly />
+              </a-form-item>
+              <a-form-item label="生成水印" v-else>
+                <a-button type="primary" @click="createWater" :loading="creatLoading">生成</a-button>
               </a-form-item>
             </div>
             <div>
@@ -514,7 +517,7 @@
       <img :src="bohui" alt="" style="width:100%">
     </a-modal>
 
-   
+
 
   </a-card>
 </template>
@@ -658,7 +661,7 @@
           name: [],
           size: []
         },
-        watermarkUrl: "",
+        watermarkUrl: null,
         url: {
           list: '/ctop/materialInfo/supplierList'
         },
@@ -706,7 +709,8 @@
         kuaishouData: null,
         douyinData: null,
         bohui: "",
-        bohuiShow: false
+        bohuiShow: false,
+        creatLoading: false
       }
     },
     filters: {
@@ -795,6 +799,20 @@
       }
     },
     methods: {
+      createWater() {
+        this.creatLoading = true
+        getAction('/ctop/materialInfo/supplierWatermark', {
+          id: this.id
+        }).then(res => {
+          if (res.success) {
+            console.log(res)
+            this.watermarkUrl = res.result
+            this.creatLoading = false
+          } else {
+            this.creatLoading = true
+          }
+        })
+      },
       showBoHui(item) {
         this.bohui = item
         this.bohuiShow = true
@@ -839,6 +857,7 @@
       },
 
       showDetail(item) {
+        this.watermarkUrl = null
         this.visibleDetail = true
         this.showUrl = item.url
         this.id = item.id
@@ -868,7 +887,9 @@
         }).then(res => {
 
           if (res.success) {
-            this.watermarkUrl = res.result.records[0].watermarkUrl
+            this.watermarkUrl = res.result.records.length > 0 ? res.result.records[0].watermarkUrl : null
+          } else {
+            this.watermarkUrl = null
           }
         })