Commit 2f395af8 authored by 刘用法's avatar 刘用法

倒计时样式

parent 2038e6b8
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<view> <view>
<view v-if="showCountTime" class="bottom-left-view"> <view v-if="showCountTime" class="bottom-left-view">
<view :class="['bottom-tag-view', {'timeout': timeout}]"><text>{{tagText}}</text></view> <view :class="['bottom-tag-view', {'timeout': timeout}]"><text>{{tagText}}</text></view>
<u-count-down :timestamp="timestamp" font-size="44" show-days <u-count-down :timestamp="timestamp" font-size="40" show-days separator="zh"
:color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange" ref="order-count-down"></u-count-down> :color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange" ref="order-count-down"></u-count-down>
</view> </view>
<view v-else-if="showTime"> <view v-else-if="showTime">
......
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<view v-if="order.currentOverTime > 0" class="time-view"> <view v-if="order.currentOverTime > 0" class="time-view">
<text style="margin-right: 8rpx;">{{order.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</text> <text style="margin-right: 8rpx;">{{order.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</text>
<u-count-down <u-count-down
:timestamp="3600 * 100 || timestampDiff(order.currentOverTime)" :timestamp="timestampDiff(order.currentOverTime)"
font-size="20" font-size="20"
color="#FFFFFF" color="#FFFFFF"
bg-color="transparent" bg-color="transparent"
...@@ -129,7 +129,10 @@ ...@@ -129,7 +129,10 @@
separator-size="20" separator-size="20"
:ref="'uCountDown'" :ref="'uCountDown'"
height="20" height="20"
:show-days="false" :show-days="threeDays()"
:show-minutes="!threeDays()"
:show-seconds="!threeDays()"
:separator="threeDays() ? 'zh' : 'colon'"
@change="timeOutChange(order.currentOverTime)" > @change="timeOutChange(order.currentOverTime)" >
</u-count-down> </u-count-down>
</view> </view>
...@@ -633,6 +636,9 @@ ...@@ -633,6 +636,9 @@
uni.navigateTo({ uni.navigateTo({
url: 'pages/photo/list' url: 'pages/photo/list'
}) })
},
threeDays() {
return this.timestampDiff(order.currentOverTime) > 3600 * 24 * 3
} }
} }
}; };
...@@ -911,6 +917,8 @@ ...@@ -911,6 +917,8 @@
display: flex; display: flex;
font-size: 20rpx; font-size: 20rpx;
color: #FFFFFF; color: #FFFFFF;
align-items: center;
justify-content: space-between;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment