Files
gofly-platform-services/zlt-web/yingyan/src/services/orders.ts
T
2025-12-26 19:50:46 +08:00

21 lines
747 B
TypeScript

import { request } from 'umi';
/**
* 订单服务(精简版)
* 仅保留3D地图需要的景区相关接口
*/
export const ordersApi = {
// 景区管理
tourism: async (params: { current?: number; pageSize?: number; [k: string]: any }) => {
const { current, pageSize, ...rest } = params || {};
const res = await request('/api-order/tourism', { method: 'GET', params: { page: current, limit: pageSize, ...rest } });
return { data: (res as any).data, total: (res as any).count };
},
// 根据景区ID获取设备SN列表
getDeviceSnsByTourismId: async (tourismId: number) => {
const res = await request(`/api-order/tourism/${tourismId}/device-sns`, { method: 'GET' });
return (res as any).data || [];
},
};