1
This commit is contained in:
@@ -247,9 +247,17 @@ export default {
|
||||
async loadPushStatus() {
|
||||
try {
|
||||
const res = await getPushStatus()
|
||||
console.log('=== 推送状态响应 ===', res)
|
||||
if (res.code === 200) {
|
||||
console.log('推送状态数据:', res.data)
|
||||
console.log('isScheduled:', res.data.isScheduled)
|
||||
console.log('remainingSeconds:', res.data.remainingSeconds)
|
||||
console.log('scheduledTime:', res.data.scheduledTime)
|
||||
this.pushStatus = res.data
|
||||
this.updateCountdownDisplay()
|
||||
console.log('倒计时显示:', this.countdownDisplay)
|
||||
} else {
|
||||
console.error('API返回错误:', res)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载推送状态失败', e)
|
||||
@@ -364,10 +372,12 @@ export default {
|
||||
|
||||
updateCountdownDisplay() {
|
||||
const seconds = this.pushStatus.remainingSeconds || 0
|
||||
console.log('更新倒计时显示 - remainingSeconds:', seconds)
|
||||
const minutes = Math.floor(seconds / 60)
|
||||
const secs = seconds % 60
|
||||
this.countdownDisplay.minutes = String(minutes).padStart(2, '0')
|
||||
this.countdownDisplay.seconds = String(secs).padStart(2, '0')
|
||||
console.log('倒计时显示更新为:', this.countdownDisplay.minutes + ':' + this.countdownDisplay.seconds)
|
||||
},
|
||||
|
||||
formatDateTime(dateTime) {
|
||||
|
||||
Reference in New Issue
Block a user