修复:后台注册审核接口与退出流程

This commit is contained in:
2026-10-10 16:08:46 +08:00
parent 297af45fea
commit e7de04717a
14 changed files with 292 additions and 68 deletions
@@ -17,7 +17,8 @@ import adminApi, {
adminCampaignApi,
adminDashboardApi,
adminInventoryApi,
adminPaymentApi
adminPaymentApi,
adminWorkbenchRegistrationApi
} from '../../src/api/admin'
import api from '../../src/api'
import { afterSaleApi, growthApi, paymentApi } from '../../src/api/order'
@@ -90,6 +91,9 @@ describe('vNext API contracts', () => {
await adminInventoryApi.adjustStock(7, { changeType: 'IN', changeQuantity: 3, remark: 'restock' })
await adminCampaignApi.saveCampaign({ title: 'Summer Set', scene: 'HOME', status: 1 })
await adminDashboardApi.getAnalytics()
await adminWorkbenchRegistrationApi.list()
await adminWorkbenchRegistrationApi.approve(12)
await adminWorkbenchRegistrationApi.reject(12, '资料不完整')
expect(requests).toEqual([
{ method: 'get', url: '/artist-schedule/list', params: { artistId: 9, startDate: '2026-06-01', endDate: '2026-06-07' }, data: undefined },
@@ -100,7 +104,10 @@ describe('vNext API contracts', () => {
{ method: 'post', url: '/inventory/save', params: undefined, data: { itemName: 'Base Gel', category: 'gel', unit: 'bottle', stockQuantity: 12 } },
{ method: 'post', url: '/inventory/7/adjust', params: undefined, data: { changeType: 'IN', changeQuantity: 3, remark: 'restock' } },
{ method: 'post', url: '/campaign/save', params: undefined, data: { title: 'Summer Set', scene: 'HOME', status: 1 } },
{ method: 'get', url: '/dashboard/analytics', params: undefined, data: undefined }
{ method: 'get', url: '/dashboard/analytics', params: undefined, data: undefined },
{ method: 'get', url: '/user/workbench/registration/list', params: undefined, data: undefined },
{ method: 'post', url: '/user/workbench/registration/12/approve', params: undefined, data: undefined },
{ method: 'post', url: '/user/workbench/registration/12/reject', params: undefined, data: { reason: '资料不完整' } }
])
})