完成Salon小程序合规整改
This commit is contained in:
@@ -2001,5 +2001,74 @@ export const adminWorkbenchRegistrationApi = {
|
||||
}
|
||||
}
|
||||
|
||||
export interface AccountClosureRequestVO {
|
||||
id: IdType
|
||||
userId: IdType
|
||||
nickname: string
|
||||
userType?: number
|
||||
shopIds?: IdType[]
|
||||
shopNames?: string[]
|
||||
status: string
|
||||
requestedAt?: string
|
||||
processingTargetText?: string
|
||||
processedAt?: string
|
||||
reviewerNote?: string
|
||||
}
|
||||
|
||||
export interface ClosureSuccessorManagerVO {
|
||||
id: IdType
|
||||
nickname?: string
|
||||
shopId?: IdType
|
||||
}
|
||||
|
||||
export interface ContentModerationRecordVO {
|
||||
id: IdType
|
||||
contentType: string
|
||||
businessId?: IdType
|
||||
userId?: IdType
|
||||
status: string
|
||||
provider: string
|
||||
resultCode?: string
|
||||
reason?: string
|
||||
payloadJson?: string
|
||||
attemptCount?: number
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
export interface PhoneBackfillReportVO {
|
||||
dryRun: boolean
|
||||
userRowsToUpdate: number
|
||||
orderRowsToUpdate: number
|
||||
userRowsUpdated: number
|
||||
orderRowsUpdated: number
|
||||
accountConflictRows: number
|
||||
phoneConflictRows: number
|
||||
conflictingUserIds: IdType[]
|
||||
}
|
||||
|
||||
export const adminPrivacyComplianceApi = {
|
||||
listClosures() {
|
||||
return adminApi.get<AccountClosureRequestVO[]>('/privacy/account-closure/pending') as unknown as Promise<AccountClosureRequestVO[]>
|
||||
},
|
||||
listSuccessorManagers() {
|
||||
return adminApi.get<ClosureSuccessorManagerVO[]>('/privacy/account-closure/successor-managers') as unknown as Promise<ClosureSuccessorManagerVO[]>
|
||||
},
|
||||
processClosure(id: IdType, data: { decision: string; successorManagerId?: IdType; archiveShopIds?: IdType[]; note?: string }) {
|
||||
return adminApi.post<boolean>(`/privacy/account-closure/${id}/process`, data)
|
||||
},
|
||||
listModeration() {
|
||||
return adminApi.get<ContentModerationRecordVO[]>('/privacy/content-moderation/pending') as unknown as Promise<ContentModerationRecordVO[]>
|
||||
},
|
||||
reviewContent(id: IdType, data: { approved: boolean; reason: string }) {
|
||||
return adminApi.post<boolean>(`/privacy/content-moderation/${id}/review`, data)
|
||||
},
|
||||
phoneBackfillReport() {
|
||||
return adminApi.get<PhoneBackfillReportVO>('/privacy/phone-backfill/report') as unknown as Promise<PhoneBackfillReportVO>
|
||||
},
|
||||
runPhoneBackfill() {
|
||||
return adminApi.post<PhoneBackfillReportVO>('/privacy/phone-backfill/run') as unknown as Promise<PhoneBackfillReportVO>
|
||||
}
|
||||
}
|
||||
|
||||
export { adminApi }
|
||||
export default adminApi
|
||||
|
||||
@@ -155,15 +155,6 @@ export interface GrowthSummaryVO {
|
||||
reviewCount?: number
|
||||
}
|
||||
|
||||
export const paymentApi = {
|
||||
prepareOrderPayment: async (orderId: IdType): Promise<PaymentOrderVO> => {
|
||||
return await api.post<PaymentOrderVO>(`/payment/order/${orderId}/prepare`) as unknown as PaymentOrderVO
|
||||
},
|
||||
mockSuccess: async (orderId: IdType): Promise<PaymentOrderVO> => {
|
||||
return await api.post<PaymentOrderVO>(`/payment/order/${orderId}/mock-success`) as unknown as PaymentOrderVO
|
||||
}
|
||||
}
|
||||
|
||||
export const afterSaleApi = {
|
||||
apply: async (data: AfterSaleApplyRequest): Promise<AfterSaleVO> => {
|
||||
return await api.post<AfterSaleVO>('/after-sale/apply', data) as unknown as AfterSaleVO
|
||||
|
||||
@@ -202,7 +202,6 @@ export interface InviteCodeVO {
|
||||
* 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
|
||||
}
|
||||
@@ -388,6 +387,9 @@ export const userApi = {
|
||||
sendVerificationCode: (data: { phone: string; sceneCode?: string }) => {
|
||||
return api.post('/user/send-verification-code', data)
|
||||
},
|
||||
sendCurrentPasswordVerificationCode: () => {
|
||||
return api.post('/user/send-current-password-code')
|
||||
},
|
||||
/**
|
||||
* `switchShop` API call. Use this method from the page script to invoke the backend endpoint tied to this feature.
|
||||
* Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller.
|
||||
@@ -464,6 +466,14 @@ export const userApi = {
|
||||
* Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller.
|
||||
*/
|
||||
deactivateAccount: () => {
|
||||
return api.delete('/user/deactivate')
|
||||
}
|
||||
return api.post('/user/account-closure', {})
|
||||
},
|
||||
getAccountClosure: async () => await api.get('/user/account-closure/me') as unknown as Promise<{
|
||||
id: IdType
|
||||
status: string
|
||||
requestedAt?: string
|
||||
processingTargetText?: string
|
||||
reviewerNote?: string
|
||||
} | null>,
|
||||
withdrawAccountClosure: () => api.delete('/user/account-closure/me')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user