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: '' }, childhood: { date: '', text: '' },
joy: { date: '', text: '' }, joy: { date: '', text: '' },
low: { 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 () => { const logout = async () => {
await authService.logout() await authService.logout()
resetAuthState() resetAuthState()
@@ -400,6 +419,7 @@ export const useAppStore = () => {
...state, ...state,
hasProfile, hasProfile,
login, login,
loginWithWechat,
logout, logout,
fetchUserProfile, fetchUserProfile,
saveUserProfile, saveUserProfile,