杂务:新增声明级注释覆盖率

This commit is contained in:
xiaowang
2026-05-23 18:44:57 +08:00
parent 8f038894e7
commit 844516988b
234 changed files with 8356 additions and 0 deletions
+232
View File
@@ -10,10 +10,26 @@ import { clearAdminSessionStorage } from '@/utils/admin-session'
import { attachRequestSignature } from '@/utils/request-signature'
import { isAdminApiAuthFreePath } from './auth-free-paths'
/**
* Purpose: lastErrorTime supports admin.ts by holding or executing the last error time page or API role.
* Usage: import, call, read, or update this let from the owning page/module while preserving the surrounding loading and permission flow.
*/
let lastErrorTime = 0
/**
* Purpose: lastErrorMessage supports admin.ts by holding or executing the last error message page or API role.
* Usage: import, call, read, or update this let from the owning page/module while preserving the surrounding loading and permission flow.
*/
let lastErrorMessage = ''
/**
* Purpose: ERROR_DEBOUNCE_TIME supports admin.ts by holding or executing the error debounce time page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const ERROR_DEBOUNCE_TIME = 1000
/**
* Purpose: adminApi supports admin.ts by holding or executing the admin api page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const adminApi = axios.create({
baseURL: ADMIN_API_BASE_URL,
timeout: 10000,
@@ -22,12 +38,20 @@ const adminApi = axios.create({
}
})
/**
* Purpose: isRefreshing supports admin.ts by holding or executing the is refreshing page or API role.
* Usage: import, call, read, or update this let from the owning page/module while preserving the surrounding loading and permission flow.
*/
let isRefreshing = false
let failedQueue: Array<{
resolve: (value?: any) => void
reject: (reason?: any) => void
}> = []
/**
* Purpose: processQueue supports admin.ts by holding or executing the process queue page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const processQueue = (error: any, token: string | null = null) => {
failedQueue.forEach(prom => {
if (error) {
@@ -39,10 +63,18 @@ const processQueue = (error: any, token: string | null = null) => {
failedQueue = []
}
/**
* Purpose: getStoredAdminAccessToken supports admin.ts by holding or executing the get stored admin access token page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const getStoredAdminAccessToken = () => {
return localStorage.getItem('adminAccessToken') || sessionStorage.getItem('adminAccessToken')
}
/**
* Purpose: getRequestToken supports admin.ts by holding or executing the get request token page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const getRequestToken = (request: any) => {
if (request?._authToken) {
return request._authToken as string
@@ -54,10 +86,18 @@ const getRequestToken = (request: any) => {
return authHeader.startsWith('Bearer ') ? authHeader.slice('Bearer '.length) : null
}
/**
* Purpose: isCurrentStoredAdminToken supports admin.ts by holding or executing the is current stored admin token page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const isCurrentStoredAdminToken = (token: string | null) => {
return Boolean(token && token === getStoredAdminAccessToken())
}
/**
* Purpose: showError supports admin.ts by holding or executing the show error page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const showError = (msg: string) => {
const now = Date.now()
if (now - lastErrorTime > ERROR_DEBOUNCE_TIME || msg !== lastErrorMessage) {
@@ -67,10 +107,18 @@ const showError = (msg: string) => {
}
}
/**
* Purpose: isAuthFreePath supports admin.ts by holding or executing the is auth free path page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const isAuthFreePath = (url?: string) => {
return isAdminApiAuthFreePath(url)
}
/**
* Purpose: handleAdminTokenExpired supports admin.ts by holding or executing the handle admin token expired page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const handleAdminTokenExpired = (failedToken: string | null = null) => {
if (!isCurrentStoredAdminToken(failedToken)) {
return
@@ -192,18 +240,30 @@ adminApi.interceptors.response.use(
}
)
/**
* Purpose: AdminLoginRequest supports admin.ts by holding or executing the admin login request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface AdminLoginRequest {
account: string
password: string
shopId?: IdType
}
/**
* Purpose: AdminLoginResponse supports admin.ts by holding or executing the admin login response page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface AdminLoginResponse {
accessToken: string
refreshToken: string
userInfo: any
}
/**
* Purpose: LoginShopSelectionResponse supports admin.ts by holding or executing the login shop selection response page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface LoginShopSelectionResponse {
allowShoplessLogin: boolean
message: string
@@ -213,6 +273,10 @@ export interface LoginShopSelectionResponse {
}>
}
/**
* Purpose: LegalAgreementAdminVO supports admin.ts by holding or executing the legal agreement admin vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface LegalAgreementAdminVO {
id: IdType
agreementType: 'USER_TERMS' | 'PRIVACY_POLICY'
@@ -227,6 +291,10 @@ export interface LegalAgreementAdminVO {
updateTime?: string
}
/**
* Purpose: LegalAgreementAdminRequest supports admin.ts by holding or executing the legal agreement admin request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface LegalAgreementAdminRequest {
agreementType: 'USER_TERMS' | 'PRIVACY_POLICY'
title: string
@@ -280,6 +348,10 @@ export const adminAuthApi = {
}
}
/**
* Purpose: adminLegalAgreementApi supports admin.ts by holding or executing the admin legal agreement api page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const adminLegalAgreementApi = {
list: () => adminApi.get<LegalAgreementAdminVO[]>('/legal-agreement/list'),
create: (data: LegalAgreementAdminRequest) => adminApi.post<IdType>('/legal-agreement/create', data),
@@ -288,6 +360,10 @@ export const adminLegalAgreementApi = {
disable: (id: IdType) => adminApi.put<boolean>(`/legal-agreement/${id}/disable`)
}
/**
* Purpose: ObjectStorageFileVO supports admin.ts by holding or executing the object storage file vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ObjectStorageFileVO {
id: IdType
fileName: string
@@ -296,6 +372,10 @@ export interface ObjectStorageFileVO {
createTime: string
}
/**
* Purpose: ChunkUploadInitRequest supports admin.ts by holding or executing the chunk upload init request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ChunkUploadInitRequest {
fileName: string
fileSize: number
@@ -304,6 +384,10 @@ export interface ChunkUploadInitRequest {
scene: string
}
/**
* Purpose: ChunkUploadSessionVO supports admin.ts by holding or executing the chunk upload session vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ChunkUploadSessionVO {
uploadId: string
chunkSize: number
@@ -339,6 +423,10 @@ export const adminFileApi = {
return adminApi.post<ChunkUploadSessionVO>('/object-storage-file/upload/init', data) as unknown as Promise<ChunkUploadSessionVO>
},
uploadChunk: (
/**
* Purpose: data supports admin.ts by holding or executing the data page or API role.
* Usage: import, call, read, or update this page-data from the owning page/module while preserving the surrounding loading and permission flow.
*/
data: { uploadId: string; chunkIndex: number; totalChunks: number; chunk: Blob },
config?: { signal?: AbortSignal; onUploadProgress?: (event: AxiosProgressEvent) => void }
) => {
@@ -348,10 +436,22 @@ export const adminFileApi = {
formData.append('totalChunks', String(data.totalChunks))
formData.append('chunk', data.chunk)
return adminApi.post<boolean>('/object-storage-file/upload/chunk', formData, {
/**
* Purpose: headers supports admin.ts by holding or executing the headers page or API role.
* Usage: import, call, read, or update this page-data-field from the owning page/module while preserving the surrounding loading and permission flow.
*/
headers: {
'Content-Type': 'multipart/form-data'
},
/**
* Purpose: signal supports admin.ts by holding or executing the signal page or API role.
* Usage: import, call, read, or update this page-data-field from the owning page/module while preserving the surrounding loading and permission flow.
*/
signal: config?.signal,
/**
* Purpose: onUploadProgress supports admin.ts by holding or executing the on upload progress page or API role.
* Usage: import, call, read, or update this page-data-field from the owning page/module while preserving the surrounding loading and permission flow.
*/
onUploadProgress: config?.onUploadProgress
})
},
@@ -381,6 +481,10 @@ export const adminFileApi = {
}
}
/**
* Purpose: Tag supports admin.ts by holding or executing the tag page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface Tag {
id: IdType
tagName: string
@@ -442,6 +546,10 @@ export const adminTagApi = {
}
}
/**
* Purpose: Artist supports admin.ts by holding or executing the artist page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface Artist {
id: IdType
nickname: string
@@ -472,6 +580,10 @@ export const adminArtistApi = {
}
}
/**
* Purpose: Coupon supports admin.ts by holding or executing the coupon page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface Coupon {
id: IdType
couponCode?: string
@@ -548,6 +660,10 @@ export const adminCouponApi = {
}
}
/**
* Purpose: AdminCommentVO supports admin.ts by holding or executing the admin comment vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface AdminCommentVO {
id: IdType
userId: IdType
@@ -585,6 +701,10 @@ export const adminCommentApi = {
}
}
/**
* Purpose: Product supports admin.ts by holding or executing the product page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface Product {
id: IdType
shopId: IdType
@@ -653,6 +773,10 @@ export const adminProductApi = {
}
}
/**
* Purpose: Shop supports admin.ts by holding or executing the shop page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface Shop {
id: IdType
shopName: string
@@ -682,6 +806,10 @@ export interface Shop {
updateTime: string
}
/**
* Purpose: ShopListResponse supports admin.ts by holding or executing the shop list response page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ShopListResponse {
list: Shop[]
total: number
@@ -689,6 +817,10 @@ export interface ShopListResponse {
size: number
}
/**
* Purpose: CreateShopRequest supports admin.ts by holding or executing the create shop request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface CreateShopRequest {
shopName: string
description: string
@@ -759,6 +891,10 @@ export const adminShopApi = {
}
}
/**
* Purpose: UserVO supports admin.ts by holding or executing the user vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UserVO {
id: IdType
shopId?: IdType
@@ -780,6 +916,10 @@ export interface UserVO {
status?: number
}
/**
* Purpose: UserRelationVO supports admin.ts by holding or executing the user relation vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UserRelationVO {
userId: IdType
shopId?: IdType
@@ -792,6 +932,10 @@ export interface UserRelationVO {
sourceTypeName?: string
}
/**
* Purpose: UserStatisticsVO supports admin.ts by holding or executing the user statistics vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UserStatisticsVO {
totalUserCount: number
normalUserCount: number
@@ -805,6 +949,10 @@ export interface UserStatisticsVO {
byParent?: Record<string, number>
}
/**
* Purpose: PageResult supports admin.ts by holding or executing the page result page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface PageResult<T> {
list: T[]
total: number
@@ -960,6 +1108,10 @@ export const adminUserApi = {
}
}
/**
* Purpose: UserAssetVO supports admin.ts by holding or executing the user asset vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UserAssetVO {
userId: IdType
nickname: string
@@ -975,6 +1127,10 @@ export interface UserAssetVO {
vipExpireTime?: string
}
/**
* Purpose: UserBalanceHistoryItem supports admin.ts by holding or executing the user balance history item page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UserBalanceHistoryItem {
id: IdType
userId: IdType
@@ -993,6 +1149,10 @@ export interface UserBalanceHistoryItem {
changeTime: string
}
/**
* Purpose: AdminUserBalanceChangeRequest supports admin.ts by holding or executing the admin user balance change request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface AdminUserBalanceChangeRequest {
amount: number
changeScene: string
@@ -1001,13 +1161,25 @@ export interface AdminUserBalanceChangeRequest {
remark?: string
}
/**
* Purpose: AdminUserVipOverrideRequest supports admin.ts by holding or executing the admin user vip override request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface AdminUserVipOverrideRequest {
vipLevel: string
remark?: string
}
/**
* Purpose: userApi supports admin.ts by holding or executing the user api page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const userApi = adminUserApi
/**
* Purpose: OrderVO supports admin.ts by holding or executing the order vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface OrderVO {
id: IdType
orderNo: string
@@ -1067,6 +1239,10 @@ export const adminOrderApi = {
}
}
/**
* Purpose: HotProductVO supports admin.ts by holding or executing the hot product vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface HotProductVO {
id: IdType
title: string
@@ -1075,6 +1251,10 @@ export interface HotProductVO {
collectCount: number
}
/**
* Purpose: RecentActivityVO supports admin.ts by holding or executing the recent activity vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface RecentActivityVO {
id: IdType
type: string
@@ -1084,6 +1264,10 @@ export interface RecentActivityVO {
color?: string
}
/**
* Purpose: DashboardStats supports admin.ts by holding or executing the dashboard stats page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface DashboardStats {
totalUsers: number
totalProducts: number
@@ -1117,6 +1301,10 @@ export const adminDashboardApi = {
}
}
/**
* Purpose: NailArtistInfoVO supports admin.ts by holding or executing the nail artist info vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface NailArtistInfoVO {
id: IdType
userId: IdType
@@ -1166,6 +1354,10 @@ export const adminNailArtistApi = {
}
}
/**
* Purpose: SystemMessageVO supports admin.ts by holding or executing the system message vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface SystemMessageVO {
id: IdType
title: string
@@ -1186,11 +1378,19 @@ export interface SystemMessageVO {
readStatus?: number
}
/**
* Purpose: MessageTargetOptionsVO supports admin.ts by holding or executing the message target options vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface MessageTargetOptionsVO {
shops: Array<{ id: IdType; shopName: string }>
users: Array<{ id: IdType; nickname: string; account: string; shopId?: IdType; shopName?: string; type?: number }>
}
/**
* Purpose: SystemMessageCreateRequest supports admin.ts by holding or executing the system message create request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface SystemMessageCreateRequest {
title: string
content: string
@@ -1240,6 +1440,10 @@ export const adminSystemMessageApi = {
}
}
/**
* Purpose: AnnouncementVO supports admin.ts by holding or executing the announcement vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface AnnouncementVO {
id: IdType
title: string
@@ -1256,6 +1460,10 @@ export interface AnnouncementVO {
createTime?: string
}
/**
* Purpose: AnnouncementCreateRequest supports admin.ts by holding or executing the announcement create request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface AnnouncementCreateRequest {
title: string
content: string
@@ -1303,6 +1511,10 @@ export const adminAnnouncementApi = {
}
}
/**
* Purpose: VipRechargePlanVO supports admin.ts by holding or executing the vip recharge plan vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface VipRechargePlanVO {
id: IdType
shopId: IdType
@@ -1318,6 +1530,10 @@ export interface VipRechargePlanVO {
updateTime?: string
}
/**
* Purpose: VipRechargePlanRequest supports admin.ts by holding or executing the vip recharge plan request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface VipRechargePlanRequest {
shopId?: IdType
title: string
@@ -1380,6 +1596,10 @@ export const adminVipRechargePlanApi = {
}
}
/**
* Purpose: MessageHubPushConfigVO supports admin.ts by holding or executing the message hub push config vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface MessageHubPushConfigVO {
id: IdType
sceneCode: string
@@ -1397,6 +1617,10 @@ export interface MessageHubPushConfigVO {
updateTime?: string
}
/**
* Purpose: MessageHubPushConfigRequest supports admin.ts by holding or executing the message hub push config request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface MessageHubPushConfigRequest {
sceneCode: string
sceneName: string
@@ -1460,6 +1684,10 @@ export const adminMessageHubPushConfigApi = {
}
}
/**
* Purpose: SystemParameterConfigVO supports admin.ts by holding or executing the system parameter config vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface SystemParameterConfigVO {
id?: IdType
configGroup: string
@@ -1472,6 +1700,10 @@ export interface SystemParameterConfigVO {
updateTime?: string
}
/**
* Purpose: adminSystemParameterConfigApi supports admin.ts by holding or executing the admin system parameter config api page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const adminSystemParameterConfigApi = {
listConfigs: (configGroup?: string) => {
return adminApi.get<SystemParameterConfigVO[]>('/system-parameter-config/admin/list', { params: { configGroup } }) as unknown as Promise<SystemParameterConfigVO[]>
@@ -1,3 +1,7 @@
/**
* Purpose: WEB_API_AUTH_FREE_PATHS supports auth-free-paths.ts by holding or executing the web api auth free paths page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const WEB_API_AUTH_FREE_PATHS = [
'/user/login',
'/user/register',
@@ -22,12 +26,20 @@ export const WEB_API_AUTH_FREE_PATHS = [
'/admin/auth/refresh'
] as const
/**
* Purpose: ADMIN_API_AUTH_FREE_PATHS supports auth-free-paths.ts by holding or executing the admin api auth free paths page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const ADMIN_API_AUTH_FREE_PATHS = [
'/auth/login',
'/auth/login-shops/',
'/auth/refresh'
] as const
/**
* Purpose: normalizePathname supports auth-free-paths.ts by holding or executing the normalize pathname page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const normalizePathname = (url?: string) => {
const raw = String(url || '')
const withoutHash = raw.split('#')[0] || ''
@@ -39,6 +51,10 @@ const normalizePathname = (url?: string) => {
}
}
/**
* Purpose: matchesAuthFreePath supports auth-free-paths.ts by holding or executing the matches auth free path page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const matchesAuthFreePath = (url: string | undefined, path: string) => {
const pathname = normalizePathname(url)
if (path.endsWith('/')) {
@@ -47,10 +63,18 @@ const matchesAuthFreePath = (url: string | undefined, path: string) => {
return pathname === path
}
/**
* Purpose: isApiAuthFreePath supports auth-free-paths.ts by holding or executing the is api auth free path page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const isApiAuthFreePath = (url?: string) => {
return WEB_API_AUTH_FREE_PATHS.some(path => matchesAuthFreePath(url, path))
}
/**
* Purpose: isAdminApiAuthFreePath supports auth-free-paths.ts by holding or executing the is admin api auth free path page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const isAdminApiAuthFreePath = (url?: string) => {
return ADMIN_API_AUTH_FREE_PATHS.some(path => matchesAuthFreePath(url, path))
}
+48
View File
@@ -5,11 +5,19 @@
import api from './index'
import type { IdType } from '@/utils/id'
/**
* Purpose: SendVerificationCodeRequest supports auth.ts by holding or executing the send verification code request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface SendVerificationCodeRequest {
phone: string
sceneCode?: string
}
/**
* Purpose: LoginRequest supports auth.ts by holding or executing the login request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface LoginRequest {
account: string
password: string
@@ -20,6 +28,10 @@ export interface LoginRequest {
clientType?: string
}
/**
* Purpose: PhoneLoginRequest supports auth.ts by holding or executing the phone login request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface PhoneLoginRequest {
phone: string
verificationCode: string
@@ -29,6 +41,10 @@ export interface PhoneLoginRequest {
clientType?: string
}
/**
* Purpose: RegisterRequest supports auth.ts by holding or executing the register request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface RegisterRequest {
account: string
password: string
@@ -42,6 +58,10 @@ export interface RegisterRequest {
clientType?: string
}
/**
* Purpose: LegalAgreement supports auth.ts by holding or executing the legal agreement page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface LegalAgreement {
id: IdType
agreementType: 'USER_TERMS' | 'PRIVACY_POLICY'
@@ -54,12 +74,20 @@ export interface LegalAgreement {
effectiveTime?: string
}
/**
* Purpose: LoginResponse supports auth.ts by holding or executing the login response page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface LoginResponse {
accessToken: string
refreshToken: string
userInfo: UserInfo
}
/**
* Purpose: UserInfo supports auth.ts by holding or executing the user info page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UserInfo {
id: IdType
account: string
@@ -77,21 +105,37 @@ export interface UserInfo {
updateTime?: string
}
/**
* Purpose: RefreshTokenRequest supports auth.ts by holding or executing the refresh token request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface RefreshTokenRequest {
refreshToken: string
}
/**
* Purpose: RefreshTokenResponse supports auth.ts by holding or executing the refresh token response page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface RefreshTokenResponse {
accessToken: string
refreshToken: string
}
/**
* Purpose: ResetPasswordRequest supports auth.ts by holding or executing the reset password request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ResetPasswordRequest {
phone: string
verificationCode: string
newPassword: string
}
/**
* Purpose: SwitchShopRequest supports auth.ts by holding or executing the switch shop request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface SwitchShopRequest {
shopId?: string | number
}
@@ -190,6 +234,10 @@ export const authApi = {
}
}
/**
* Purpose: legalAgreementApi supports auth.ts by holding or executing the legal agreement api page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const legalAgreementApi = {
listCurrent: () => {
return api.get<LegalAgreement[]>('/legal-agreement/current')
+4
View File
@@ -5,6 +5,10 @@
import api from './index'
import type { IdType } from '@/utils/id'
/**
* Purpose: CartItem supports cart.ts by holding or executing the cart item page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
interface CartItem {
productId: IdType
quantity: number
+4
View File
@@ -5,6 +5,10 @@
import api from './index'
import type { IdType } from '@/utils/id'
/**
* Purpose: CommentVO supports comment.ts by holding or executing the comment vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface CommentVO {
id: IdType
userId: IdType
+20
View File
@@ -5,6 +5,10 @@
import request from './index'
import type { IdType } from '@/utils/id'
/**
* Purpose: Coupon supports coupon.ts by holding or executing the coupon page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface Coupon {
id: IdType
couponCode: string
@@ -29,11 +33,19 @@ export interface Coupon {
unavailableTags: Tag[]
}
/**
* Purpose: Tag supports coupon.ts by holding or executing the tag page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface Tag {
id: IdType
tagName?: string
}
/**
* Purpose: UserCoupon supports coupon.ts by holding or executing the user coupon page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UserCoupon {
id: IdType
couponId: IdType
@@ -54,6 +66,10 @@ export interface UserCoupon {
autoMatched?: boolean
}
/**
* Purpose: CreateCouponRequest supports coupon.ts by holding or executing the create coupon request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface CreateCouponRequest {
couponCode: string
couponName: string
@@ -71,6 +87,10 @@ export interface CreateCouponRequest {
unavailableTagIds: IdType[]
}
/**
* Purpose: CouponListResponse supports coupon.ts by holding or executing the coupon list response page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface CouponListResponse {
list: Coupon[]
total: number
+28
View File
@@ -6,6 +6,10 @@ import type { AxiosProgressEvent } from 'axios'
import api from './index'
import type { IdType } from '@/utils/id'
/**
* Purpose: ChunkUploadInitRequest supports file.ts by holding or executing the chunk upload init request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ChunkUploadInitRequest {
fileName: string
fileSize: number
@@ -14,6 +18,10 @@ export interface ChunkUploadInitRequest {
scene: string
}
/**
* Purpose: ChunkUploadSessionVO supports file.ts by holding or executing the chunk upload session vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ChunkUploadSessionVO {
uploadId: string
chunkSize: number
@@ -49,6 +57,10 @@ export const fileApi = {
return api.post<ChunkUploadSessionVO>('/user/upload-avatar/init', data) as unknown as Promise<ChunkUploadSessionVO>
},
uploadAvatarChunk: (
/**
* Purpose: data supports file.ts by holding or executing the data page or API role.
* Usage: import, call, read, or update this page-data from the owning page/module while preserving the surrounding loading and permission flow.
*/
data: { uploadId: string; chunkIndex: number; totalChunks: number; chunk: Blob },
config?: { signal?: AbortSignal; onUploadProgress?: (event: AxiosProgressEvent) => void }
) => {
@@ -58,10 +70,22 @@ export const fileApi = {
formData.append('totalChunks', String(data.totalChunks))
formData.append('chunk', data.chunk)
return api.post<boolean>('/user/upload-avatar/chunk', formData, {
/**
* Purpose: headers supports file.ts by holding or executing the headers page or API role.
* Usage: import, call, read, or update this page-data-field from the owning page/module while preserving the surrounding loading and permission flow.
*/
headers: {
'Content-Type': 'multipart/form-data'
},
/**
* Purpose: signal supports file.ts by holding or executing the signal page or API role.
* Usage: import, call, read, or update this page-data-field from the owning page/module while preserving the surrounding loading and permission flow.
*/
signal: config?.signal,
/**
* Purpose: onUploadProgress supports file.ts by holding or executing the on upload progress page or API role.
* Usage: import, call, read, or update this page-data-field from the owning page/module while preserving the surrounding loading and permission flow.
*/
onUploadProgress: config?.onUploadProgress
})
},
@@ -90,6 +114,10 @@ export const fileApi = {
*/
getSignedUrl: (fileId: IdType, expiryTimeInMinutes?: number) => {
return api.get<string>(`/file/get-signed-url/${fileId}`, {
/**
* Purpose: params supports file.ts by holding or executing the params page or API role.
* Usage: import, call, read, or update this page-data-field from the owning page/module while preserving the surrounding loading and permission flow.
*/
params: { expiryTimeInMinutes }
})
}
+52
View File
@@ -15,9 +15,21 @@ import { isApiAuthFreePath } from './auth-free-paths'
// 防重复提示标志
let lastErrorTime = 0
/**
* Purpose: lastErrorMessage supports index.ts by holding or executing the last error message page or API role.
* Usage: import, call, read, or update this let from the owning page/module while preserving the surrounding loading and permission flow.
*/
let lastErrorMessage = ''
/**
* Purpose: ERROR_DEBOUNCE_TIME supports index.ts by holding or executing the error debounce time page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const ERROR_DEBOUNCE_TIME = 1000 // 1秒内不重复显示相同错误
/**
* Purpose: api supports index.ts by holding or executing the api page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const api = axios.create({
baseURL: API_BASE_URL,
timeout: 10000,
@@ -26,24 +38,40 @@ const api = axios.create({
}
})
/**
* Purpose: isRefreshing supports index.ts by holding or executing the is refreshing page or API role.
* Usage: import, call, read, or update this let from the owning page/module while preserving the surrounding loading and permission flow.
*/
let isRefreshing = false
let failedQueue: Array<{
resolve: (value?: any) => void
reject: (reason?: any) => void
}> = []
/**
* Purpose: getStoredAccessToken supports index.ts by holding or executing the get stored access token page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const getStoredAccessToken = (isAdmin = false) => {
return isAdmin
? (localStorage.getItem('adminAccessToken') || sessionStorage.getItem('adminAccessToken'))
: (localStorage.getItem('accessToken') || sessionStorage.getItem('accessToken'))
}
/**
* Purpose: getStoredRefreshToken supports index.ts by holding or executing the get stored refresh token page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const getStoredRefreshToken = (isAdmin = false) => {
return isAdmin
? (localStorage.getItem('adminRefreshToken') || sessionStorage.getItem('adminRefreshToken'))
: (localStorage.getItem('refreshToken') || sessionStorage.getItem('refreshToken'))
}
/**
* Purpose: getRequestToken supports index.ts by holding or executing the get request token page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const getRequestToken = (request: any) => {
if (request?._authToken) {
return request._authToken as string
@@ -57,14 +85,26 @@ const getRequestToken = (request: any) => {
return authHeader.startsWith('Bearer ') ? authHeader.slice('Bearer '.length) : null
}
/**
* Purpose: isCurrentStoredToken supports index.ts by holding or executing the is current stored token page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const isCurrentStoredToken = (token: string | null, isAdmin = false) => {
return Boolean(token && token === getStoredAccessToken(isAdmin))
}
/**
* Purpose: getResponseMessage supports index.ts by holding or executing the get response message page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const getResponseMessage = (error: AxiosError) => {
return (error.response?.data as any)?.message || error.message || '请求失败'
}
/**
* Purpose: isTokenExpiredResponse supports index.ts by holding or executing the is token expired response page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const isTokenExpiredResponse = (error: AxiosError, requestToken: string | null) => {
const messageText = getResponseMessage(error)
return Boolean(
@@ -81,6 +121,10 @@ const isTokenExpiredResponse = (error: AxiosError, requestToken: string | null)
)
}
/**
* Purpose: processQueue supports index.ts by holding or executing the process queue page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const processQueue = (error: any, token: string | null = null) => {
failedQueue.forEach(prom => {
if (error) {
@@ -102,10 +146,18 @@ const showError = (msg: string) => {
}
}
/**
* Purpose: isAuthFreePath supports index.ts by holding or executing the is auth free path page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const isAuthFreePath = (url?: string) => {
return isApiAuthFreePath(url)
}
/**
* Purpose: handleTokenExpired supports index.ts by holding or executing the handle token expired page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const handleTokenExpired = (isAdmin = false, failedToken: string | null = null) => {
if (!isCurrentStoredToken(failedToken, isAdmin)) {
return
+36
View File
@@ -5,6 +5,10 @@
import api from './index'
import type { IdType } from '@/utils/id'
/**
* Purpose: OrderItem supports order.ts by holding or executing the order item page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
interface OrderItem {
productId: IdType
quantity: number
@@ -12,12 +16,20 @@ interface OrderItem {
appointmentTime?: string
}
/**
* Purpose: CreateOrderRequest supports order.ts by holding or executing the create order request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
interface CreateOrderRequest {
couponId?: IdType
couponSourceType?: string
items: OrderItem[]
}
/**
* Purpose: ArtistCalendarAppointment supports order.ts by holding or executing the artist calendar appointment page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ArtistCalendarAppointment {
orderId: IdType
orderNo: string
@@ -40,6 +52,10 @@ export interface ArtistCalendarAppointment {
durationMinutes: number
}
/**
* Purpose: OrderArtistReviewVO supports order.ts by holding or executing the order artist review vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface OrderArtistReviewVO {
id: IdType
orderId: IdType
@@ -59,12 +75,20 @@ export interface OrderArtistReviewVO {
createTime?: string
}
/**
* Purpose: OrderArtistReviewSubmitRequest supports order.ts by holding or executing the order artist review submit request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface OrderArtistReviewSubmitRequest {
rating: number
content?: string
imageFileIds: IdType[]
}
/**
* Purpose: OrderArtistChangeOptionsVO supports order.ts by holding or executing the order artist change options vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface OrderArtistChangeOptionsVO {
orderId: IdType
orderItemId: IdType
@@ -79,6 +103,10 @@ export interface OrderArtistChangeOptionsVO {
}>
}
/**
* Purpose: OrderArtistChangeRequestVO supports order.ts by holding or executing the order artist change request vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface OrderArtistChangeRequestVO {
id: IdType
orderId: IdType
@@ -100,6 +128,10 @@ export interface OrderArtistChangeRequestVO {
createTime?: string
}
/**
* Purpose: OrderArtistChangeRequestSubmitRequest supports order.ts by holding or executing the order artist change request submit request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface OrderArtistChangeRequestSubmitRequest {
orderId: IdType
orderItemId: IdType
@@ -107,6 +139,10 @@ export interface OrderArtistChangeRequestSubmitRequest {
reason: string
}
/**
* Purpose: OrderArtistChangeRejectRequest supports order.ts by holding or executing the order artist change reject request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface OrderArtistChangeRejectRequest {
rejectReason?: string
}
+12
View File
@@ -5,6 +5,10 @@
import { adminApi } from './admin'
import type { IdType } from '@/utils/id'
/**
* Purpose: PermissionVO supports permission.ts by holding or executing the permission vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface PermissionVO {
id: IdType
permissionCode: string
@@ -15,6 +19,10 @@ export interface PermissionVO {
updateTime: string
}
/**
* Purpose: CreatePermissionRequest supports permission.ts by holding or executing the create permission request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface CreatePermissionRequest {
permissionCode: string
permissionName: string
@@ -22,6 +30,10 @@ export interface CreatePermissionRequest {
description: string
}
/**
* Purpose: UpdatePermissionRequest supports permission.ts by holding or executing the update permission request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UpdatePermissionRequest {
permissionCode?: string
permissionName?: string
+20
View File
@@ -5,6 +5,10 @@
import api from './index'
import type { IdType } from '@/utils/id'
/**
* Purpose: ProductVO supports product.ts by holding or executing the product vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ProductVO {
id: IdType
shopId: IdType | null
@@ -33,6 +37,10 @@ export interface ProductVO {
updateTime: string
}
/**
* Purpose: TagInfo supports product.ts by holding or executing the tag info page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface TagInfo {
id: IdType
tagName: string
@@ -41,12 +49,20 @@ export interface TagInfo {
borderColor?: string
}
/**
* Purpose: ListProductsParams supports product.ts by holding or executing the list products params page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ListProductsParams {
page: number
size: number
keyword?: string
}
/**
* Purpose: CreateProductRequest supports product.ts by holding or executing the create product request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface CreateProductRequest {
name: string
description: string
@@ -58,6 +74,10 @@ export interface CreateProductRequest {
shopId: IdType | null
}
/**
* Purpose: UpdateProductRequest supports product.ts by holding or executing the update product request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UpdateProductRequest {
name?: string
description?: string
+20
View File
@@ -5,6 +5,10 @@
import api from './index'
import type { IdType } from '@/utils/id'
/**
* Purpose: ShopVO supports shop.ts by holding or executing the shop vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ShopVO {
id: IdType
shopName: string
@@ -35,18 +39,30 @@ export interface ShopVO {
updateTime: string
}
/**
* Purpose: ShopSimpleVO supports shop.ts by holding or executing the shop simple vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ShopSimpleVO {
id: string | number
shopName?: string
name?: string
}
/**
* Purpose: ListShopsParams supports shop.ts by holding or executing the list shops params page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ListShopsParams {
page: number
size: number
keyword?: string
}
/**
* Purpose: CreateShopRequest supports shop.ts by holding or executing the create shop request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface CreateShopRequest {
name: string
description: string
@@ -66,6 +82,10 @@ export interface CreateShopRequest {
themeBackgroundImageFileId?: string
}
/**
* Purpose: UpdateShopRequest supports shop.ts by holding or executing the update shop request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UpdateShopRequest {
name?: string
description?: string
+8
View File
@@ -5,6 +5,10 @@
import api from './index'
import type { IdType } from '@/utils/id'
/**
* Purpose: TagVO supports tag.ts by holding or executing the tag vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface TagVO {
id: IdType
tagName: string
@@ -15,6 +19,10 @@ export interface TagVO {
updateTime: string
}
/**
* Purpose: TagDTO supports tag.ts by holding or executing the tag dto page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface TagDTO {
tagName: string
textColor: string
+76
View File
@@ -6,6 +6,10 @@ import api from './index'
import type { UserInfo } from './auth'
import type { IdType } from '@/utils/id'
/**
* Purpose: UserVO supports user.ts by holding or executing the user vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UserVO extends UserInfo {
id: IdType
shopId?: IdType
@@ -34,12 +38,20 @@ export interface UserVO extends UserInfo {
relationSourceType?: string
}
/**
* Purpose: UpdateUserInfoRequest supports user.ts by holding or executing the update user info request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UpdateUserInfoRequest {
nickname?: string
avatar?: string
signature?: string
}
/**
* Purpose: ListUsersParams supports user.ts by holding or executing the list users params page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ListUsersParams {
page: number
size: number
@@ -48,6 +60,10 @@ export interface ListUsersParams {
status?: number
}
/**
* Purpose: CreateUserRequest supports user.ts by holding or executing the create user request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface CreateUserRequest {
account: string
nickname: string
@@ -58,6 +74,10 @@ export interface CreateUserRequest {
shopIds?: IdType[]
}
/**
* Purpose: UpdateUserRequest supports user.ts by holding or executing the update user request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UpdateUserRequest {
account?: string
nickname?: string
@@ -67,27 +87,47 @@ export interface UpdateUserRequest {
shopIds?: IdType[]
}
/**
* Purpose: UpdatePasswordRequest supports user.ts by holding or executing the update password request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UpdatePasswordRequest {
password: string
verificationCode: string
}
/**
* Purpose: BindPhoneRequest supports user.ts by holding or executing the bind phone request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface BindPhoneRequest {
phone: string
verificationCode: string
}
/**
* Purpose: AvailabilityCheckResponse supports user.ts by holding or executing the availability check response page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface AvailabilityCheckResponse {
available: boolean
message: string
}
/**
* Purpose: LoginAccountCheckResponse supports user.ts by holding or executing the login account check response page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface LoginAccountCheckResponse {
exists: boolean
nickname?: string
message: string
}
/**
* Purpose: LoginShopSelectionResponse supports user.ts by holding or executing the login shop selection response page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface LoginShopSelectionResponse {
allowShoplessLogin: boolean
message: string
@@ -97,6 +137,10 @@ export interface LoginShopSelectionResponse {
}>
}
/**
* Purpose: UserRelationVO supports user.ts by holding or executing the user relation vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UserRelationVO {
userId: IdType
shopId?: IdType
@@ -109,6 +153,10 @@ export interface UserRelationVO {
sourceTypeName?: string
}
/**
* Purpose: NailArtistInfoVO supports user.ts by holding or executing the nail artist info vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface NailArtistInfoVO {
userId?: IdType
userType?: number
@@ -133,12 +181,20 @@ export interface InviteCodeVO {
createTime?: string
}
/**
* Purpose: UpdatePhoneRequest supports user.ts by holding or executing the update phone request page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UpdatePhoneRequest {
oldPhone: string
newPhone: string
verificationCode: string
}
/**
* Purpose: UserAssetVO supports user.ts by holding or executing the user asset vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface UserAssetVO {
userId: IdType
nickname: string
@@ -154,6 +210,10 @@ export interface UserAssetVO {
vipExpireTime?: string
}
/**
* Purpose: BalanceHistoryItem supports user.ts by holding or executing the balance history item page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface BalanceHistoryItem {
id: IdType
userId: IdType
@@ -171,6 +231,10 @@ export interface BalanceHistoryItem {
changeTime?: string
}
/**
* Purpose: SystemMessageVO supports user.ts by holding or executing the system message vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface SystemMessageVO {
id: IdType
title: string
@@ -190,6 +254,10 @@ export interface SystemMessageVO {
createTime?: string
}
/**
* Purpose: AnnouncementVO supports user.ts by holding or executing the announcement vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface AnnouncementVO {
id: IdType
title: string
@@ -201,6 +269,10 @@ export interface AnnouncementVO {
publishTime?: string
}
/**
* Purpose: VipRechargePlanVO supports user.ts by holding or executing the vip recharge plan vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface VipRechargePlanVO {
id: IdType
shopId: IdType
@@ -214,6 +286,10 @@ export interface VipRechargePlanVO {
status: number
}
/**
* Purpose: ContactInfoVO supports user.ts by holding or executing the contact info vo page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface ContactInfoVO {
contactUserId?: IdType
contactName?: string
+4
View File
@@ -5,6 +5,10 @@
import api from './index'
import type { IdType } from '@/utils/id'
/**
* Purpose: WishlistItem supports wishlist.ts by holding or executing the wishlist item page or API role.
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
*/
export interface WishlistItem {
id: IdType
userId: IdType