Ver Fonte

[edit][getValidity]

zhangwei há 3 anos atrás
pai
commit
1e51fb66f7
1 ficheiros alterados com 20 adições e 10 exclusões
  1. 20 10
      pages/index.vue

+ 20 - 10
pages/index.vue

@@ -44,7 +44,7 @@
 						<div class="txt">AWESOME! YOU Will GET</div>
 						<div class="head-money-area">
 							<img :src="currencyIconUrl" alt />
-							<span class="money-txt">{{ receiveAmount  }}</span>
+							<span class="money-txt">{{ receiveAmount }}</span>
 						</div>
 					</div>
 				</div>
@@ -52,8 +52,8 @@
 				<!-- 领取列表 -->
 				<div class="luck-list-title">
 					<div>{{ detail.postBizData.receiveCount || 0 }}/{{ detail.postBizData.totalCount || 0 }} Got</div>
-					<div> {{ detail.postBizData.receiveAmountValue  }} / {{
-						detail.postBizData.amountValue  || ''
+					<div> {{ detail.postBizData.receiveAmountValue }} / {{
+							detail.postBizData.amountValue || ''
 					}} {{ detail.postBizData.amountCurrencyCode || '' }}</div>
 				</div>
 				<div class="luck-list" @scroll="handleScroll($event)">
@@ -66,7 +66,7 @@
 						</div>
 						<div class="luck-money">
 							<img :src="item.currencyIconUrl" alt />
-							<div class="luck-money-txt">{{ item.amountValue  || 0 }}</div>
+							<div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
 						</div>
 						<div class="luck-king" v-if="item.maxAmount">
 							<img src="/svg/icon-king-hat.svg" alt />
@@ -136,8 +136,8 @@
 			<!-- 领取列表 -->
 			<div class="luck-list-title">
 				<div>{{ detail.postBizData.receiveCount || 0 }}/{{ detail.postBizData.totalCount || 0 }} Got</div>
-				<div> {{ detail.postBizData.receiveAmountValue  }} / {{
-					detail.postBizData.amountValue  || ''
+				<div> {{ detail.postBizData.receiveAmountValue }} / {{
+						detail.postBizData.amountValue || ''
 				}} {{ detail.postBizData.amountCurrencyCode || '' }}</div>
 			</div>
 			<div class="luck-list" @scroll="handleScroll($event)">
@@ -150,7 +150,7 @@
 					</div>
 					<div class="luck-money">
 						<img :src="item.currencyIconUrl" alt />
-						<div class="luck-money-txt">{{ item.amountValue  || 0 }}</div>
+						<div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
 					</div>
 					<div class="luck-king" v-if="item.maxAmount">
 						<img src="/svg/icon-king-hat.svg" alt />
@@ -392,6 +392,15 @@ export default {
 					_h = moment.duration(_d1.diff(_d2)).hours()
 					_m = moment.duration(_d1.diff(_d2)).minutes()
 					_s = moment.duration(_d1.diff(_d2)).seconds()
+					if (_h < 10) {
+						_h = '0' + _h
+					}
+					if (_m < 10) {
+						_m = '0' + _m
+					}
+					if (_s < 10) {
+						_s = '0' + _s
+					}
 					this.validity = `${_h}:${_m}:${_s}`
 				} else {
 					clearInterval(timer)
@@ -451,7 +460,7 @@ export default {
 		// 	win.addEventListener(resizeEvt, recalc, false);
 		// 	doc.addEventListener('DOMContentLoaded', recalc, false);
 		// })(document, window);
-		
+
 		document.documentElement.style.fontSize = '62.5%'
 		if (this.isMobile()) {
 			this.show_moblie = true
@@ -499,10 +508,11 @@ body,
 
 .moblie {
 	display: flex;
-    flex-wrap: wrap;
-    height: 100%;
+	flex-wrap: wrap;
+	height: 100%;
 	align-content: flex-start;
 	flex-direction: column;
+
 	.layer {
 		position: fixed;
 		width: 100%;