diff --git a/.gitignore b/.gitignore index 64820f2..ce50506 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,10 @@ web/index-deploy.zip # ── web:Admin 编译输出(部署前 build-only 生成)────────── web/public/admin/ +# ── web:后台上传的媒体缩略图 ───────────────────────────── +web/public/images/uploads/* +!web/public/images/uploads/.gitkeep + # ── admin:依赖与构建 ───────────────────────────────────── admin/node_modules/ admin/dist/ diff --git a/admin/src/api/dashboard.ts b/admin/src/api/dashboard.ts index 0be0c84..9556e3a 100644 --- a/admin/src/api/dashboard.ts +++ b/admin/src/api/dashboard.ts @@ -7,6 +7,8 @@ export interface IOverviewStats { today: number zh: number en: number + ar: number + ru: number } export interface IOverviewRecentAssessment { diff --git a/admin/src/api/news.ts b/admin/src/api/news.ts index cba4a42..e67da32 100644 --- a/admin/src/api/news.ts +++ b/admin/src/api/news.ts @@ -1,11 +1,12 @@ import request from '@/utils/request' import type { ICommonPageResponse, ICommonResponse } from '@/types/common' +import type { ContentLocale } from '@/utils/content-locale' export type MediaType = 'article' | 'video' export interface INewsItem { id: string - locale: 'en' | 'zh' + locale: ContentLocale mediaType: MediaType title: string summary: string @@ -23,7 +24,7 @@ export interface INewsItem { export interface INewsListParams { page: number pageSize: number - locale?: '' | 'en' | 'zh' + locale?: '' | ContentLocale mediaType?: '' | MediaType keyword?: string status?: '' | 'published' | 'draft' @@ -31,7 +32,7 @@ export interface INewsListParams { export interface INewsInput { id?: string - locale: 'en' | 'zh' + locale: ContentLocale mediaType: MediaType title: string summary: string diff --git a/admin/src/api/seo.ts b/admin/src/api/seo.ts index 2fc32d5..efd7553 100644 --- a/admin/src/api/seo.ts +++ b/admin/src/api/seo.ts @@ -1,10 +1,11 @@ import request from '@/utils/request' import type { ICommonResponse } from '@/types/common' +import type { ContentLocale } from '@/utils/content-locale' export interface IPageSeoItem { id: string routeKey: string - locale: 'en' | 'zh' + locale: ContentLocale pageLabel: string title: string description: string @@ -30,7 +31,7 @@ export interface IPageSeoUpdatePayload { } export interface IPageSeoListParams { - locale?: 'en' | 'zh' | '' + locale?: ContentLocale | '' keyword?: string } diff --git a/admin/src/views/content/news/create.vue b/admin/src/views/content/news/create.vue index 6abc2bb..590982d 100644 --- a/admin/src/views/content/news/create.vue +++ b/admin/src/views/content/news/create.vue @@ -22,6 +22,8 @@ 中文 英文 + 阿拉伯语 + 俄语 @@ -31,7 +33,7 @@ - + @@ -97,7 +99,7 @@ const formRules = computed(() => ({ locale: [{ required: true, message: '请选择语言', trigger: 'change' }], title: [{ required: true, message: '请输入标题', trigger: 'blur' }], summary: [{ required: true, message: '请输入简介', trigger: 'blur' }], - thumbnail: [{ required: true, message: '请输入缩略图地址', trigger: 'blur' }], + thumbnail: [{ required: true, message: '请上传缩略图或输入图片地址', trigger: 'blur' }], url: submitForm.value.mediaType === 'article' ? [{ required: true, message: '请输入原文链接', trigger: 'blur' }] diff --git a/admin/src/views/content/news/index.vue b/admin/src/views/content/news/index.vue index 3b44a77..bf98723 100644 --- a/admin/src/views/content/news/index.vue +++ b/admin/src/views/content/news/index.vue @@ -33,13 +33,14 @@ - + @@ -59,9 +59,9 @@ - + @@ -84,6 +84,7 @@