|
@@ -222,6 +222,7 @@ var task = new Vue({
|
|
|
},
|
|
|
yureInfo: {
|
|
|
timerId: null,
|
|
|
+ timerId2: null,
|
|
|
tipText: '',
|
|
|
tipFloat: false,
|
|
|
buttonText: '点击免费领',
|
|
@@ -273,7 +274,7 @@ var task = new Vue({
|
|
|
id: 'buyvip',
|
|
|
className: '',
|
|
|
x: 0.2,
|
|
|
- y: 0.94, // rem
|
|
|
+ y: 0.58, // rem
|
|
|
num: 800,
|
|
|
unit: '剑鱼币',
|
|
|
complete: false,
|
|
@@ -284,7 +285,7 @@ var task = new Vue({
|
|
|
id: 'invite',
|
|
|
className: '',
|
|
|
x: 2.84,
|
|
|
- y: 0.06,
|
|
|
+ y: -0.08,
|
|
|
num: 500,
|
|
|
unit: '剑鱼币',
|
|
|
complete: false,
|
|
@@ -295,7 +296,7 @@ var task = new Vue({
|
|
|
id: 'share',
|
|
|
className: '',
|
|
|
x: 4.8,
|
|
|
- y: 0.82,
|
|
|
+ y: 0.68,
|
|
|
num: 200,
|
|
|
unit: '剑鱼币',
|
|
|
complete: false,
|
|
@@ -543,6 +544,7 @@ var task = new Vue({
|
|
|
initPageState: function () {
|
|
|
var state = this.checkActiveState()
|
|
|
var yureTextDOM = $('.timeline-item.yure .t-r-b-r')
|
|
|
+ this.calcTimer()
|
|
|
if (state === 'yureing') {
|
|
|
this.startTopTimer()
|
|
|
yureTextDOM.text('进行中')
|
|
@@ -609,16 +611,16 @@ var task = new Vue({
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- startTopTimer: function () {
|
|
|
- var _this = this
|
|
|
+ calcTimer: function () {
|
|
|
var start = this.conf.start * 1000
|
|
|
- var timerId = setInterval(function () {
|
|
|
- var current = Date.now()
|
|
|
- if (_this.lastTimestamp < 0) {
|
|
|
- clearInterval(timerId)
|
|
|
- }
|
|
|
- _this.lastTimestamp = start - current
|
|
|
- }, 1000)
|
|
|
+ var current = Date.now()
|
|
|
+ if (this.lastTimestamp < 0) {
|
|
|
+ clearInterval(this.yureInfo.timerId2)
|
|
|
+ }
|
|
|
+ this.lastTimestamp = start - current
|
|
|
+ },
|
|
|
+ startTopTimer: function () {
|
|
|
+ this.yureInfo.timerId2 = setInterval(this.calcTimer, 1000)
|
|
|
},
|
|
|
calcYuReText: function () {
|
|
|
var _this = this
|
|
@@ -679,10 +681,10 @@ var task = new Vue({
|
|
|
if (obj.days < 1) {
|
|
|
this.yureConf.tipFloat = true
|
|
|
buttonText = '今天已抢完'
|
|
|
- tipText = '<p class="shadow-none">今天已经抢完啦~</p><p class="shadow-none">更多福利明日即将开启</p>'
|
|
|
+ tipText = '<p class="text-shadow1">今天已经抢完啦~</p><p class="text-shadow2">更多福利明日即将开启</p>'
|
|
|
} else {
|
|
|
buttonText = '今天已抢完'
|
|
|
- tipText = '今天已经抢完啦~<br />明天再来吧'
|
|
|
+ tipText = '今天已经抢完啦~明天再来吧'
|
|
|
}
|
|
|
}
|
|
|
}
|