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