谷歌登录
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
<img :src="google" class="google-icon" />
|
||||
Sign in with Google
|
||||
</div> -->
|
||||
<GoogleLogin @googelLogin="handleGoogleLogin"></GoogleLogin>
|
||||
<GoogleLogin @googelLogin="handleGoogleLogin" ref="googleLoginRef" @click="clickGooleLogin"></GoogleLogin>
|
||||
<div class="sign-up-button" @click="handleSignup">Don’t have an account? Sign Up</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -128,7 +128,10 @@ const handleForgotPassword = () => {
|
||||
// 这里可以跳转到忘记密码页面
|
||||
router.push('/reset')
|
||||
}
|
||||
|
||||
const googleLoginRef = ref(null)
|
||||
const clickGooleLogin = () => {
|
||||
googleLoginRef.value?.login()
|
||||
}
|
||||
// 处理Google登录
|
||||
const handleGoogleLogin = async (credential: string) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user