feat: add google auth integration

This commit is contained in:
Tim
2025-07-05 14:51:29 +08:00
parent e5ee4fcabb
commit ed12fb0fc9
6 changed files with 49 additions and 2 deletions
+7 -1
View File
@@ -91,7 +91,7 @@
</div>
<div class="other-signup-page-content">
<div class="signup-page-button">
<div class="signup-page-button" @click="signupWithGoogle">
<img class="signup-page-button-icon" src="../assets/icons/google.svg" alt="Google Logo" />
<div class="signup-page-button-text">Google 注册</div>
</div>
@@ -101,6 +101,7 @@
<script>
import { API_BASE_URL, toast } from '../main'
import { googleSignIn } from '../utils/google'
export default {
name: 'SignupPageView',
@@ -187,6 +188,11 @@ export default {
} catch (e) {
toast.error('注册失败')
}
},
signupWithGoogle() {
googleSignIn(() => {
this.$router.push('/')
})
}
}
}