feat: 重构核心租住流程页面与交互体验
统一注册、看房、申请与入住等核心页面的视觉和流程衔接,补齐支付、签约与状态流转闭环,提升移动端操作连贯性。
This commit is contained in:
@@ -77,9 +77,18 @@ export function extractLoginSession(response = {}, language = 'zh') {
|
||||
throw new Error(getText(language, '登录成功但未返回 accessToken', 'Login succeeded but accessToken is missing'))
|
||||
}
|
||||
|
||||
const userCode = responseData.userCode
|
||||
|| responseData.code
|
||||
|| nestedData.userCode
|
||||
|| nestedData.code
|
||||
|| response.userCode
|
||||
|| response.code
|
||||
|| ''
|
||||
|
||||
return {
|
||||
token,
|
||||
expires
|
||||
expires,
|
||||
userCode
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,11 +107,13 @@ export function buildLoginSessionUser(options = {}) {
|
||||
const account = source.account || ''
|
||||
const password = source.password || ''
|
||||
const language = source.language || 'zh'
|
||||
const userCode = source.userCode || ''
|
||||
|
||||
if (latestRegistration) {
|
||||
return buildUserFromRegistrationApplication(latestRegistration, {
|
||||
password,
|
||||
language
|
||||
language,
|
||||
userCode
|
||||
})
|
||||
}
|
||||
|
||||
@@ -113,7 +124,8 @@ export function buildLoginSessionUser(options = {}) {
|
||||
return normalizeUser({
|
||||
account,
|
||||
username: account,
|
||||
password
|
||||
password,
|
||||
userCode
|
||||
})
|
||||
}
|
||||
|
||||
@@ -124,6 +136,7 @@ export function resolveLoginPreparation(options = {}) {
|
||||
const latestRegistration = source.latestRegistration || null
|
||||
const account = source.account || ''
|
||||
const password = source.password || ''
|
||||
const userCode = source.userCode || ''
|
||||
|
||||
if (!latestRegistration) {
|
||||
return {
|
||||
@@ -132,7 +145,8 @@ export function resolveLoginPreparation(options = {}) {
|
||||
matchedLocalUser,
|
||||
account,
|
||||
password,
|
||||
language
|
||||
language,
|
||||
userCode
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -163,8 +177,9 @@ export function resolveLoginPreparation(options = {}) {
|
||||
latestRegistration,
|
||||
matchedLocalUser,
|
||||
account,
|
||||
password,
|
||||
language
|
||||
password,
|
||||
language,
|
||||
userCode
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user