Przeglądaj źródła

add ops

tags/v1.2.0
zhangtao 1 rok temu
rodzic
commit
2e40852015
1 zmienionych plików z 3 dodań i 6 usunięć
  1. +3
    -6
      src/utils/global.js

+ 3
- 6
src/utils/global.js Wyświetl plik

@@ -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

Ładowanie…
Anuluj
Zapisz