feat: request google login while refresh

This commit is contained in:
Tim
2025-07-23 15:49:41 +08:00
parent 33ddc3bb77
commit 7b22b2d15d
5 changed files with 35 additions and 24 deletions

View File

@@ -111,7 +111,7 @@ import { ref, onMounted, watch } from 'vue'
import { useRoute } from 'vue-router'
import { stripMarkdown } from '../utils/markdown'
import { API_BASE_URL } from '../main'
import { getToken } from '../utils/auth'
import { getToken, isLogin } from '../utils/auth'
import TimeManager from '../utils/time'
import CategorySelect from '../components/CategorySelect.vue'
import TagSelect from '../components/TagSelect.vue'
@@ -120,6 +120,7 @@ import ArticleCategory from '../components/ArticleCategory.vue'
import SearchDropdown from '../components/SearchDropdown.vue'
import { hatch } from 'ldrs'
import { isMobile } from '../utils/screen'
import { loginWithGoogle } from '../utils/google'
hatch.register()
@@ -364,6 +365,12 @@ export default {
onMounted(async () => {
await loadOptions()
fetchContent()
if (!isLogin()) {
//
}
setTimeout(() => {
loginWithGoogle()
}, 3000)
})
watch([selectedCategory, selectedTags], () => {