Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setTimeout(function () {
let cardNumber = $(this.$el).find('.card').length + 1
let cardHTML = '<div class="card">' +
'<div class="card-header">card' + cardNumber + '</div>' +
'<div class="card-content">' +
'<div class="card-content-inner">' +
'这里是第' + cardNumber + '个card,下拉刷新会出现第' + (cardNumber + 1) + '个card。' +
'</div>' +
'</div>' +
'</div>'
$(this.$el).find('.card-container').prepend(cardHTML)
// 加载完毕需要重置
$.pullToRefreshDone('.pull-to-refresh-content')
}.bind(this), 1500)
}
setTimeout(function () {
let cardNumber = $(this.$el).find('.card').length
let cardHTML = '<div class="card">' +
'<div class="card-header">card' + cardNumber + '</div>' +
'<div class="card-content">' +
'<div class="card-content-inner">' +
'这里是第' + cardNumber + '个card,下拉刷新会出现第' + (cardNumber + 1) + '个card。' +
'</div>' +
'</div>' +
'</div>'
$(this.$el).find('.card-container').prepend(cardHTML);
// 加载完毕需要重置
$.pullToRefreshDone('.pull-to-refresh-content');
$.hideIndicator()
}.bind(this), 1500)
}
setTimeout(function () {
console.log('refreshMine')
let num = this.length + 1
let title = `card${num}`
let content = `这里是第${num}个card,下拉刷新会出现第${num + 1}个card。`
this.tasks.push({
id: num,
title: title,
content: content
})
$.pullToRefreshDone('.pull-to-refresh-content')
$.hideIndicator()
}.bind(this), 1500)
}
setTimeout(function () {
console.log('refreshMine')
let num = this.length + 1
let title = `card${num}`
let content = `这里是第${num}个card,下拉刷新会出现第${num + 1}个card。`
this.tasks.push({
id: num,
title: title,
content: content
})
$.pullToRefreshDone('.pull-to-refresh-content')
$.hideIndicator()
}.bind(this), 1500)
}
setTimeout(function () {
console.log('refresh')
$.pullToRefreshDone('.pull-to-refresh-content')
$.hideIndicator()
}, 1500)
},
setTimeout(function () {
console.log('refresh')
$.pullToRefreshDone('.pull-to-refresh-content')
$.hideIndicator()
}, 1500)
}
setTimeout(function () {
let num = this.length + 1
let title = `标题${num}`
let adv = `abc${num}`
let time = (new Date()).getTime() / 1000
let point = 100 + num - 1
this.tasks.push({
id: num,
title: title,
advertiser: adv,
status: '1',
created: time,
read_profit: point
})
$.pullToRefreshDone('.pull-to-refresh-content')
}.bind(this), 1500)
}