Pārlūkot izejas kodu

add ops

tags/v1.2.0
zhangtao pirms 1 gada
vecāks
revīzija
2e40852015
1 mainītis faili ar 3 papildinājumiem un 6 dzēšanām
  1. +3
    -6
      src/utils/global.js

+ 3
- 6
src/utils/global.js Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt