feat: 本次提交更新内容如下
更新代码内容
This commit is contained in:
@@ -86,7 +86,7 @@ export const fetchScenes = async (params: {
|
||||
// 返回一个错误响应
|
||||
return {
|
||||
code: 500,
|
||||
message: "获取场景列表失败",
|
||||
msg: "获取场景列表失败",
|
||||
data: []
|
||||
};
|
||||
}
|
||||
@@ -105,7 +105,7 @@ export const fetchSceneDetail = async (id: string | number): Promise<ApiResponse
|
||||
console.error("Error fetching scene detail:", error);
|
||||
return {
|
||||
code: 500,
|
||||
message: "获取场景详情失败",
|
||||
msg: "获取场景详情失败",
|
||||
data: null
|
||||
};
|
||||
}
|
||||
@@ -124,7 +124,7 @@ export const fetchSceneName = async (channel: string): Promise<ApiResponse<{ nam
|
||||
console.error("Error fetching scene name:", error);
|
||||
return {
|
||||
code: 500,
|
||||
message: "获取场景名称失败",
|
||||
msg: "获取场景名称失败",
|
||||
data: { name: channel }
|
||||
};
|
||||
}
|
||||
@@ -151,7 +151,7 @@ export const fetchPlanList = async (
|
||||
console.error("Error fetching plan list:", error);
|
||||
return {
|
||||
code: 500,
|
||||
message: "获取计划列表失败",
|
||||
msg: "获取计划列表失败",
|
||||
data: { list: [], total: 0 }
|
||||
};
|
||||
}
|
||||
@@ -170,7 +170,7 @@ export const copyPlan = async (planId: string): Promise<ApiResponse<any>> => {
|
||||
console.error("Error copying plan:", error);
|
||||
return {
|
||||
code: 500,
|
||||
message: "复制计划失败",
|
||||
msg: "复制计划失败",
|
||||
data: null
|
||||
};
|
||||
}
|
||||
@@ -189,7 +189,7 @@ export const deletePlan = async (planId: string): Promise<ApiResponse<any>> => {
|
||||
console.error("Error deleting plan:", error);
|
||||
return {
|
||||
code: 500,
|
||||
message: "删除计划失败",
|
||||
msg: "删除计划失败",
|
||||
data: null
|
||||
};
|
||||
}
|
||||
@@ -208,7 +208,7 @@ export const fetchPlanDetail = async (planId: string): Promise<ApiResponse<PlanD
|
||||
console.error("Error fetching plan detail:", error);
|
||||
return {
|
||||
code: 500,
|
||||
message: "获取计划详情失败",
|
||||
msg: "获取计划详情失败",
|
||||
data: null
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user