|
|
|
|
|
|
|
|
import { fireHeart, updateWarning } from '@/api/early/fire.js' |
|
|
import { fireHeart, updateWarning } from '@/api/early/fire.js' |
|
|
import { router } from '@/router/index.js' |
|
|
import { router } from '@/router/index.js' |
|
|
import { ref } from 'vue' |
|
|
import { ref } from 'vue' |
|
|
import { useDialogReactiveList } from 'naive-ui' |
|
|
|
|
|
const hasModal = ref(false) |
|
|
const hasModal = ref(false) |
|
|
const hasTimer = ref(false) |
|
|
const hasTimer = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const timerHeart = async function() { |
|
|
export const timerHeart = async function() { |
|
|
if (getToken()) { |
|
|
if (getToken()) { |
|
|
|
|
|
setTimeout(() => { timerHeart() }, 5000) |
|
|
hasTimer.value = true |
|
|
hasTimer.value = true |
|
|
const res = await fireHeart() |
|
|
const res = await fireHeart() |
|
|
if (res.code === 0) { |
|
|
if (res.code === 0) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
} else { |
|
|
|
|
|
$dialog.colseDialog() |
|
|
|
|
|
|
|
|
// } else { |
|
|
|
|
|
// $dialog.colseDialog() |
|
|
} |
|
|
} |
|
|
setTimeout(() => { |
|
|
|
|
|
timerHeart() |
|
|
|
|
|
}, 5000) |
|
|
|
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
hasModal.value = false |
|
|
hasModal.value = false |