39 lines
908 B
TypeScript
39 lines
908 B
TypeScript
import { http } from './http'
|
|
|
|
export const zebraApi = {
|
|
getAccounts() {
|
|
return http.get('/tool/banma/accounts')
|
|
},
|
|
|
|
saveAccount(body: any) {
|
|
return http.post('/tool/banma/accounts', body)
|
|
},
|
|
|
|
removeAccount(id: number) {
|
|
return http.delete(`/tool/banma/accounts/${id}`)
|
|
},
|
|
|
|
getShops(params?: { accountId?: number }) {
|
|
return http.get('/api/banma/shops', params as Record<string, unknown>)
|
|
},
|
|
|
|
getOrders(params: any) {
|
|
return http.get('/api/banma/orders', params as Record<string, unknown>)
|
|
},
|
|
|
|
getOrdersByBatch(batchId: string) {
|
|
return http.get(`/api/banma/orders/batch/${batchId}`)
|
|
},
|
|
|
|
getLatestOrders() {
|
|
return http.get('/api/banma/orders/latest')
|
|
},
|
|
|
|
getOrderStats() {
|
|
return http.get('/api/banma/orders/stats')
|
|
},
|
|
|
|
searchOrders(searchParams: Record<string, unknown>) {
|
|
return http.get('/api/banma/orders/search', searchParams)
|
|
}
|
|
} |