朱鑫波 4 gadi atpakaļ
vecāks
revīzija
e45307e287
2 mainītis faili ar 36 papildinājumiem un 27 dzēšanām
  1. 35 26
      src/views/modules/kuaishouapp/account/originality.vue
  2. 1 1
      vue.config.js

+ 35 - 26
src/views/modules/kuaishouapp/account/originality.vue

@@ -69,11 +69,15 @@
                 <a-switch v-model="record.showSwich" @change="onChangeSwitch(record)" />
               </span>
               <span slot="actionTwo" slot-scope="text, record">
-                <a @click="editOriginality(record)">编辑</a>
+                <a @click="editOriginality(record)" :disabled="record.creativeMaterialType+''=='4'">编辑</a>
               </span>
               <span slot="status" slot-scope="text">{{ text | status }}</span>
               <span slot="putStatus" slot-scope="text">{{ text | putStatus }}</span>
-              <img slot="coverUrl" slot-scope="text" :src="text" alt="" style="width: 100px" />
+              <div slot="coverUrl" slot-scope="text,record">
+                <img v-if="record.creativeMaterialType+''=='4'"  :src="JSON.parse(record.materialUrl)[0]" alt="" style="width: 100px" />
+                <img v-else  :src="text" alt="" style="width: 100px" />
+              </div>
+              
               <span slot="captions" slot-scope="text">
                 <span v-for="(item, index) of JSON.parse(text)" :key="index">{{ item }}</span>
               </span>
@@ -427,33 +431,38 @@ export default {
   methods: {
     editOriginality(item) {
       this.creativeId = item.creativeId
+      if (item.creativeMaterialType + '' == '4') {
+        this.image.coverUrl = JSON.parse(item.materialUrl)
 
-      getAction('/kuaishou/batch/getActionBarText', {
-        campaignId: localStorage.getItem('campaignId'),
-      }).then((res) => {
-        if (res.success) {
-          this.appList = res.result
-        }
-      })
-      getAction('/kuaishou/batch/getVideoDetail', {
-        photoId: item.photoId,
-      }).then((res) => {
-        if (res.success) {
-          console.log(res)
-          this.video.url = res.result.url
-          this.video.photoId = res.result.photoId
+        this.visible = true
+      } else {
+        getAction('/kuaishou/batch/getActionBarText', {
+          campaignId: localStorage.getItem('campaignId'),
+        }).then((res) => {
+          if (res.success) {
+            this.appList = res.result
+          }
+        })
+        getAction('/kuaishou/batch/getVideoDetail', {
+          photoId: item.photoId,
+        }).then((res) => {
+          if (res.success) {
+            console.log(res)
+            this.video.url = res.result.url
+            this.video.photoId = res.result.photoId
 
-          this.image.coverUrl = item.coverUrl
-          this.image.imageToken = item.imageToken
+            this.image.coverUrl = item.coverUrl
+            this.image.imageToken = item.imageToken
 
-          this.visible = true
-          this.$nextTick(() => {
-            this.form.setFieldsValue(
-              pick(item, ['clickTrackUrl', 'actionBarText', 'creativeName', 'description', 'creativeMaterialType'])
-            )
-          })
-        }
-      })
+            this.visible = true
+            this.$nextTick(() => {
+              this.form.setFieldsValue(
+                pick(item, ['clickTrackUrl', 'actionBarText', 'creativeName', 'description', 'creativeMaterialType'])
+              )
+            })
+          }
+        })
+      }
     },
     handleOk() {
       this.handleSubmit()

+ 1 - 1
vue.config.js

@@ -60,7 +60,7 @@ module.exports = {
       '/jeecg-boot': {
          target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
-        // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        // target: 'http://192.168.1.72:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.94:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震