refactor: 将数据获取从app端移至server端

- 调整数据获取位置以提升安全性
- 对于后端状态为Archived的数据,通过server控制不进行获取
This commit is contained in:
2025-11-12 17:54:43 +08:00
parent 58223734a2
commit a5f3895794
37 changed files with 302 additions and 85 deletions

View File

@ -24,7 +24,7 @@
];
const { data, pending, error } = await useContactInfo();
const content = computed(() => toContactInfoView(data.value.contact_info));
const content = computed(() => toContactInfoView(data.value));
watch(error, (value) => {
if (value) {

View File

@ -38,9 +38,7 @@
const { data, pending, error } = await useDocumentList();
const documents = computed(
() =>
data?.value.product_documents.map((item) => toDocumentListView(item)) ??
[]
() => data?.value.map((item) => toDocumentListView(item)) ?? []
);
const productTypeOptions = computed(() => {

View File

@ -41,7 +41,7 @@
const { data, pending, error } = await useQuestionList();
const questions = computed(
() => data.value.questions.map((item) => toQuestionListView(item)) ?? null
() => data.value.map((item) => toQuestionListView(item)) ?? null
);
const productTypeOptions = computed(() => {