소스 검색

时间显示

zhanghui 1 년 전
부모
커밋
c5aaced3e2

+ 4 - 4
pages/groupbuying_details/index.vue

@@ -73,11 +73,11 @@
                   <text class="yellow" v-if="storeInfo.isStart">截止倒计时</text>
                   <text class="yellow" v-else>开团倒计时</text>
 									<!-- <text class="red2">02时25分19秒</text> -->
-									<u-count-down v-if="storeInfo.isStart"  :style="{'height':'96rpx'}" :time="storeInfo.seconds * 1000" format="HH:mm:ss" @change="timechange">
-										<text  :style="{'color':'#B42A3E','font-size':'28rpx'}">{{timeData.days}}天{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}时{{ timeData.minutes }}分{{ timeData.seconds }}秒</text>
+									<u-count-down v-if="storeInfo.isStart"  :style="{'height':'96rpx'}" :time="storeInfo.seconds * 1000" format="HH时mm分ss秒" @change="timechange">
+<!--										<text  :style="{'color':'#B42A3E','font-size':'28rpx'}">{{timeData.days}}天{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}时{{ timeData.minutes }}分{{ timeData.seconds }}秒</text>-->
 									</u-count-down>
-                  <u-count-down v-else  :style="{'height':'96rpx'}" :time="storeInfo.secondsStart * 1000" format="HH:mm:ss" @change="timechange">
-                    <text  :style="{'color':'#B42A3E','font-size':'28rpx'}">{{timeData.days}}天{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}时{{ timeData.minutes }}分{{ timeData.seconds }}秒</text>
+                  <u-count-down v-else  :style="{'height':'96rpx'}" :time="storeInfo.secondsStart * 1000" format="HH时mm分ss秒" @change="timechange">
+<!--                    <text  :style="{'color':'#B42A3E','font-size':'28rpx'}">{{timeData.days}}天{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}时{{ timeData.minutes }}分{{ timeData.seconds }}秒</text>-->
                   </u-count-down>
 								</view>
 							</view>

+ 4 - 4
pages/index/diy/components/latestGroupBuying.vue

@@ -61,11 +61,11 @@
 						<image :style="{'width':'26rpx','height':'26rpx'}" src="http://www.gzzzyd.com/groupon/home_slices/倒计时@2x.png" mode="scaleToFill" />
 						<text class="yellow" v-if="e.isStart">截止倒计时</text>
 						<text class="yellow" v-else>开团倒计时</text>
-						<u-count-down v-if="e.isStart" :time="e.seconds * 1000" format="HH:mm:ss" @change="timechange">
-							<text  :style="{'color':'#B42A3E','font-size':'26rpx'}">{{timeData.days}}天{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}时{{ timeData.minutes }}分{{ timeData.seconds }}秒</text>
+						<u-count-down v-if="e.isStart" :time="e.seconds * 1000" format="HH时mm分ss秒" @change="timechange">
+<!--							<text  :style="{'color':'#B42A3E','font-size':'26rpx'}">{{timeData.days}}天{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}时{{ timeData.minutes }}分{{ timeData.seconds }}秒</text>-->
 						</u-count-down>
-						<u-count-down v-if="!e.isStart" :time="e.secondsStart * 1000" format="HH:mm:ss" @change="timechange2">
-						  <text  :style="{'color':'#B42A3E','font-size':'26rpx'}">{{timeData.days}}天{{ timeData2.hours>10?timeData2.hours:'0'+timeData2.hours}}时{{ timeData2.minutes }}分{{ timeData2.seconds }}秒</text>
+						<u-count-down v-if="!e.isStart" :time="e.secondsStart * 1000" format="HH时mm分ss秒" @change="timechange2">
+<!--						  <text  :style="{'color':'#B42A3E','font-size':'26rpx'}">{{timeData.days}}天{{ timeData2.hours>10?timeData2.hours:'0'+timeData2.hours}}时{{ timeData2.minutes }}分{{ timeData2.seconds }}秒</text>-->
 						</u-count-down>
 
 					</view>

+ 5 - 5
uni_modules/uview-ui/components/u-count-down/u-count-down.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="u-count-down">
 		<slot>
-			<text class="u-count-down__text">{{ formattedTime }}</text>
+			<text class="u-count-down__text" :style="{'color':'#B42A3E','font-size':'26rpx'}">{{ formattedTime }}</text>
 		</slot>
 	</view>
 </template>
@@ -21,11 +21,11 @@
 	 * @property {String}			format		时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒  (默认 'HH:mm:ss' )
 	 * @property {Boolean}			autoStart	是否自动开始倒计时 (默认 true )
 	 * @property {Boolean}			millisecond	是否展示毫秒倒计时 (默认 false )
-	 * @event {Function} finish 倒计时结束时触发 
-	 * @event {Function} change 倒计时变化时触发 
+	 * @event {Function} finish 倒计时结束时触发
+	 * @event {Function} change 倒计时变化时触发
 	 * @event {Function} start	开始倒计时
-	 * @event {Function} pause	暂停倒计时 
-	 * @event {Function} reset	重设倒计时,若 auto-start 为 true,重设后会自动开始倒计时 
+	 * @event {Function} pause	暂停倒计时
+	 * @event {Function} reset	重设倒计时,若 auto-start 为 true,重设后会自动开始倒计时
 	 * @example <u-count-down :time="time"></u-count-down>
 	 */
 	export default {