feat: 修改谷歌登录api
This commit is contained in:
@@ -133,10 +133,10 @@ const clickGooleLogin = () => {
|
||||
googleLoginRef.value?.login()
|
||||
}
|
||||
// 处理Google登录
|
||||
const handleGoogleLogin = async (credential: string) => {
|
||||
const handleGoogleLogin = async (accessToken: string) => {
|
||||
try {
|
||||
isLoading.value = true
|
||||
const result = await googleAuth({ credential })
|
||||
const result = await googleAuth({ accessToken })
|
||||
// console.log('result', result)
|
||||
userInfoStore.setToken(result.token)
|
||||
userInfoStore.setUserInfo(result.user)
|
||||
|
||||
@@ -135,10 +135,10 @@ const clickGooleLogin = () => {
|
||||
googleSignupRef.value?.login()
|
||||
}
|
||||
// 处理Google注册
|
||||
const handleGoogleSignup = async (credential: string) => {
|
||||
const handleGoogleSignup = async (accessToken: string) => {
|
||||
try {
|
||||
isLoading.value = true
|
||||
const result = await googleAuth({ credential })
|
||||
const result = await googleAuth({ accessToken })
|
||||
userInfoStore.setToken(result.token)
|
||||
userInfoStore.setUserInfo(result.user)
|
||||
showToast('Google sign up successful')
|
||||
|
||||
Reference in New Issue
Block a user