feat: extend registrationData with city/industry/company/personalityTags/birthday

This commit is contained in:
2026-06-04 08:09:09 +08:00
parent d4088069dd
commit 675311a1be
+21 -1
View File
@@ -26,7 +26,12 @@ const state = reactive({
childhood: { date: '', text: '' },
joy: { date: '', text: '' },
low: { date: '', text: '' },
future: { vision: '', ideal: '' }
future: { vision: '', ideal: '' },
city: '',
industry: '',
company: '',
personalityTags: [],
birthday: ''
}
})
@@ -69,6 +74,20 @@ const login = async (phone, smsCode) => {
}
}
const loginWithWechat = async (payload = {}) => {
state.isLoading = true
try {
await authService.wechatLogin(payload)
state.isLoggedIn = true
await fetchUserProfile()
return { success: true, hasProfile: hasProfile.value }
} catch (error) {
return { success: false, error: error.message }
} finally {
state.isLoading = false
}
}
const logout = async () => {
await authService.logout()
resetAuthState()
@@ -400,6 +419,7 @@ export const useAppStore = () => {
...state,
hasProfile,
login,
loginWithWechat,
logout,
fetchUserProfile,
saveUserProfile,