重构整个项目

This commit is contained in:
2026-05-19 16:36:35 +08:00
parent f6555fdd15
commit 93bd773c51
12 changed files with 599 additions and 321 deletions

View File

@@ -57,24 +57,39 @@ export const ticketApi = {
}
export const customerApi = {
getCustomers() {
return adminRequest.get('/customers')
},
// 添加客户,data 结构应为 { company_name: 'xxx' }
addCustomerName(data) {
return adminRequest.post('/addcustomername', data)
addCompany(data) {
return adminRequest.post('/addCompany', data)
},
addEmployee(data) {
return adminRequest.post('/addemployee', data)
addOperator(data) {
return adminRequest.post('/addOperator', data)
},
deleteEmployee(empId) {
return adminRequest.delete(`/deleteemployee/${empId}`)
deleteOperator(operatorId) { // 已修改
return adminRequest.delete(`/deleteoperator/${operatorId}`)
},
deleteCustomer(customerId) {
return adminRequest.delete(`/deletecustomer/${customerId}`)
deleteCompany(CompanyId) { // 已修改
return adminRequest.delete(`/deletecompany/${CompanyId}`)
}
}
export const accountApi = {
getAllUsers() {
return adminRequest.get('/getAllUsers')
},
addAccount(data) {
return adminRequest.post('/addAccount', data)
},
updateAccountStatus(id, status) {
return adminRequest.put(`/account/${id}/status`, { status })
},
deleteAccount(id) {
return adminRequest.delete(`/account/${id}`)
}
}