修bug
This commit is contained in:
@@ -265,7 +265,7 @@ export default {
|
||||
this.loading = true;
|
||||
this.error = null;
|
||||
try {
|
||||
const response = await apiClient.plans.get(this.planId);
|
||||
const response = await apiClient.plans.getPlanById(this.planId);
|
||||
this.plan = {
|
||||
...response.data,
|
||||
sub_plans: response.data.sub_plans || [],
|
||||
@@ -320,7 +320,7 @@ export default {
|
||||
delete submitData.status;
|
||||
|
||||
console.log("PlanDetail: Submitting data", submitData);
|
||||
await apiClient.plans.update(this.planId, submitData);
|
||||
await apiClient.plans.updatePlan(this.planId, submitData);
|
||||
ElMessage.success('计划内容已保存');
|
||||
this.isEditingContent = false;
|
||||
this.fetchPlan();
|
||||
@@ -355,7 +355,7 @@ export default {
|
||||
},
|
||||
async fetchAvailablePlans() {
|
||||
try {
|
||||
const response = await apiClient.plans.list();
|
||||
const response = await apiClient.plans.getPlans(); // 更正此处
|
||||
this.availablePlans = response.data.plans.filter(p =>
|
||||
p.id !== this.planId
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user