chenrui 2 anos atrás
pai
commit
fc798abaed

+ 5 - 2
src/views/promotionManagement/promotionInfo/list.vue

@@ -70,7 +70,10 @@
         </template>
         <!-- 促销展示 -->
         <template slot="salesShow" slot-scope="text, record">
-          <div @click="handleSaleShow(record)" v-if="record.images && record.images.length>0">
+          <div @click="handleSaleShow(record)" v-if="record.contentType!='LINK'&&record.images && record.images.length>0">
+            <img :src="record.images[0]" alt="图片走丢啦" width="60" />
+          </div>
+          <div v-else-if="record.contentType=='LINK'&&record.images && record.images.length>0">
             <img :src="record.images[0]" alt="图片走丢啦" width="60" />
           </div>
           <span v-else>--</span>
@@ -160,7 +163,7 @@ export default {
       const _this = this
       _this.openShowModal = true
       this.$nextTick(() => {
-        _this.$refs.promotionShow.getDetail({ id: row.promoActiveSn })
+        _this.$refs.promotionShow.getDetail({ id: row.promoActiveSn, showType: row.contentType })
       })
     },
     //  重置

+ 12 - 4
src/views/promotionManagement/promotionInfo/promotionShowModal.vue

@@ -10,8 +10,11 @@
     :width="500">
     <div class="promotionDesc-con">
       <img src="@/assets/iphone.png" alt="图片走丢了" srcset="">
-      <div class="promotionDescCon" v-html="mainContent">
-
+      <div class="promotionDescCon" v-show="showType=='IMAGE_CONTENT'" v-html="mainContent"></div>
+      <div class="promotionDescCon" v-show="showType=='VIDEO'">
+        <video width="100%" height="auto">
+          <source :src="mainContent" type="video/mp4"></source>
+        </video>
       </div>
     </div>
     <div class="btn-cont">
@@ -37,12 +40,17 @@ export default {
     return {
       modalTit: '促销展示',
       isShow: this.openModal, //  是否打开弹框
-      mainContent: ''
+      mainContent: '', // 主要显示内容
+      showType: undefined//
     }
   },
   methods: {
     getDetail (con) {
-      promoTerminalDetail(con).then(res => {
+      const ajaxData = {
+        id: con.id
+      }
+      this.showType = con.showType
+      promoTerminalDetail(ajaxData).then(res => {
         if (res.status == 200) {
           this.mainContent = res.data.content
         }