/** * @description 获取对象所在的项目 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** 对象ID */ objectId?: string; /** 对象类型 */ objectType?: string; } export const init = undefined; export async function request(params = {}) { return Request({ url: '/api/object/{objectId}', params, method: 'get', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'GET', url: getUrl('/api/object/{objectId}', params, 'GET'), params, init, }; }; }