mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-07-23 21:17:00 +00:00
feat: request google login while refresh
This commit is contained in:
@@ -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()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user