feat: 完善双端演示注册与红娘服务闭环

This commit is contained in:
WorkBuddy
2026-10-21 23:41:47 +08:00
parent afee993626
commit 39a18a50ee
63 changed files with 1298 additions and 217 deletions
+7 -1
View File
@@ -33,6 +33,12 @@ export const useAuthStore = defineStore('auth', () => {
return data
}
async function registerDemo(code: string, displayName: string, phone?: string) {
const data = await authService.demoRegister({ code, displayName, phone })
applyTokens(data)
return data
}
function clearSession() {
accessToken.value = null
userId.value = null
@@ -51,5 +57,5 @@ export const useAuthStore = defineStore('auth', () => {
clearSession()
}
return { accessToken, userId, isNewUser, isLoggedIn, loginByDemoCode, applyTokens, clearSession, logout }
return { accessToken, userId, isNewUser, isLoggedIn, loginByDemoCode, registerDemo, applyTokens, clearSession, logout }
})