Browse Source

Merge branch 'dev_1.1.5' of https://git.yishihui.com/DeNet/de-net into dev_1.1.5

zhangwei 2 years ago
parent
commit
6d0ba77a8d

BIN
src/assets/subject/icon-clock.png


BIN
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>

BIN
src/assets/subject/img-custom-common-bg.png


BIN
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;
     }
 

+ 2 - 1
src/view/iframe/publish/tool-box/child/editor.vue

@@ -146,7 +146,8 @@ const getTitleByHtmlStr = (str = '') => {
   let tag_end = '</title>'
   let index1 = str.indexOf(tag_start) + tag_start.length;
   let index2 = str.indexOf(tag_end);
-  if (index1 < 0 || index2 < 0) {
+  
+  if (index1 < tag_start.length || index2 < 0) {
     return '';
   }
 

+ 45 - 83
src/view/popup/tabbar-page/message/index.vue

@@ -4,53 +4,33 @@
       <div class="list-wrapper" ref="pageGiveListDom">
         <div class="give-list" v-if="currentTabIndex == 0">
           <template v-if="giveList.length">
-            <div
-              class="cell"
-              :class="{ 'cell-center': item.type == 1 || item.type == 3 }"
-              v-for="(item, index) in giveList"
-              :key="index"
-              @click="clickListItem(item, index)"
-            >
-              <red-dot
-                class="red-dots"
-                v-if="item.unReadMsgCount > 0 && isReadMsg"
-              ></red-dot>
+            <div class="cell" :class="{ 'cell-center': item.type == 1 || item.type == 3 }"
+              v-for="(item, index) in giveList" :key="index" @click="clickListItem(item, index)">
+              <red-dot class="red-dots" v-if="item.unReadMsgCount > 0 && isReadMsg"></red-dot>
 
               <div class="img-wrapper">
                 <!-- 收到红包 -->
                 <template v-if="item.type == 1 || item.type == 3">
                   <img class="icon-avatar" :src="item.userInfo.avatarUrl" />
-                  <img
-                    class="icon-give"
-                    :src="require('@/assets/svg/icon-get-giveaways-s.svg')"
-                  />
+                  <img class="icon-give" :src="require('@/assets/svg/icon-get-giveaways-s.svg')" />
                 </template>
                 <!-- 发出去红包 -->
                 <template v-else-if="2">
-                  <img
-                    class="icon-big-give"
-                    :src="require('@/assets/svg/icon-send-giveaways-s.svg')"
-                  />
-                  <img
-                    class="icon-mark-give"
-                    :src="require('@/assets/svg/icon-send-giveaways-mark.svg')"
-                  />
+                  <img class="icon-big-give" :src="require('@/assets/svg/icon-send-giveaways-s.svg')" />
+                  <img class="icon-mark-give" :src="require('@/assets/svg/icon-send-giveaways-mark.svg')" />
                 </template>
               </div>
-              <div
-                class="info-wrapper"
-                :class="{ 'info-center': item.type == 1 }"
-              >
+              <div class="info-wrapper" :class="{ 'info-center': item.type == 1 }">
                 <div class="left">
                   <div class="nickname">
                     <template v-if="item.type == 1">
-                        Get Giveaway
+                      Get Giveaway
                     </template>
                     <template v-else-if="item.type == 2">
-                        {{ item.postTaskLuckdrop.luckdropType === 1 ? 'Send Giveaway' : 'Lottery Giveaway' }}
+                      {{ item.postTaskLuckdrop.luckdropType === 1 ? 'Send Giveaway' : 'Lottery Giveaway' }}
                     </template>
                     <template v-else-if="item.type == 3">
-                        Lottery
+                      Lottery
                     </template>
                   </div>
                   <div class="time">
@@ -59,20 +39,17 @@
                 </div>
                 <div class="right">
                   <div class="msg">
-                    <div
-                      class="bold"
-                      :class="{
+                    <div class="bold" :class="{
                         'align-content':
                           (item.type == 2 || 
                             (item.type == 1 && item.status == 1)) &&
                           item?.amount?.length + item?.currencySymbol?.length > 12,
-                      }"
-                    >
+                      }">
                       <!-- 收到的 -->
                       <template v-if="item.type == 1">
                         <!-- 进行中-->
                         <template v-if="item.status == 0">
-                          in progress
+                          In progress
                         </template>
                         <!-- 已完成 -->
                         <template v-else-if="item.status == 1">
@@ -80,13 +57,12 @@
                           <template v-if="item.rewardType === RewardType.money">
                             <span class="blance">
                               <a-tooltip :title="item.amount">
-                                {{ getBit(item.amount) }}</a-tooltip
-                              >
+                                {{ getBit(item.amount) }}</a-tooltip>
                             </span>
                             <div class="coin-type-wrapper">
                               <span class="coin-type">{{
                                 item.currencySymbol || ""
-                              }}</span>
+                                }}</span>
                               <img :src="item.currencyIconPath" alt="" />
                             </div>
                           </template>
@@ -113,7 +89,7 @@
                           <div class="coin-type-wrapper">
                             <span class="coin-type">{{
                               item.currencySymbol || ""
-                            }}</span>
+                              }}</span>
                             <img :src="item.currencyIconPath" alt="" />
                           </div>
                         </template>
@@ -125,7 +101,7 @@
                       <template v-else-if="item.type == 3">
                         <template v-if="item.status == 1">In Progress</template>
                         <template v-else-if="item.status == 2">
-                        Open in {{ item.downTime || '' }}
+                          Open in {{ item.downTime || '' }}
                         </template>
                         <template v-else-if="item.status == 3">
                           Unfinished
@@ -141,7 +117,7 @@
                             <div class="coin-type-wrapper">
                               <span class="coin-type">{{
                                 item.currencySymbol || ""
-                              }}</span>
+                                }}</span>
                               <img :src="item.currencyIconPath" alt="" />
                             </div>
                           </template>
@@ -149,7 +125,7 @@
                           <template v-else>
                             <span class="blance cuntom-prize">{{item.customizedReward}}</span>
                           </template>
-                          
+
                         </template>
                         <template v-else-if="item.status == 5">
                           Didn't win
@@ -167,86 +143,72 @@
                       </template>
                       <!-- 进行中 -->
                       <template v-else-if="item.status == 1">
-                        {{ item.postTaskLuckdrop.receivedCount }}/{{
+                        <template v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 2">
+                          {{ item.downTime || '' }}
+                        </template>
+                        <template v-else>
+                          {{ item.postTaskLuckdrop.receivedCount }}/{{
                           item.postTaskLuckdrop.totalCount
-                        }}
+                          }}
+                        </template>
                       </template>
                       <!-- 2:已结束; 3:提前终止-->
                       <template v-else-if="item.status == 2 || item.status == 3">
                         <template v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 1">
-                            ({{
-                            item.status == 2 ? "Time expired" : "Termination"
-                            }}) {{ item.postTaskLuckdrop.receivedCount }}/{{
+                          ({{
+                          item.status == 2 ? "Time expired" : "Termination"
+                          }})
+                          <template v-if="item.status == 2 || item.status == 3 && item.srcContentId">
+                            {{ item.postTaskLuckdrop.receivedCount }}/{{
                             item.postTaskLuckdrop.totalCount
                             }}
+                          </template>
                         </template>
                         <template v-else>
-                            Termination
+                          Termination
                         </template>
                       </template>
                       <!-- 红包提前终止/退款(进行中)显示-->
                       <template v-if="item.status == 4">
-                        {{ item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 1 ? 'Terminating' : 'Open in ' + item.downTime || '' }}
+                        {{ item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 1 ? 'Terminating' : 'Open in '
+                        + item.downTime || '' }}
                       </template>
 
                       <!-- 进行中或者未发送成功时显示 
                                                 v-if="item.status == 1 || item.postTaskLuckdrop.reSendAvailable"-->
                       <div class="desc-bottom-bar">
                         <!-- 没有终止红包时显示 -->
-                        <div
-                          v-if="item.postTaskLuckdrop.terminatedAvailable"
-                          class="btn"
-                          @click.stop="terminaHandler(item, index)"
-                        >
+                        <div v-if="item.postTaskLuckdrop.terminatedAvailable" class="btn"
+                          @click.stop="terminaHandler(item, index)">
                           Termination
                         </div>
 
                         <!-- 红包未发出显示 -->
-                        <div
-                          class="btn send-btn"
-                          v-if="item.postTaskLuckdrop.reSendAvailable"
-                          @click.stop="sendTwitter(item)"
-                        >
+                        <div class="btn send-btn" v-if="item.postTaskLuckdrop.reSendAvailable"
+                          @click.stop="sendTwitter(item)">
                           Send
                         </div>
-                        <div
-                          v-else-if="item.srcContentId"
-                          class="btn detail-btn"
-                          @click.stop="clickListItem(item, index)"
-                        >
+                        <div v-else-if="item.srcContentId" class="btn detail-btn"
+                          @click.stop="clickListItem(item, index)">
                           details
                         </div>
                       </div>
                     </div>
                   </div>
                   <!-- 发红包—— 未发出、进行中 隐藏 -->
-                  <img
-                    v-if="item.type != 2"
-                    class="icon"
-                    :src="require('@/assets/svg/icon-cell-arrow-right.svg')"
-                  />
+                  <img v-if="item.type != 2" class="icon" :src="require('@/assets/svg/icon-cell-arrow-right.svg')" />
                 </div>
               </div>
             </div>
           </template>
           <template v-else>
-            <img
-              class="icon-empty"
-              :src="require('@/assets/svg/icon-empty-list.svg')"
-            />
+            <img class="icon-empty" :src="require('@/assets/svg/icon-empty-list.svg')" />
           </template>
         </div>
       </div>
     </div>
-    <modal
-      :visible="modalVisible"
-      :title="modalTitle"
-      :content="modalContent"
-      cancelText="Termination"
-      confirmText="Cancel"
-      @cancel="modalCancel"
-      @confirm="modalConfirm"
-    />
+    <modal :visible="modalVisible" :title="modalTitle" :content="modalContent" cancelText="Termination"
+      confirmText="Cancel" @cancel="modalCancel" @confirm="modalConfirm" />
   </div>
 </template>