浏览代码

[bug] style fix

jihuaqiang 2 年之前
父节点
当前提交
cc403d98ca

二进制
src/assets/subject/icon-clock.png


二进制
src/assets/subject/icon-prize.png


+ 10 - 0
src/assets/subject/icon-uninstall-bg.svg

@@ -0,0 +1,10 @@
+<svg width="330" height="56" viewBox="0 0 330 56" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect opacity="0.2" width="330" height="56" fill="url(#paint0_linear_22715_225612)"/>
+<defs>
+<linearGradient id="paint0_linear_22715_225612" x1="1.69508e-06" y1="27.3488" x2="330" y2="27.3488" gradientUnits="userSpaceOnUse">
+<stop stop-color="white"/>
+<stop offset="0.36788" stop-color="white"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+</defs>
+</svg>

二进制
src/assets/subject/img-custom-common-bg.png


二进制
src/assets/subject/img-custom-lottary-bg.png


+ 54 - 38
src/view/components/custom-card-horizontal-cover.vue

@@ -61,16 +61,23 @@
                 </div>
             </div>
             <div class="custom-card-prize">
-                <component-zoom width="210">
+                <component-zoom :width="showBottom ? 210 : 300">
                     <span class="custom-card-prize-name" id="custom-name" >
+                        <img class="custom-card-prize-gift-inline" :src="require('@/assets/subject/icon-gift-inline.svg')" />
                         {{data.customizedReward}}
                         <span class="custom-card-prize-name-total">X{{data.totalCount}}</span>
                     </span>
                 </component-zoom>
             </div>
             <div class="custom-card-desc" :class="{'custom-card-desc-lottary': !isLottaryCpd}">
-                <span class="last-time" v-if="isLottaryCpd">{{data.validityDuration}} H</span>
-                <span class="trophy-count">{{data.totalCount}} WINNERS</span>
+                <span class="last-time" v-if="isLottaryCpd">
+                    <img class="custom-card-desc-clock-icon" :src="require('@/assets/subject/icon-clock.png')" />
+                    {{data.validityDuration}} H
+                </span>
+                <span class="trophy-count">
+                    <img class="custom-card-desc-prize-icon" :src="require('@/assets/subject/icon-prize.png')" />
+                    {{data.totalCount}} WINNERS
+                </span>
             </div>
         </template>
     </div>
@@ -237,22 +244,35 @@ watch(() => props.data, () => {
 
     &-prize {
         position: absolute;
-        left: 9%;
-        top: 22%;
-        height: 20px;
+        left: 0%;
+        top: 16%;
+        width: 65%;
+        line-height: 42px;
         display: flex;
+        background-image: url('@/assets/subject/icon-uninstall-bg.svg');
+        background-size: 100% 100%;
+        padding-left: 5px;
 
         &-name {
             font-weight: 800;
             font-size: 16px;
-            line-height: 20px;
+            // line-height: 20px;
             letter-spacing: 0.22px;
             color: #FFFFFF;
             text-shadow: 0px 1.46341px 0px rgba(0, 0, 0, 0.15);
+            display: flex;
+            justify-content: center;
+            align-items: center;
             &-total {
                 color: #F5C03F;
             }
         }
+
+        &-gift-inline {
+            width: 30px;
+            height: 30px;
+            padding: 0 5px;
+        }
     }
     &-desc {
         font-size: 12px;
@@ -260,42 +280,38 @@ watch(() => props.data, () => {
         letter-spacing: 0.219512px;
         color: #FFFFFF;
         opacity: 0.7;
+        position: absolute;
+        left: 0;
+        top: 37%;
+        display: flex;
+        padding-left: 4%;
         .last-time {
-            position: absolute;
-            left: 7.5%;
-            top: 38%;
-        }
-        .trophy-count {
-            position: absolute;
-            left: 21%;
-            top: 38%;
+            display: flex;
+            align-items: center;
+            margin-right: 12px;
+            img {
+                width: 12px;
+                margin-right: 2px;
+            }
         }
-    }
-    &-desc-lottary {
         .trophy-count {
-            position: absolute;
-            left: 8%;
-            top: 38%;
+            display: flex;
+            align-items: center;
+
+            img {
+                width: 12px;
+                margin-right: 2px;
+            }
         }
     }
- 
 }
-   .custom-card-in-poster {
-        .custom-card-prize {
-            top: 32%;
-        }
-        .custom-card-desc{
-            .last-time {
-                top: 54%;
-            }
-            .trophy-count {
-                top: 54%;
-            }
-        }
-        .custom-card-desc-lottary {
-            .trophy-count {
-                top: 54%;
-            }
-        }
+.custom-card-in-poster {
+    .custom-card-prize {
+        top: 24%;
+        line-height: 54px;
+    }
+    .custom-card-desc{
+        top: 50%;
     }
+}
 </style>

+ 8 - 1
src/view/iframe/publish/give-dialog.vue

@@ -1205,6 +1205,7 @@ const submitRequest = async () => {
     if(rewardType === RewardType.custom) {
         // 通用奖品 类型的活动,添加奖品名称
         formData.customizedReward = customizedReward;
+        delete formData.amountValue;
     } else {
         // 货币类型 添加货币code
         formData.amountCurrencyCode = baseFormData.amountCurrencyCode;
@@ -1379,6 +1380,8 @@ const onAmountInput = () => {
     // val = val.replace(/[^\d^\.]+/g, "");
     val = val.replace(/^\D*(\d*(?:\.\d{0,18})?).*$/g, '$1');
 
+    const maxCount = baseFormData.rewardType === RewardType.money ? Number.MAX_SAFE_INTEGER : 100000000;
+
     if(val == '00') {
         val = '0'
     }
@@ -1390,8 +1393,12 @@ const onAmountInput = () => {
         }
     }
 
-    if(baseFormData.rewardType === RewardType.custom) {
+    if (baseFormData.rewardType === RewardType.custom) {
+        const maxCount = 100000000;
         val = val.replace(/^(0)*/, '').replace(/\./, ''); // 通用奖品类型 过滤掉起始位的0和小数点符号
+        if (val > maxCount) { 
+            val = maxCount
+        }
         baseFormData.totalCount = val;
     }