Procházet zdrojové kódy

add ops

tags/v1.2.0
zhangtao před 1 rokem
rodič
revize
2e40852015
1 změnil soubory, kde provedl 3 přidání a 6 odebrání
  1. +3
    -6
      src/utils/global.js

+ 3
- 6
src/utils/global.js Zobrazit soubor

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

Načítá se…
Zrušit
Uložit