From 496548afa4daf15364b418afe407ec3a40915778 Mon Sep 17 00:00:00 2001 From: R2m1liA <15258427350@163.com> Date: Sat, 15 Nov 2025 16:33:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=A0=87=E6=B3=A8=E4=B8=8EGraphQL=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=90=8C=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将类型标注中的id字段改为string --- app/components/shared/QuestionList.vue | 2 +- server/mappers/companyProfileMapper.test.ts | 4 ++-- server/mappers/companyProfileMapper.ts | 2 +- server/mappers/contactInfoMapper.test.ts | 4 ++-- server/mappers/contactInfoMapper.ts | 2 +- server/mappers/documentMapper.test.ts | 12 +++++----- server/mappers/documentMapper.ts | 10 ++++---- server/mappers/homepageMapper.test.ts | 14 +++++------ server/mappers/homepageMapper.ts | 6 ++--- server/mappers/productMapper.test.ts | 24 +++++++++---------- server/mappers/productMapper.ts | 14 +++++------ server/mappers/questionMapper.test.ts | 16 ++++++------- server/mappers/questionMapper.ts | 10 ++++---- server/mappers/solutionMapper.test.ts | 12 +++++----- server/mappers/solutionMapper.ts | 8 +++---- shared/types/views/company-profile-view.ts | 2 +- shared/types/views/contact-info-view.ts | 2 +- shared/types/views/document-list-view.ts | 6 ++--- shared/types/views/homepage-view.ts | 6 ++--- shared/types/views/product-document-view.ts | 2 +- shared/types/views/product-list-view.ts | 4 ++-- shared/types/views/product-question-view.ts | 2 +- shared/types/views/product-spec-group-view.ts | 4 ++-- shared/types/views/product-view.ts | 4 ++-- shared/types/views/question-list-view.ts | 6 ++--- shared/types/views/solution-list-view.ts | 4 ++-- shared/types/views/solution-view.ts | 2 +- 27 files changed, 92 insertions(+), 92 deletions(-) diff --git a/app/components/shared/QuestionList.vue b/app/components/shared/QuestionList.vue index 40ff8f2..43798f9 100644 --- a/app/components/shared/QuestionList.vue +++ b/app/components/shared/QuestionList.vue @@ -45,7 +45,7 @@ // 确保渲染完成后再操作 DOM await nextTick(); - const target = props.questions.find((q) => q.id === Number(focusId)); + const target = props.questions.find((q) => q.id === focusId); if (!target) return; // 展开目标项 diff --git a/server/mappers/companyProfileMapper.test.ts b/server/mappers/companyProfileMapper.test.ts index 8b0fc66..dab6957 100644 --- a/server/mappers/companyProfileMapper.test.ts +++ b/server/mappers/companyProfileMapper.test.ts @@ -16,7 +16,7 @@ describe('companyProfileMapper', () => { }; expect(toCompanyProfileView(rawData)).toEqual({ - id: 1, + id: '1', content: 'This is raw data of company profile', }); }); @@ -27,7 +27,7 @@ describe('companyProfileMapper', () => { }; expect(toCompanyProfileView(rawData)).toEqual({ - id: 1, + id: '1', content: '', }); }); diff --git a/server/mappers/companyProfileMapper.ts b/server/mappers/companyProfileMapper.ts index 50315d3..4c9cd2e 100644 --- a/server/mappers/companyProfileMapper.ts +++ b/server/mappers/companyProfileMapper.ts @@ -11,7 +11,7 @@ export function toCompanyProfileView(raw: CompanyProfile): CompanyProfileView { const trans = raw.translations?.[0]; return { - id: raw.id, + id: raw.id.toString(), content: trans?.content ?? '', }; } diff --git a/server/mappers/contactInfoMapper.test.ts b/server/mappers/contactInfoMapper.test.ts index f15f77e..6eca5fe 100644 --- a/server/mappers/contactInfoMapper.test.ts +++ b/server/mappers/contactInfoMapper.test.ts @@ -15,7 +15,7 @@ describe('contactInfoMapper', () => { }; expect(toContactInfoView(rawData)).toEqual({ - id: 1, + id: '1', content: 'This is raw data of contact info', }); }); @@ -27,7 +27,7 @@ describe('contactInfoMapper', () => { }; expect(toContactInfoView(rawData)).toEqual({ - id: 1, + id: '1', content: '', }); }); diff --git a/server/mappers/contactInfoMapper.ts b/server/mappers/contactInfoMapper.ts index 1ea7489..e5b96ab 100644 --- a/server/mappers/contactInfoMapper.ts +++ b/server/mappers/contactInfoMapper.ts @@ -11,7 +11,7 @@ export function toContactInfoView(raw: ContactInfo): ContactInfoView { const trans = raw.translations?.[0]; return { - id: raw.id, + id: raw.id.toString(), content: trans?.content ?? '', }; } diff --git a/server/mappers/documentMapper.test.ts b/server/mappers/documentMapper.test.ts index d54e661..50b1efc 100644 --- a/server/mappers/documentMapper.test.ts +++ b/server/mappers/documentMapper.test.ts @@ -18,7 +18,7 @@ describe('toProductDocumentView', () => { test('convert raw data with fileMeta to ProductDocumentView correctly', () => { const rawData: ProductDocument = { ...baseData }; expect(toProductDocumentView(rawData)).toEqual({ - id: 1, + id: '1', fileId: 'rand-om__-uuid-1234', filename: 'document.pdf', title: 'Document Title', @@ -34,7 +34,7 @@ describe('toProductDocumentView', () => { }; expect(toProductDocumentView(rawData)).toEqual({ - id: 1, + id: '1', fileId: '', filename: '', title: 'Document Title', @@ -49,7 +49,7 @@ describe('toProductDocumentView', () => { translations: [], }; expect(toProductDocumentView(rawData)).toEqual({ - id: 1, + id: '1', fileId: 'rand-om__-uuid-1234', filename: 'document.pdf', title: '', @@ -88,7 +88,7 @@ describe('toDocumentListView', () => { test('convert raw data with fileMeta to DocumentListView correctly', () => { const rawData: ProductDocument = { ...baseData }; expect(toDocumentListView(rawData)).toEqual({ - id: 1, + id: '1', fileId: 'rand-om__-uuid-1234', filename: 'document.pdf', title: 'Document Title', @@ -96,10 +96,10 @@ describe('toDocumentListView', () => { size: 2048, products: [ { - id: 1, + id: '1', name: 'Product A', type: { - id: 1, + id: '1', name: 'Type A', }, }, diff --git a/server/mappers/documentMapper.ts b/server/mappers/documentMapper.ts index 88ca391..9982dee 100644 --- a/server/mappers/documentMapper.ts +++ b/server/mappers/documentMapper.ts @@ -19,7 +19,7 @@ export function toProductDocumentView( const url = `/api/assets/${fileId}`; return { - id: raw.id, + id: raw.id.toString(), fileId: fileId, filename: file?.filename_download ?? '', title: trans?.title ?? '', @@ -52,22 +52,22 @@ export function toDocumentListView(raw: ProductDocument): DocumentListView { .map((item) => { const productType = isObject(item.product_type) ? ({ - id: item.product_type.id, + id: item.product_type.id.toString(), name: item.product_type.translations?.[0]?.name ?? '', } satisfies DocumentListProductType) : ({ - id: -1, + id: '', name: '', } satisfies DocumentListProductType); return { - id: item.id, + id: item.id.toString(), name: item.translations?.[0]?.name ?? '', type: productType, }; }); return { - id: raw.id, + id: raw.id.toString(), fileId: fileId, filename: file?.filename_download ?? '', title: trans?.title ?? '', diff --git a/server/mappers/homepageMapper.test.ts b/server/mappers/homepageMapper.test.ts index e477bd3..3e70284 100644 --- a/server/mappers/homepageMapper.test.ts +++ b/server/mappers/homepageMapper.test.ts @@ -50,17 +50,17 @@ describe('toHomepageView', () => { }; expect(toHomepageView(rawData)).toEqual({ - id: 1, + id: '1', carousel: ['file-uuid-1', 'file-uuid-2'], recommendProducts: [ { - id: 1, + id: '1', name: 'Product 1', summary: 'Summary 1', cover: 'cover-file-uuid-1', }, { - id: 2, + id: '2', name: 'Product 2', summary: 'Summary 2', cover: 'cover-file-uuid-2', @@ -68,7 +68,7 @@ describe('toHomepageView', () => { ], recommendSolutions: [ { - id: 1, + id: '1', title: 'Solution 1', summary: 'Summary 1', cover: 'cover-file-uuid-1', @@ -86,10 +86,10 @@ describe('toHomepageView', () => { }; expect(toHomepageView(rawData)).toEqual({ - id: 1, + id: '1', carousel: [], - recommendProducts: [{ id: 1, name: '', summary: '', cover: '' }], - recommendSolutions: [{ id: 1, title: '', summary: '', cover: '' }], + recommendProducts: [{ id: '1', name: '', summary: '', cover: '' }], + recommendSolutions: [{ id: '1', title: '', summary: '', cover: '' }], }); }); }); diff --git a/server/mappers/homepageMapper.ts b/server/mappers/homepageMapper.ts index a3836b5..5dc18b9 100644 --- a/server/mappers/homepageMapper.ts +++ b/server/mappers/homepageMapper.ts @@ -24,7 +24,7 @@ export function toHomepageView(raw: Homepage): HomepageView { const cover = isObject(item.cover) ? item.cover.id : ''; return { - id: item.id, + id: item.id.toString(), name: trans?.name ?? '', summary: trans?.summary ?? '', cover: cover, @@ -38,7 +38,7 @@ export function toHomepageView(raw: Homepage): HomepageView { const cover = isObject(item.cover) ? item.cover.id : ''; return { - id: item.id, + id: item.id.toString(), title: trans?.title ?? '', summary: trans?.summary ?? '', cover: cover, @@ -46,7 +46,7 @@ export function toHomepageView(raw: Homepage): HomepageView { }); return { - id: raw.id, + id: raw.id.toString(), carousel: carousel ?? [], recommendProducts: products ?? [], recommendSolutions: solutions ?? [], diff --git a/server/mappers/productMapper.test.ts b/server/mappers/productMapper.test.ts index 22fcf76..5163aae 100644 --- a/server/mappers/productMapper.test.ts +++ b/server/mappers/productMapper.test.ts @@ -27,12 +27,12 @@ describe('toProductListView', () => { }; expect(toProductListView(rawData)).toEqual({ - id: 1, + id: '1', name: 'Product Name', summary: 'Product Summary', cover: 'cover-file-uuid-1234', product_type: { - id: 1, + id: '1', name: 'Type Name', sort: 1, }, @@ -54,12 +54,12 @@ describe('toProductListView', () => { }; expect(toProductListView(rawData)).toEqual({ - id: 1, + id: '1', name: '', summary: '', cover: 'cover-file-uuid-1234', product_type: { - id: 20, + id: '20', name: '', sort: 1, }, @@ -78,7 +78,7 @@ describe('toProductSpecView', () => { }; expect(toProductSpecView(rawData)).toEqual({ - id: 1, + id: '1', key: 'Key', value: 'Value', }); @@ -91,7 +91,7 @@ describe('toProductSpecView', () => { }; expect(toProductSpecView(rawData)).toEqual({ - id: 1, + id: '1', key: '', value: '', }); @@ -113,11 +113,11 @@ describe('toProductSpecGroupView', () => { }; expect(toProductSpecGroupView(rawData)).toEqual({ - id: 1, + id: '1', name: 'Group Name', specs: [ - { id: 1, key: 'Key1', value: 'Value1' }, - { id: 2, key: 'Key2', value: 'Value2' }, + { id: '1', key: 'Key1', value: 'Value1' }, + { id: '2', key: 'Key2', value: 'Value2' }, ], }); }); @@ -130,7 +130,7 @@ describe('toProductSpecGroupView', () => { }; expect(toProductSpecGroupView(rawData)).toEqual({ - id: 1, + id: '1', name: '', specs: [], }); @@ -155,7 +155,7 @@ describe('toProductView', () => { }; expect(toProductView(rawData)).toEqual({ - id: 1, + id: '1', name: 'Product Name', summary: 'Product Summary', description: 'Product Description', @@ -174,7 +174,7 @@ describe('toProductView', () => { }; expect(toProductView(rawData)).toEqual({ - id: 1, + id: '1', name: '', summary: '', description: '', diff --git a/server/mappers/productMapper.ts b/server/mappers/productMapper.ts index 2fe637f..185e355 100644 --- a/server/mappers/productMapper.ts +++ b/server/mappers/productMapper.ts @@ -15,7 +15,7 @@ export function toProductTypeView(raw: ProductType): ProductTypeView { const trans = raw.translations?.[0] ?? { name: '' }; return { - id: raw.id, + id: raw.id.toString(), name: trans.name, sort: raw?.sort ?? 999, }; @@ -36,7 +36,7 @@ export function toProductListView(raw: Product): ProductListView { const type = isObject(raw.product_type) ? toProductTypeView(raw.product_type) : ({ - id: -1, + id: '', name: '', sort: 999, } satisfies ProductTypeView); @@ -44,7 +44,7 @@ export function toProductListView(raw: Product): ProductListView { const cover = isObject(raw.cover) ? raw.cover.id : ''; return { - id: raw.id, + id: raw.id.toString(), product_type: type, name: trans?.name ?? '', summary: trans?.summary ?? '', @@ -69,7 +69,7 @@ export function toProductSpecGroupView( const specs = raw.specs ?? []; return { - id: raw.id, + id: raw.id.toString(), name: trans?.name ?? '', specs: specs .filter(isObject) @@ -90,7 +90,7 @@ export function toProductSpecView(raw: ProductSpec): ProductSpecView { const trans = raw.translations?.[0]; return { - id: raw.id, + id: raw.id.toString(), key: trans?.key ?? '', value: trans?.value ?? '', }; @@ -115,7 +115,7 @@ export function toProductView(raw: Product): ProductView { .map((item) => { const image = isObject(item.image) ? item.image.id : ''; return { - id: item.id, + id: item.id.toString(), image: image, caption: item.translations?.[0]?.caption || '', }; @@ -142,7 +142,7 @@ export function toProductView(raw: Product): ProductView { .map((item) => toProductDocumentView(item)); return { - id: raw.id, + id: raw.id.toString(), product_type: type, name: trans?.name ?? '', summary: trans?.summary ?? '', diff --git a/server/mappers/questionMapper.test.ts b/server/mappers/questionMapper.test.ts index 6f341ab..b6d45e7 100644 --- a/server/mappers/questionMapper.test.ts +++ b/server/mappers/questionMapper.test.ts @@ -17,7 +17,7 @@ describe('toProductQuestionView', () => { }; expect(toProductQuestionView(rawData)).toEqual({ - id: 1, + id: '1', title: 'Question Title', content: 'Question Answer', }); @@ -30,7 +30,7 @@ describe('toProductQuestionView', () => { }; expect(toProductQuestionView(rawData)).toEqual({ - id: 1, + id: '1', title: '', content: '', }); @@ -67,15 +67,15 @@ describe('toQuestionListView', () => { }; expect(toQuestionListView(rawData)).toEqual({ - id: 1, + id: '1', title: 'Question Title', content: 'Question Answer', products: [ { - id: 1, + id: '1', name: 'Product Name', type: { - id: 1, + id: '1', name: 'Type Name', }, }, @@ -103,15 +103,15 @@ describe('toQuestionListView', () => { }; expect(toQuestionListView(rawData)).toEqual({ - id: 1, + id: '1', title: '', content: '', products: [ { - id: 1, + id: '1', name: '', type: { - id: 1, + id: '1', name: '', }, }, diff --git a/server/mappers/questionMapper.ts b/server/mappers/questionMapper.ts index 1af5d66..f30def6 100644 --- a/server/mappers/questionMapper.ts +++ b/server/mappers/questionMapper.ts @@ -13,7 +13,7 @@ export function toProductQuestionView(raw: Question): ProductQuestionView { const trans = raw.translations?.[0]; return { - id: raw.id, + id: raw.id.toString(), title: trans?.title ?? '', content: trans?.content ?? '', }; @@ -40,23 +40,23 @@ export function toQuestionListView(raw: Question): QuestionListView { const product_type = isObject(item.product_type) ? ({ - id: item.product_type.id, + id: item.product_type.id.toString(), name: item.product_type.translations?.[0]?.name ?? '', } satisfies QuestionListProductType) : ({ - id: -1, + id: '', name: '', } satisfies QuestionListProductType); return { - id: item.id, + id: item.id.toString(), name: translations?.name ?? '', type: product_type, }; }); return { - id: raw.id, + id: raw.id.toString(), title: trans?.title ?? '', content: trans?.content ?? '', products: related_products, diff --git a/server/mappers/solutionMapper.test.ts b/server/mappers/solutionMapper.test.ts index fbdc292..dc6c413 100644 --- a/server/mappers/solutionMapper.test.ts +++ b/server/mappers/solutionMapper.test.ts @@ -20,11 +20,11 @@ describe('toSolutionListView', () => { const rawData: Solution = { ...baseData }; expect(toSolutionListView(rawData)).toEqual({ - id: 1, + id: '1', title: 'Solution Title', summary: 'Solution Summary', solution_type: { - id: 1, + id: '1', name: 'Type Name', sort: 1, }, @@ -39,11 +39,11 @@ describe('toSolutionListView', () => { }; expect(toSolutionListView(rawData)).toEqual({ - id: 1, + id: '1', title: '', summary: '', solution_type: { - id: 1, + id: '1', name: 'Type Name', sort: 1, }, @@ -75,7 +75,7 @@ describe('toSolutionView', () => { }; expect(toSolutionView(rawData)).toEqual({ - id: 1, + id: '1', title: 'Solution Title', summary: 'Solution Summary', content: 'Solution Content', @@ -90,7 +90,7 @@ describe('toSolutionView', () => { }; expect(toSolutionView(rawData)).toEqual({ - id: 1, + id: '1', title: '', summary: '', content: '', diff --git a/server/mappers/solutionMapper.ts b/server/mappers/solutionMapper.ts index b0a5331..3c903d1 100644 --- a/server/mappers/solutionMapper.ts +++ b/server/mappers/solutionMapper.ts @@ -15,7 +15,7 @@ export function toSolutionTypeView(raw: SolutionType): SolutionTypeView { const trans = raw?.translations?.[0]; return { - id: raw.id, + id: raw.id.toString(), name: trans?.name ?? '', sort: raw?.sort ?? 999, }; @@ -38,7 +38,7 @@ export function toSolutionListView(raw: Solution): SolutionListView { const type = isObject(raw.type) ? toSolutionTypeView(raw.type) : ({ - id: -1, + id: '', name: 'uncategory', sort: 999, } satisfies SolutionTypeView); @@ -46,7 +46,7 @@ export function toSolutionListView(raw: Solution): SolutionListView { const cover = isObject(raw.cover) ? (raw?.cover.id ?? '') : ''; return { - id: raw.id, + id: raw.id.toString(), title: trans?.title ?? '', summary: trans?.summary ?? '', solution_type: type, @@ -69,7 +69,7 @@ export function toSolutionView(raw: Solution): SolutionView { const trans = raw.translations?.[0]; return { - id: raw.id, + id: raw.id.toString(), title: trans?.title ?? '', summary: trans?.summary ?? '', content: trans?.content ?? '', diff --git a/shared/types/views/company-profile-view.ts b/shared/types/views/company-profile-view.ts index cba398c..cd6cbd9 100644 --- a/shared/types/views/company-profile-view.ts +++ b/shared/types/views/company-profile-view.ts @@ -3,7 +3,7 @@ */ export interface CompanyProfileView { /** 唯一标识符 **/ - id: number; + id: string; /** 内容 **/ content: string; diff --git a/shared/types/views/contact-info-view.ts b/shared/types/views/contact-info-view.ts index a083c13..272ecb0 100644 --- a/shared/types/views/contact-info-view.ts +++ b/shared/types/views/contact-info-view.ts @@ -3,7 +3,7 @@ */ export interface ContactInfoView { /** 唯一标识符 **/ - id: number; + id: string; /** 内容 **/ content: string; diff --git a/shared/types/views/document-list-view.ts b/shared/types/views/document-list-view.ts index 5b66106..a3cdefe 100644 --- a/shared/types/views/document-list-view.ts +++ b/shared/types/views/document-list-view.ts @@ -3,7 +3,7 @@ * 用于在文档库中提供产品筛选功能 */ export interface DocumentListProductType { - id: number; + id: string; name: string; } @@ -12,7 +12,7 @@ export interface DocumentListProductType { * 用于在文档库中提供产品筛选功能 */ export interface DocumentListProduct { - id: number; + id: string; name: string; type: DocumentListProductType; } @@ -23,7 +23,7 @@ export interface DocumentListProduct { */ export interface DocumentListView { /** 唯一标识符 **/ - id: number; + id: string; /** 文件UUID **/ fileId: string; diff --git a/shared/types/views/homepage-view.ts b/shared/types/views/homepage-view.ts index fb7558c..edeff22 100644 --- a/shared/types/views/homepage-view.ts +++ b/shared/types/views/homepage-view.ts @@ -3,7 +3,7 @@ */ export interface HomepageProductView { /** 唯一标识符 **/ - id: number; + id: string; /** 产品名称 **/ name: string; @@ -20,7 +20,7 @@ export interface HomepageProductView { */ export interface HomepageSolutionView { /** 唯一标识符 **/ - id: number; + id: string; /** 解决方案标题 **/ title: string; @@ -37,7 +37,7 @@ export interface HomepageSolutionView { */ export interface HomepageView { /** 唯一标识符 **/ - id: number; + id: string; /** 首页图片 **/ carousel: string[]; diff --git a/shared/types/views/product-document-view.ts b/shared/types/views/product-document-view.ts index 36625d2..fd0747e 100644 --- a/shared/types/views/product-document-view.ts +++ b/shared/types/views/product-document-view.ts @@ -4,7 +4,7 @@ */ export interface ProductDocumentView { /** 唯一标识符 **/ - id: number; + id: string; /** 文件UUID **/ fileId: string; diff --git a/shared/types/views/product-list-view.ts b/shared/types/views/product-list-view.ts index b8511da..e4548e2 100644 --- a/shared/types/views/product-list-view.ts +++ b/shared/types/views/product-list-view.ts @@ -4,7 +4,7 @@ */ export interface ProductTypeView { /** 唯一标识符 **/ - id: number; + id: string; /** 类型名 **/ name: string; @@ -19,7 +19,7 @@ export interface ProductTypeView { */ export interface ProductListView { /** 唯一标识符 **/ - id: number; + id: string; /** 产品名称 **/ name: string; diff --git a/shared/types/views/product-question-view.ts b/shared/types/views/product-question-view.ts index c8a85de..331b5b8 100644 --- a/shared/types/views/product-question-view.ts +++ b/shared/types/views/product-question-view.ts @@ -4,7 +4,7 @@ */ export interface ProductQuestionView { /** 唯一标识符 **/ - id: number; + id: string; /** 问题标题 **/ title: string; diff --git a/shared/types/views/product-spec-group-view.ts b/shared/types/views/product-spec-group-view.ts index 361fa71..203c8c3 100644 --- a/shared/types/views/product-spec-group-view.ts +++ b/shared/types/views/product-spec-group-view.ts @@ -4,7 +4,7 @@ */ export interface ProductSpecView { /** 唯一标识符 **/ - id: number; + id: string; /** 规格名称 **/ key: string; @@ -19,7 +19,7 @@ export interface ProductSpecView { */ export interface ProductSpecGroupView { /** 唯一标识符 **/ - id: number; + id: string; /** 规格组名称 **/ name: string; diff --git a/shared/types/views/product-view.ts b/shared/types/views/product-view.ts index 6c56017..01d076c 100644 --- a/shared/types/views/product-view.ts +++ b/shared/types/views/product-view.ts @@ -3,7 +3,7 @@ import type { ProductQuestionView } from './product-question-view'; import type { ProductDocumentView } from './product-document-view'; interface ImageView { - id: number; + id: string; image: string; caption: string; } @@ -14,7 +14,7 @@ interface ImageView { */ export interface ProductView { /** 唯一标识符 **/ - id: number; + id: string; /** 产品名称 **/ name: string; diff --git a/shared/types/views/question-list-view.ts b/shared/types/views/question-list-view.ts index b839bd2..4ea843c 100644 --- a/shared/types/views/question-list-view.ts +++ b/shared/types/views/question-list-view.ts @@ -3,7 +3,7 @@ * 用于在常见问题列表中提供产品筛选功能 */ export interface QuestionListProductType { - id: number; + id: string; name: string; } @@ -12,7 +12,7 @@ export interface QuestionListProductType { * 用于在常见问题列表中提供产品筛选功能 */ export interface QuestionListProduct { - id: number; + id: string; name: string; type: QuestionListProductType; } @@ -23,7 +23,7 @@ export interface QuestionListProduct { */ export interface QuestionListView { /** 唯一标识符 **/ - id: number; + id: string; /** 问题标题 **/ title: string; diff --git a/shared/types/views/solution-list-view.ts b/shared/types/views/solution-list-view.ts index b688271..b25c94d 100644 --- a/shared/types/views/solution-list-view.ts +++ b/shared/types/views/solution-list-view.ts @@ -4,7 +4,7 @@ */ export interface SolutionTypeView { /** 唯一标识符 **/ - id: number; + id: string; /** 类型名 **/ name: string; @@ -19,7 +19,7 @@ export interface SolutionTypeView { */ export interface SolutionListView { /** 唯一标识符 **/ - id: number; + id: string; /** 标题 **/ title: string; diff --git a/shared/types/views/solution-view.ts b/shared/types/views/solution-view.ts index f5bda88..9e93b46 100644 --- a/shared/types/views/solution-view.ts +++ b/shared/types/views/solution-view.ts @@ -4,7 +4,7 @@ */ export interface SolutionView { /** 唯一标识符 **/ - id: number; + id: string; /** 标题 **/ title: string; From 05c970d1e7bb8163e8068692aa73ed6cef69d5e2 Mon Sep 17 00:00:00 2001 From: R2m1liA <15258427350@163.com> Date: Sat, 15 Nov 2025 16:33:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除useMeilisearch --- app/composables/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/app/composables/index.ts b/app/composables/index.ts index 07928bd..1e8bfb4 100644 --- a/app/composables/index.ts +++ b/app/composables/index.ts @@ -1,3 +1,2 @@ export * from './directus'; export * from './useLocalizations'; -export * from './useMeilisearch';