|
@@ -87,11 +87,23 @@ function convertTime(time) { |
|
@@ -87,11 +87,23 @@ function convertTime(time) { |
87
|
}
|
87
|
}
|
88
|
|
88
|
|
89
|
function setPageTime() {
|
89
|
function setPageTime() {
|
90
|
- var i, showTime;
|
90
|
+ var i, text, showTime;
|
91
|
|
91
|
|
92
|
for (i = 0; i < limitTime.length; i++) {
|
92
|
for (i = 0; i < limitTime.length; i++) {
|
|
|
93
|
+ if (limitTime[i].time < 0) {
|
|
|
94
|
+ return;
|
|
|
95
|
+ }
|
|
|
96
|
+
|
93
|
limitTime[i].time -= 1000;
|
97
|
limitTime[i].time -= 1000;
|
94
|
showTime = convertTime(limitTime[i].time);
|
98
|
showTime = convertTime(limitTime[i].time);
|
|
|
99
|
+ if (showTime) {
|
|
|
100
|
+ text = showTime;
|
|
|
101
|
+ if (limitTime[i].pre) {
|
|
|
102
|
+ text = limitTime[i].pre + ' ' + text;
|
|
|
103
|
+ }
|
|
|
104
|
+ } else {
|
|
|
105
|
+ text = '活动已结束';
|
|
|
106
|
+ }
|
95
|
$('.time-calculate').removeClass('hidden');
|
107
|
$('.time-calculate').removeClass('hidden');
|
96
|
$('.time-calculate').text(showTime);
|
108
|
$('.time-calculate').text(showTime);
|
97
|
}
|
109
|
}
|