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