杂务:整理文档并收口 YumiNail 修复

This commit is contained in:
xiaowang
2026-05-21 18:43:59 +08:00
parent 3797938616
commit 9227ec6175
362 changed files with 8358 additions and 19928 deletions
+10 -10
View File
@@ -427,6 +427,7 @@ import { authApi, legalAgreementApi, type LegalAgreement } from '@/api/auth'
import { shopApi } from '@/api/shop'
import { ACCOUNT_REGEX, ACCOUNT_RULE_MESSAGE, sanitizeAccountInput } from '@/utils/account'
import { runWithGlobalLoading } from '@/utils/action-loading'
import { notifyShopThemeChanged } from '@/utils/shop-theme'
import {
userApi,
type AvailabilityCheckResponse,
@@ -505,13 +506,16 @@ const verificationCodeRegex = /^\d{6}$/
const loginShopUnsupportedMessage = '可直接登录;如账号绑定多家门店,登录后可在个人中心切换当前门店。'
/** loginShopPlaceholder is a reactive state variable used by the template and event handlers. */
const loginShopPlaceholder = computed(() => {
if (allowLoginShopless.value) {
return '当前暂无启用店铺,可直接登录'
}
if (loadingShops.value) {
return '正在加载可登录店铺'
}
return loginShops.value.length ? '请选择登录店铺' : '请先输入账号或手机号'
if (loginShops.value.length) {
return allowLoginShopless.value ? '可选择本次登录店铺,留空直接登录' : '请选择登录店铺'
}
if (allowLoginShopless.value) {
return '当前无需选择店铺'
}
return '请先输入账号或手机号'
})
/** validateLoginShopRequired is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
@@ -701,11 +705,6 @@ const applyLoginShopSelection = (selection?: LoginShopSelectionResponse | null)
allowLoginShopless.value = Boolean(selection?.allowShoplessLogin)
loginShopMessage.value = selection?.message || ''
if (allowLoginShopless.value) {
formData.shopId = undefined
return
}
if (!loginShops.value.length) {
formData.shopId = undefined
return
@@ -718,7 +717,7 @@ const applyLoginShopSelection = (selection?: LoginShopSelectionResponse | null)
return
}
if (loginShops.value.length === 1) {
if (!allowLoginShopless.value && loginShops.value.length === 1) {
const [onlyShop] = loginShops.value
if (onlyShop) {
formData.shopId = normalizeShopOptionValue(onlyShop.id)
@@ -926,6 +925,7 @@ const handleSubmit = async () => {
localStorage.setItem('refreshToken', loginData.refreshToken)
localStorage.setItem('userInfo', JSON.stringify(loginData.userInfo))
sessionStorage.setItem('accessToken', loginData.accessToken)
notifyShopThemeChanged()
if (loginData.needSetPassword) {
localStorage.setItem('needSetPassword', 'true')