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
+5 -10
View File
@@ -67,7 +67,7 @@
</div>
<div class="other-signup-page-content">
<div class="signup-page-button" @click="signupWithGoogle">
<div class="signup-page-button" @click="loginWithGoogle">
<img class="signup-page-button-icon" src="../assets/icons/google.svg" alt="Google Logo" />
<div class="signup-page-button-text">Google 注册</div>
</div>
@@ -89,7 +89,7 @@
<script>
import { API_BASE_URL, toast } from '../main'
import { googleSignIn } from '../utils/google'
import { loginWithGoogle } from '../utils/google'
import { githubAuthorize } from '../utils/github'
import { discordAuthorize } from '../utils/discord'
import { twitterAuthorize } from '../utils/twitter'
@@ -97,7 +97,9 @@ import BaseInput from '../components/BaseInput.vue'
export default {
name: 'SignupPageView',
components: { BaseInput },
setup() {
return { loginWithGoogle }
},
data() {
return {
emailStep: 0,
@@ -201,13 +203,6 @@ export default {
toast.error('注册失败')
}
},
signupWithGoogle() {
googleSignIn(() => {
this.$router.push('/')
}, (token) => {
this.$router.push('/signup-reason?token=' + token)
})
},
signupWithGithub() {
githubAuthorize()
},