refactor: 解决方案页的API重构
This commit is contained in:
@ -26,16 +26,16 @@
|
||||
const route = useRoute();
|
||||
const localePath = useLocalePath();
|
||||
|
||||
// 获取路由参数(documentId)
|
||||
const id = computed(() => route.params.slug as string);
|
||||
// 获取路由参数
|
||||
const id = route.params.slug as string;
|
||||
|
||||
const { data, pending, error } = await useSolution(id.value);
|
||||
const { data, pending, error } = await useSolution(id);
|
||||
|
||||
const solution = computed(() => {
|
||||
if (!data.value) {
|
||||
return null;
|
||||
}
|
||||
return toSolutionView(data.value);
|
||||
return toSolutionView(data.value.solutions_by_id);
|
||||
});
|
||||
|
||||
const breadcrumbItems = computed(() => [
|
||||
Reference in New Issue
Block a user