fix: some
All checks were successful
构建并部署前端到测试环境 / deploy (push) Successful in 55s

This commit is contained in:
luo
2026-10-13 17:43:38 +08:00
parent c31183205d
commit 16effb69f3
8 changed files with 94 additions and 43 deletions

View File

@@ -178,6 +178,17 @@ export const mockApiPlugin = {
return
}
if (req.method !== 'GET') {
if (path === '/api/admin/exchanges/2/complete') {
res.setHeader('Content-Type', 'application/json; charset=utf-8')
res.end(
JSON.stringify({
code: 1202,
data: null,
msg: '该资产已完成过换货,如需再次换货请使用换货后的新资产'
})
)
return
}
if (path === '/api/admin/phone-asset-associations/batch-unbind') {
let body = ''
req.on('data', (chunk) => {
@@ -213,7 +224,7 @@ export const mockApiPlugin = {
res.end(
JSON.stringify({
code: 1202,
msg: '模拟请求:未调用真实后台',
msg: '新资产已绑定手机号,请先在后台解除该资产的手机号绑定,再重新提交换货申请',
data: { phone: '13800000000' }
})
)
@@ -238,8 +249,11 @@ export const mockApiPlugin = {
)
)
if (path === '/api/admin/orders/1') data = order
if (path === '/api/admin/exchanges') data = page([exchange])
if (path === '/api/admin/exchanges')
data = page([exchange, { ...exchange, id: 2, exchange_no: 'MOCK-EXCHANGE-002' }])
if (path === '/api/admin/exchanges/1') data = exchange
if (path === '/api/admin/exchanges/2')
data = { ...exchange, id: 2, exchange_no: 'MOCK-EXCHANGE-002' }
if (path === '/api/admin/orders') data = page([order])
if (path === '/api/admin/employee-collection-applications/1')
data = { application, allocations: [], attempts: [] }