feat: 本次提交更新内容如下

This commit is contained in:
笔记本里的永平
2025-07-16 18:18:13 +08:00
parent 6c1646b23b
commit 3719671d1c
4 changed files with 74 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
import { get, del, post } from './request';
import { get, del, post,put } from './request';
import type { ApiResponse } from '@/types/common';
// 服务器返回的场景数据类型
@@ -94,8 +94,7 @@ export interface TextUrl {
export interface PlanDetail {
id: number;
name: string;
planName: string;
scenario: string;
scenario: number;
scenarioTags: Tag[];
customTags: Tag[];
posters: Poster[];
@@ -103,7 +102,6 @@ export interface PlanDetail {
enabled: boolean;
addInterval: number;
remarkFormat: string;
planNameEdited: boolean;
endTime: string;
greeting: string;
startTime: string;
@@ -117,6 +115,7 @@ export interface PlanDetail {
apiKey: string;
wxMinAppSrc?: any;
textUrl: TextUrl;
[key: string]: any;
}
/**
@@ -304,4 +303,9 @@ export const getPlanScenes = () => get<any>('/v1/plan/scenes');
export async function createScenarioPlan(data: any) {
return post('/v1/plan/create', data);
}
// 编辑计划
export async function updateScenarioPlan(planId: number | string, data: any) {
return await put(`/v1/plan/update?planId=${planId}`, data);
}