功能:更新消息中心和 YumiNail 模块
This commit is contained in:
@@ -0,0 +1,657 @@
|
||||
import axios, { AxiosError, type AxiosProgressEvent } from 'axios'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { ADMIN_API_BASE_URL } from '../config/api'
|
||||
import type { IdType } from '@/utils/id'
|
||||
import { clearAdminSessionStorage } from '@/utils/admin-session'
|
||||
|
||||
let lastErrorTime = 0
|
||||
let lastErrorMessage = ''
|
||||
const ERROR_DEBOUNCE_TIME = 1000
|
||||
|
||||
const adminApi = axios.create({
|
||||
baseURL: ADMIN_API_BASE_URL,
|
||||
timeout: 10000,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
|
||||
let isRefreshing = false
|
||||
let failedQueue: Array<{
|
||||
resolve: (value?: any) => void
|
||||
reject: (reason?: any) => void
|
||||
}> = []
|
||||
|
||||
const processQueue = (error: any, token: string | null = null) => {
|
||||
failedQueue.forEach(prom => {
|
||||
if (error) {
|
||||
prom.reject(error)
|
||||
} else {
|
||||
prom.resolve(token)
|
||||
}
|
||||
})
|
||||
failedQueue = []
|
||||
}
|
||||
|
||||
const showError = (msg: string) => {
|
||||
const now = Date.now()
|
||||
if (now - lastErrorTime > ERROR_DEBOUNCE_TIME || msg !== lastErrorMessage) {
|
||||
lastErrorTime = now
|
||||
lastErrorMessage = msg
|
||||
message.error(msg)
|
||||
}
|
||||
}
|
||||
|
||||
const isAuthFreePath = (url?: string) => {
|
||||
return Boolean(url?.includes('/auth/login') || url?.includes('/auth/refresh'))
|
||||
}
|
||||
|
||||
const handleAdminTokenExpired = () => {
|
||||
clearAdminSessionStorage()
|
||||
|
||||
if (Date.now() - lastErrorTime > ERROR_DEBOUNCE_TIME || lastErrorMessage !== '登录已过期,请重新登录') {
|
||||
showError('登录已过期,请重新登录')
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
window.location.href = '/admin/login'
|
||||
}, 300)
|
||||
}
|
||||
|
||||
adminApi.interceptors.request.use(
|
||||
config => {
|
||||
if (!isAuthFreePath(config.url)) {
|
||||
let token = localStorage.getItem('adminAccessToken')
|
||||
if (!token) {
|
||||
token = sessionStorage.getItem('adminAccessToken')
|
||||
}
|
||||
if (token) {
|
||||
config.headers.Authorization = `Bearer ${token}`
|
||||
}
|
||||
}
|
||||
return config
|
||||
},
|
||||
error => Promise.reject(error)
|
||||
)
|
||||
|
||||
adminApi.interceptors.response.use(
|
||||
response => {
|
||||
const res = response.data
|
||||
if (res.code !== 200) {
|
||||
const errorMsg = res.message || '请求失败'
|
||||
if (!errorMsg.includes('权限') && !errorMsg.includes('permission')) {
|
||||
showError(errorMsg)
|
||||
} else {
|
||||
console.error('权限不足:', errorMsg)
|
||||
}
|
||||
return Promise.reject(new Error(errorMsg))
|
||||
}
|
||||
return res.data as any
|
||||
},
|
||||
async (error: AxiosError) => {
|
||||
const originalRequest = error.config as any
|
||||
|
||||
if (error.response?.status === 401) {
|
||||
if (!originalRequest?._retry && !isAuthFreePath(originalRequest?.url)) {
|
||||
if (isRefreshing) {
|
||||
return new Promise((resolve, reject) => {
|
||||
failedQueue.push({ resolve, reject })
|
||||
}).then(token => {
|
||||
if (token) {
|
||||
originalRequest.headers.Authorization = `Bearer ${token}`
|
||||
}
|
||||
return adminApi(originalRequest)
|
||||
})
|
||||
}
|
||||
|
||||
originalRequest._retry = true
|
||||
isRefreshing = true
|
||||
|
||||
try {
|
||||
let refreshToken = localStorage.getItem('adminRefreshToken')
|
||||
if (!refreshToken) {
|
||||
refreshToken = sessionStorage.getItem('adminRefreshToken')
|
||||
}
|
||||
if (!refreshToken) {
|
||||
throw new Error('No refresh token available')
|
||||
}
|
||||
|
||||
const response = await adminAuthApi.refreshToken(refreshToken)
|
||||
const newToken = (response as any).accessToken
|
||||
const newRefreshToken = (response as any).refreshToken
|
||||
|
||||
localStorage.setItem('adminAccessToken', newToken)
|
||||
localStorage.setItem('adminRefreshToken', newRefreshToken)
|
||||
sessionStorage.setItem('adminAccessToken', newToken)
|
||||
sessionStorage.setItem('adminRefreshToken', newRefreshToken)
|
||||
|
||||
processQueue(null, newToken)
|
||||
originalRequest.headers.Authorization = `Bearer ${newToken}`
|
||||
return adminApi(originalRequest)
|
||||
} catch (refreshError) {
|
||||
processQueue(refreshError, null)
|
||||
handleAdminTokenExpired()
|
||||
return Promise.reject(refreshError)
|
||||
} finally {
|
||||
isRefreshing = false
|
||||
}
|
||||
}
|
||||
|
||||
handleAdminTokenExpired()
|
||||
} else if (error.response?.status !== 403) {
|
||||
const errorMsg = (error.response?.data as any)?.message || error.message || '请求失败'
|
||||
showError(errorMsg)
|
||||
} else {
|
||||
console.error('权限不足:', error)
|
||||
}
|
||||
|
||||
if (error.response?.status === 403) {
|
||||
const errorMsg = (error.response?.data as any)?.message || '权限不足'
|
||||
console.error('Admin API Permission Error:', errorMsg)
|
||||
return Promise.reject(new Error(errorMsg))
|
||||
}
|
||||
|
||||
console.error('Admin API Error:', error)
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
export interface AdminLoginRequest {
|
||||
account: string
|
||||
password: string
|
||||
shopId?: IdType
|
||||
}
|
||||
|
||||
export interface AdminLoginResponse {
|
||||
accessToken: string
|
||||
refreshToken: string
|
||||
userInfo: any
|
||||
}
|
||||
|
||||
export interface LoginShopSelectionResponse {
|
||||
allowShoplessLogin: boolean
|
||||
message: string
|
||||
shops: Array<{
|
||||
id: IdType
|
||||
shopName: string
|
||||
}>
|
||||
}
|
||||
|
||||
export const adminAuthApi = {
|
||||
login: (data: AdminLoginRequest) => {
|
||||
return adminApi.post<AdminLoginResponse>('/auth/login', data)
|
||||
},
|
||||
getLoginShops: (account: string) => {
|
||||
return adminApi.get<LoginShopSelectionResponse>(`/auth/login-shops/${encodeURIComponent(account)}`)
|
||||
},
|
||||
logout: () => {
|
||||
return adminApi.post<boolean>('/auth/logout')
|
||||
},
|
||||
switchShop: (shopId?: IdType) => {
|
||||
return adminApi.post<AdminLoginResponse>('/auth/switch-shop', { shopId })
|
||||
},
|
||||
refreshToken: (refreshToken: string) => {
|
||||
return adminApi.post<{ accessToken: string; refreshToken: string }>('/auth/refresh', { refreshToken })
|
||||
}
|
||||
}
|
||||
|
||||
export interface ObjectStorageFileVO {
|
||||
id: IdType
|
||||
fileName: string
|
||||
fileSize: number
|
||||
contentType: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
export interface ChunkUploadInitRequest {
|
||||
fileName: string
|
||||
fileSize: number
|
||||
contentType: string
|
||||
fileFingerprint: string
|
||||
scene: string
|
||||
}
|
||||
|
||||
export interface ChunkUploadSessionVO {
|
||||
uploadId: string
|
||||
chunkSize: number
|
||||
totalChunks: number
|
||||
uploadedChunks: number[]
|
||||
}
|
||||
|
||||
export const adminFileApi = {
|
||||
uploadFile: (file: File) => {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
return adminApi.post<ObjectStorageFileVO>('/object-storage-file/upload', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
},
|
||||
initChunkUpload: (data: ChunkUploadInitRequest) => {
|
||||
return adminApi.post<ChunkUploadSessionVO>('/object-storage-file/upload/init', data) as unknown as Promise<ChunkUploadSessionVO>
|
||||
},
|
||||
uploadChunk: (
|
||||
data: { uploadId: string; chunkIndex: number; totalChunks: number; chunk: Blob },
|
||||
config?: { signal?: AbortSignal; onUploadProgress?: (event: AxiosProgressEvent) => void }
|
||||
) => {
|
||||
const formData = new FormData()
|
||||
formData.append('uploadId', data.uploadId)
|
||||
formData.append('chunkIndex', String(data.chunkIndex))
|
||||
formData.append('totalChunks', String(data.totalChunks))
|
||||
formData.append('chunk', data.chunk)
|
||||
return adminApi.post<boolean>('/object-storage-file/upload/chunk', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
},
|
||||
signal: config?.signal,
|
||||
onUploadProgress: config?.onUploadProgress
|
||||
})
|
||||
},
|
||||
completeChunkUpload: (uploadId: string) => {
|
||||
return adminApi.post<ObjectStorageFileVO>('/object-storage-file/upload/complete', { uploadId }) as unknown as Promise<ObjectStorageFileVO>
|
||||
},
|
||||
cancelChunkUpload: (uploadId: string) => {
|
||||
return adminApi.delete<boolean>(`/object-storage-file/upload/${uploadId}`)
|
||||
},
|
||||
getSignedUrl: (id: IdType) => {
|
||||
return adminApi.get<string>(`/object-storage-file/get-signed-url/${id}`)
|
||||
}
|
||||
}
|
||||
|
||||
export interface Tag {
|
||||
id: IdType
|
||||
tagName: string
|
||||
textColor?: string
|
||||
bgColor?: string
|
||||
borderColor?: string
|
||||
shopId?: IdType
|
||||
shopName?: string
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
export const adminTagApi = {
|
||||
listAllTags: () => {
|
||||
return adminApi.get<Tag[]>('/tag/list/all') as unknown as Promise<Tag[]>
|
||||
},
|
||||
listTagsByShopId: (shopId: IdType) => {
|
||||
return adminApi.get<Tag[]>(`/tag/list/by-shop/${shopId}`) as unknown as Promise<Tag[]>
|
||||
},
|
||||
createTag: (data: { tagName: string; textColor?: string; bgColor?: string; borderColor?: string; shopId?: IdType }) => {
|
||||
return adminApi.post<IdType>('/tag/create', data)
|
||||
},
|
||||
updateTag: (id: IdType, data: { tagName: string; textColor?: string; bgColor?: string; borderColor?: string; shopId?: IdType }) => {
|
||||
return adminApi.put<boolean>(`/tag/update/${id}`, data)
|
||||
},
|
||||
deleteTag: (id: IdType) => {
|
||||
return adminApi.delete<boolean>(`/tag/delete/${id}`)
|
||||
}
|
||||
}
|
||||
|
||||
export interface Artist {
|
||||
id: IdType
|
||||
nickname: string
|
||||
account: string
|
||||
avatar?: string
|
||||
shopId?: IdType
|
||||
shopName?: string
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
export const adminArtistApi = {
|
||||
listArtists: (shopId?: IdType) => {
|
||||
const params: any = {}
|
||||
if (shopId) {
|
||||
params.shopId = shopId
|
||||
}
|
||||
return adminApi.get<Artist[]>('/user/list/artists', { params })
|
||||
}
|
||||
}
|
||||
|
||||
export interface Coupon {
|
||||
id: IdType
|
||||
couponCode?: string
|
||||
couponName: string
|
||||
couponType: number
|
||||
couponTypeName?: string
|
||||
discountValue?: string
|
||||
minAmount?: number
|
||||
reduceAmount?: string
|
||||
totalCount?: number
|
||||
usedCount?: number
|
||||
remainingCount?: number
|
||||
startTime: string
|
||||
endTime: string
|
||||
status?: number
|
||||
statusName?: string
|
||||
shopId?: IdType
|
||||
shopName?: string
|
||||
couponScene?: string
|
||||
requiredVipLevel?: string
|
||||
autoMatch?: number
|
||||
availableTags?: Tag[]
|
||||
unavailableTags?: Tag[]
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
export const adminCouponApi = {
|
||||
listAllCoupons: (shopId?: IdType) => {
|
||||
const params = shopId ? { shopId } : {}
|
||||
return adminApi.get<Coupon[]>('/coupon/list/all', { params }) as unknown as Promise<Coupon[]>
|
||||
},
|
||||
createCoupon: (data: any) => {
|
||||
return adminApi.post<IdType>('/coupon/create', data)
|
||||
},
|
||||
updateCoupon: (id: IdType, data: any) => {
|
||||
return adminApi.put<boolean>(`/coupon/update/${id}`, data)
|
||||
},
|
||||
deleteCoupon: (id: IdType) => {
|
||||
return adminApi.delete<boolean>(`/coupon/delete/${id}`)
|
||||
},
|
||||
distributeCoupon: (data: any) => {
|
||||
return adminApi.post<boolean>('/coupon/distribute', null, { params: data })
|
||||
}
|
||||
}
|
||||
|
||||
export interface Product {
|
||||
id: IdType
|
||||
shopId: IdType
|
||||
shopName?: string
|
||||
title: string
|
||||
description: string
|
||||
price: number
|
||||
approximateDuration?: string
|
||||
tags?: string
|
||||
tagList?: string[]
|
||||
tagInfos?: any[]
|
||||
imageFileIds?: string
|
||||
imageUrls?: string[]
|
||||
bookableArtists?: string
|
||||
availableCoupons?: string
|
||||
likeCount?: number
|
||||
collectCount?: number
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
export const adminProductApi = {
|
||||
listProducts: (params: { page: number; size: number; keyword?: string; shopId?: IdType }) => {
|
||||
return adminApi.get<{ list: Product[]; total: number; page: number; size: number }>('/product/list', { params })
|
||||
},
|
||||
listAllProducts: () => {
|
||||
return adminApi.get<Product[]>('/product/list/all')
|
||||
},
|
||||
createProduct: (data: any) => {
|
||||
return adminApi.post<IdType>('/product/create', data)
|
||||
},
|
||||
updateProduct: (id: IdType, data: any) => {
|
||||
return adminApi.put<boolean>(`/product/update/${id}`, data)
|
||||
},
|
||||
deleteProduct: (id: IdType) => {
|
||||
return adminApi.delete<boolean>(`/product/delete/${id}`)
|
||||
}
|
||||
}
|
||||
|
||||
export interface Shop {
|
||||
id: IdType
|
||||
shopName: string
|
||||
description: string
|
||||
address: string
|
||||
businessHours: string
|
||||
status?: number
|
||||
coverImageFileId?: string
|
||||
coverImageUrls?: string[]
|
||||
imageFileIds?: string
|
||||
imageUrls?: string[]
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
export interface ShopListResponse {
|
||||
list: Shop[]
|
||||
total: number
|
||||
page: number
|
||||
size: number
|
||||
}
|
||||
|
||||
export interface CreateShopRequest {
|
||||
shopName: string
|
||||
description: string
|
||||
address: string
|
||||
businessHours: string
|
||||
coverImageFileId?: string
|
||||
imageFileIds?: string
|
||||
status?: number
|
||||
}
|
||||
|
||||
export const adminShopApi = {
|
||||
listShops: (params: { page: number; size: number; keyword?: string; shopId?: IdType }) => {
|
||||
return adminApi.get<ShopListResponse>('/shops/list', { params }) as unknown as Promise<ShopListResponse>
|
||||
},
|
||||
listAllShops: () => {
|
||||
return adminApi.get<Shop[]>('/shops/list/all') as unknown as Promise<Shop[]>
|
||||
},
|
||||
createShop: (data: CreateShopRequest) => {
|
||||
return adminApi.post<IdType>('/shops/create', data)
|
||||
},
|
||||
updateShop: (id: IdType, data: CreateShopRequest) => {
|
||||
return adminApi.put<boolean>(`/shops/update/${id}`, data)
|
||||
},
|
||||
updateShopStatus: (id: IdType, status: number) => {
|
||||
return adminApi.put<boolean>(`/shops/status/${id}`, { status })
|
||||
},
|
||||
deleteShop: (id: IdType) => {
|
||||
return adminApi.delete<boolean>(`/shops/delete/${id}`)
|
||||
}
|
||||
}
|
||||
|
||||
export interface UserVO {
|
||||
id: IdType
|
||||
shopId?: IdType
|
||||
shopName?: string
|
||||
shopIds?: IdType[]
|
||||
shopNames?: string[]
|
||||
nickname: string
|
||||
account: string
|
||||
avatar: string
|
||||
phone?: string
|
||||
signature?: string
|
||||
level?: string
|
||||
type: number
|
||||
vipId?: IdType
|
||||
createTime: string
|
||||
updateTime: string
|
||||
status?: number
|
||||
}
|
||||
|
||||
export interface PageResult<T> {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
size: number
|
||||
}
|
||||
|
||||
export const adminUserApi = {
|
||||
listUsers: (params: { page: number; size: number; keyword?: string; type?: number; shopId?: IdType; status?: number }) => {
|
||||
return adminApi.get<PageResult<UserVO>>('/user/list', { params }) as unknown as Promise<PageResult<UserVO>>
|
||||
},
|
||||
listAllUsers: () => {
|
||||
return adminApi.get<UserVO[]>('/user/list/all') as unknown as Promise<UserVO[]>
|
||||
},
|
||||
createUser: (data: any) => {
|
||||
return adminApi.post<IdType>('/user/create', data)
|
||||
},
|
||||
updateUser: (id: IdType, data: any) => {
|
||||
return adminApi.put<boolean>(`/user/update/${id}`, data)
|
||||
},
|
||||
deleteUser: (id: IdType) => {
|
||||
return adminApi.delete<boolean>(`/user/delete/${id}`)
|
||||
},
|
||||
unbindUser: (id: IdType) => {
|
||||
return adminApi.put<boolean>(`/user/unbind/${id}`, {})
|
||||
},
|
||||
updateUserStatus: (id: IdType, status: number) => {
|
||||
return adminApi.put<boolean>(`/user/status/${id}`, { status })
|
||||
},
|
||||
resetPassword: (id: IdType) => {
|
||||
return adminApi.post<string>(`/user/reset-password/${id}`)
|
||||
},
|
||||
getUserInfo: () => {
|
||||
return adminApi.get<UserVO>('/user/info') as unknown as Promise<UserVO>
|
||||
},
|
||||
getUserAsset: (id: IdType) => {
|
||||
return adminApi.get<UserAssetVO>(`/user/${id}/asset`) as unknown as Promise<UserAssetVO>
|
||||
},
|
||||
getUserBalanceHistory: (id: IdType) => {
|
||||
return adminApi.get<UserBalanceHistoryItem[]>(`/user/${id}/balance/history`) as unknown as Promise<UserBalanceHistoryItem[]>
|
||||
},
|
||||
changeUserBalance: (id: IdType, data: AdminUserBalanceChangeRequest) => {
|
||||
return adminApi.post<UserAssetVO>(`/user/${id}/balance/change`, data) as unknown as Promise<UserAssetVO>
|
||||
},
|
||||
overrideUserVip: (id: IdType, data: AdminUserVipOverrideRequest) => {
|
||||
return adminApi.post<UserAssetVO>(`/user/${id}/vip/override`, data) as unknown as Promise<UserAssetVO>
|
||||
},
|
||||
recalculateUserVip: (id: IdType) => {
|
||||
return adminApi.post<UserAssetVO>(`/user/${id}/vip/recalculate`) as unknown as Promise<UserAssetVO>
|
||||
}
|
||||
}
|
||||
|
||||
export interface UserAssetVO {
|
||||
userId: IdType
|
||||
nickname: string
|
||||
balance: number
|
||||
totalRechargeAmount: number
|
||||
lastRechargeTime?: string
|
||||
vipInfoId?: IdType
|
||||
vipLevel: string
|
||||
benefitId?: IdType
|
||||
benefitInfo?: string
|
||||
manualOverride: boolean
|
||||
vipStartTime?: string
|
||||
vipExpireTime?: string
|
||||
}
|
||||
|
||||
export interface UserBalanceHistoryItem {
|
||||
id: IdType
|
||||
userId: IdType
|
||||
userNickname?: string
|
||||
amount: number
|
||||
type?: string
|
||||
currentBalance?: number
|
||||
beforeBalance?: number
|
||||
afterBalance?: number
|
||||
changeScene?: string
|
||||
relatedOrderId?: IdType
|
||||
relatedOrderNo?: string
|
||||
externalOrderNo?: string
|
||||
operatorId?: IdType
|
||||
remark?: string
|
||||
changeTime: string
|
||||
}
|
||||
|
||||
export interface AdminUserBalanceChangeRequest {
|
||||
amount: number
|
||||
changeScene: string
|
||||
relatedOrderId?: IdType
|
||||
externalOrderNo?: string
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export interface AdminUserVipOverrideRequest {
|
||||
vipLevel: string
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export const userApi = adminUserApi
|
||||
|
||||
export interface OrderVO {
|
||||
id: IdType
|
||||
orderNo: string
|
||||
userId: IdType
|
||||
userNickname?: string
|
||||
shopId: IdType
|
||||
shopName?: string
|
||||
artistId?: IdType
|
||||
artistName?: string
|
||||
totalAmount: number
|
||||
discountAmount: number
|
||||
payAmount: number
|
||||
status: number
|
||||
statusText?: string
|
||||
remark?: string
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
export const adminOrderApi = {
|
||||
listOrders: (params: { page: number; size: number; keyword?: string; status?: number; shopId?: IdType }) => {
|
||||
return adminApi.get<PageResult<OrderVO>>('/order/list', { params })
|
||||
},
|
||||
updateOrderStatus: (id: IdType, status: number) => {
|
||||
return adminApi.put<boolean>(`/order/update-status/${id}`, { status })
|
||||
}
|
||||
}
|
||||
|
||||
export interface HotProductVO {
|
||||
id: IdType
|
||||
title: string
|
||||
price: number
|
||||
likeCount: number
|
||||
collectCount: number
|
||||
}
|
||||
|
||||
export interface RecentActivityVO {
|
||||
id: IdType
|
||||
type: string
|
||||
title?: string
|
||||
description: string
|
||||
time: string
|
||||
color?: string
|
||||
}
|
||||
|
||||
export interface DashboardStats {
|
||||
totalUsers: number
|
||||
totalProducts: number
|
||||
totalShops: number
|
||||
todayOrders: number
|
||||
hotProducts: HotProductVO[]
|
||||
recentActivities: RecentActivityVO[]
|
||||
}
|
||||
|
||||
export const adminDashboardApi = {
|
||||
getStats: () => {
|
||||
return adminApi.get<DashboardStats>('/dashboard/stats')
|
||||
}
|
||||
}
|
||||
|
||||
export interface NailArtistInfoVO {
|
||||
id: IdType
|
||||
userId: IdType
|
||||
identity: string
|
||||
experience: number
|
||||
skills: string
|
||||
rating: number
|
||||
status: number
|
||||
portfolio: string
|
||||
nickname: string
|
||||
shopId: IdType
|
||||
shopName: string
|
||||
}
|
||||
|
||||
export const adminNailArtistApi = {
|
||||
listNailArtists: () => {
|
||||
return adminApi.get<NailArtistInfoVO[]>('/nail-artist/list')
|
||||
},
|
||||
getNailArtistInfo: (userId: IdType) => {
|
||||
return adminApi.get<NailArtistInfoVO>(`/nail-artist/get/${userId}`)
|
||||
},
|
||||
saveNailArtistInfo: (data: any) => {
|
||||
return adminApi.post<NailArtistInfoVO>('/nail-artist/save', data)
|
||||
}
|
||||
}
|
||||
|
||||
export { adminApi }
|
||||
export default adminApi
|
||||
Reference in New Issue
Block a user