37 lines
977 B
TypeScript
37 lines
977 B
TypeScript
|
|
/*
|
||
|
|
* This file is part of the kernelstudio package.
|
||
|
|
*
|
||
|
|
* (c) 2014-2026 zlin <admin@kernelstudio.com>
|
||
|
|
*
|
||
|
|
* For the full copyright and license information, please view the LICENSE file
|
||
|
|
* that was distributed with this source code.
|
||
|
|
*/
|
||
|
|
|
||
|
|
import { HttpRequestClient } from '@/utils/request';
|
||
|
|
import type { ScenarioPageableResponse, ScenarioRequest } from './types';
|
||
|
|
import type { BasicResponse } from '@/types';
|
||
|
|
|
||
|
|
const req = HttpRequestClient.create<BasicResponse>({
|
||
|
|
baseURL: '/api',
|
||
|
|
});
|
||
|
|
|
||
|
|
export const findScenarioByQuery = (_query: Partial<ScenarioRequest> = {}): Promise<ScenarioPageableResponse> => {
|
||
|
|
return new Promise((resolve) => {
|
||
|
|
resolve({
|
||
|
|
code: 200,
|
||
|
|
msg: null,
|
||
|
|
total: 1,
|
||
|
|
rows: [
|
||
|
|
{
|
||
|
|
id: 1,
|
||
|
|
name: '空战场景',
|
||
|
|
description: null,
|
||
|
|
},
|
||
|
|
],
|
||
|
|
});
|
||
|
|
});
|
||
|
|
};
|
||
|
|
|
||
|
|
export const deleteOneScenarioById = (id: number): Promise<BasicResponse> => {
|
||
|
|
return req.delete(`/system/behaviortree/${id}`);
|
||
|
|
};
|