jihuaqiang преди 2 години
родител
ревизия
0c21469c1e
променени са 3 файла, в които са добавени 50 реда и са изтрити 8 реда
  1. 12 4
      components/CustomCardCover.vue
  2. 19 2
      pages/index.vue
  3. 19 2
      pages/luckdraw.vue

+ 12 - 4
components/CustomCardCover.vue

@@ -3,7 +3,8 @@
 <template>
     <!-- 改版之后的卡片 -->
     <div class="not-open-custom-card custom-card">
-        <div class="common-top">
+        <img class="customImg" v-if="posterType === 2 && !!customPosterInstalled" :src="customPosterInstalled" />
+        <div class="common-top" v-else>
           <img class="cover" v-if="isLottaryCpd" :src="require('../static/svg/img-custom-lottary-bg.svg')"  />
           <img class="cover" v-else :src="require('../static/svg/img-custom-common-bg.svg')"  />
           <img class="gift" :src="require('../static/svg/icon-gift.gif')" />
@@ -17,11 +18,12 @@
               </font-zoom>
           </div>
         </div>
+
         <!-- 底部公共模块 -->
         <div class="common-bottom" v-if="showBottomInfo">
             <div class="theme">
                 <img v-if="isLottaryCpd" class="theme-icon" :src="require('../static/svg/icon-last-time.svg')"/>
-                <span v-if="isLottaryCpd" class="theme-time" >{{validity}}</span>
+                <span v-if="isLottaryCpd" class="theme-time" >{{validity || '00:00:00'}}</span>
                 <span class="theme-info">{{isLottaryCpd ? 'Left' : 'Instant Giveaway'}}</span>
             </div>
             <div class="winner-info">
@@ -46,12 +48,14 @@ export default {
     amountValue: 0,
     tokenSymbol: "",
     playType: 1,
-    validityDuration: '',
+    validityDuration: "",
     userInfo: {},
     rewardType: 1,
     customizedReward: "",
     validity: "",
-    showBottomInfo: true
+    showBottomInfo: true,
+    customPosterInstalled: "",
+    posterType: 1
   },
   data() {
       return {
@@ -91,6 +95,10 @@ export default {
     border-radius: 16px;
     filter: drop-shadow(0px 2px 20px rgba(0, 0, 0, 0.1));
 
+    .customImg {
+        width: 100%;
+        min-height: 373px;
+    }
     .common-top {
       position: relative;
     }

+ 19 - 2
pages/index.vue

@@ -84,7 +84,7 @@
 			</div>
 			<template v-else>
 				<div class="redBagCustom" v-if="detail.postBizData.posterType === 2 && detail.postBizData.customPosterInstalled">
-					<img class="customImg" :src="detail.postBizData.customPosterInstalled" />
+					<!-- <img class="customImg" :src="detail.postBizData.customPosterInstalled" />
 					<div class="customBottom">
 						<div class="theme">
 							<span class="info">Instant Giveaway</span>
@@ -94,7 +94,24 @@
 							<span>to Share </span>
 							<span class="prize-name">{{detail.postBizData.amountValue + ' ' + detail.postBizData.currencySymbol}}</span>
 						</div>
-					</div>
+					</div> -->
+          <custom-card-cover
+              :totalCount="detail.postBizData.totalCount"
+              :amountValue="detail.postBizData.amountValue"
+              :tokenSymbol="detail.postBizData.tokenSymbol"
+              :currencyIconUrl="detail.postBizData.iconPath"
+              :playType="1"
+              :posterType="2"
+              :customPosterInstalled="detail.postBizData.customPosterInstalled"
+              :validity="validity"
+              :userInfo="{
+                  nickName: detail.postBizData.postUserInfo.nickName,
+                  avatarUrl: detail.postBizData.postUserInfo.avatarUrl
+              }"
+              :rewardType="detail.postBizData.rewardType"
+              :customizedReward="detail.postBizData.customizedReward"
+              :showBottomInfo="true"
+            ></custom-card-cover>
 				</div>
 				<div class="redBag" :class="{'auto-height': !isMoneyPrize}" v-else>
 					<!-- 货币类型 -->

+ 19 - 2
pages/luckdraw.vue

@@ -150,7 +150,7 @@
                         }">
                             <div v-if="status === 'not-open'">
                                 <template v-if="detail.postBizData.posterType === 2 && detail.postBizData.customPosterInstalled">
-                                  <img class="customImg" :src="detail.postBizData.customPosterInstalled" />
+                                  <!-- <img class="customImg" :src="detail.postBizData.customPosterInstalled" />
                                   <div class="customBottom">
                                     <div class="theme">
                                       <img class="icon" :src="require('../static/svg/icon-last-time.svg')"/>
@@ -162,7 +162,24 @@
                                       <span>to Share </span>
                                       <span class="prize-name">{{detail.postBizData.amountValue + ' ' + detail.postBizData.currencySymbol}}</span>
                                     </div>
-                                  </div>
+                                  </div> -->
+                                  <custom-card-cover
+                                    :totalCount="detail.postBizData.totalCount"
+                                    :amountValue="detail.postBizData.amountValue"
+                                    :tokenSymbol="detail.postBizData.tokenSymbol"
+                                    :currencyIconUrl="detail.postBizData.iconPath"
+                                    :playType="2"
+                                    :posterType="2"
+                                    :customPosterInstalled="detail.postBizData.customPosterInstalled"
+                                    :validity="validity"
+                                    :userInfo="{
+                                        nickName: detail.postBizData.postUserInfo.nickName,
+                                        avatarUrl: detail.postBizData.postUserInfo.avatarUrl
+                                    }"
+                                    :rewardType="detail.postBizData.rewardType"
+                                    :customizedReward="detail.postBizData.customizedReward"
+                                    :showBottomInfo="true"
+                                  ></custom-card-cover>
                                 </template>
                                 <template v-else>
                                   <!-- 旧版 样式,后续更新时在 custom-card-cover 公共组件内维护-->