diff --git a/frontend/components.d.ts b/frontend/components.d.ts index b81887b..f3d4178 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -23,6 +23,7 @@ declare module 'vue' { ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] ElPagination: typeof import('element-plus/es')['ElPagination'] + ElTag: typeof import('element-plus/es')['ElTag'] HelloWorld: typeof import('./src/components/HelloWorld.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/frontend/src/api/article.ts b/frontend/src/api/article.ts new file mode 100644 index 0000000..ef031c9 --- /dev/null +++ b/frontend/src/api/article.ts @@ -0,0 +1,13 @@ +//进行接口API的统一管理 +import { request } from "./axios"; + +export class article { + /** + * @description 获取article文章详情 + * @param {string} id - 内容ID + * @return {Promise} 返回请求结果 + */ + static async getArticleDetail(id: string) { + return request("/index/articles/getArticleDetail", { id }, "get"); + } +} diff --git a/frontend/src/api/downloadGames.ts b/frontend/src/api/downloadGames.ts index c6450fa..4619990 100644 --- a/frontend/src/api/downloadGames.ts +++ b/frontend/src/api/downloadGames.ts @@ -28,12 +28,4 @@ export class downloadGames { return request("/index/program/getDownloadGamesSimpleLists", { cateid }, "get"); } - /** - * @description 获取downloadGames文章详情 - * @param {string} id - 内容ID - * @return {Promise} 返回请求结果 - */ - static async getDownloadGamesDetail(id: string) { - return request("/index/program/getDownloadGamesDetail", { id }, "get"); - } } \ No newline at end of file diff --git a/frontend/src/api/downloadPrograms.ts b/frontend/src/api/downloadPrograms.ts index 91e7f55..9f273cd 100644 --- a/frontend/src/api/downloadPrograms.ts +++ b/frontend/src/api/downloadPrograms.ts @@ -36,12 +36,4 @@ export class downloadPrograms { ); } - /** - * @description 获取downloadPrograms文章详情 - * @param {string} id - 内容ID - * @return {Promise} 返回请求结果 - */ - static async getDownloadProgramsDetail(id: string) { - return request("/index/program/getDownloadProgramsDetail", { id }, "get"); - } } diff --git a/frontend/src/api/officeResources.ts b/frontend/src/api/officeResources.ts index cbed7ce..85f57ee 100644 --- a/frontend/src/api/officeResources.ts +++ b/frontend/src/api/officeResources.ts @@ -32,12 +32,4 @@ export class officeResources { ); } - /** - * @description 获取officeResources文章详情 - * @param {string} id - 内容ID - * @return {Promise} 返回请求结果 - */ - static async getOfficeResourcesDetail(id: string) { - return request("/index/program/getOfficeResourcesDetail", { id }, "get"); - } } diff --git a/frontend/src/api/resource.ts b/frontend/src/api/resource.ts new file mode 100644 index 0000000..2f368a7 --- /dev/null +++ b/frontend/src/api/resource.ts @@ -0,0 +1,13 @@ +//进行接口API的统一管理 +import { request } from "./axios"; + +export class resource { + /** + * @description 获取resource文章详情 + * @param {string} id - 内容ID + * @return {Promise} 返回请求结果 + */ + static async getResourceDetail(id: string) { + return request("/index/resources/getResourceDetail", { id }, "get"); + } +} diff --git a/frontend/src/api/siteInformation.ts b/frontend/src/api/siteInformation.ts index 140e2da..c36e035 100644 --- a/frontend/src/api/siteInformation.ts +++ b/frontend/src/api/siteInformation.ts @@ -18,4 +18,5 @@ export class siteInformation { static async getSiteInformationLists(cateid: string) { return request("/index/articles/getSiteInformationLists", { cateid }, "get"); } + } \ No newline at end of file diff --git a/frontend/src/api/technicalArticles.ts b/frontend/src/api/technicalArticles.ts index ed06283..b3ec160 100644 --- a/frontend/src/api/technicalArticles.ts +++ b/frontend/src/api/technicalArticles.ts @@ -22,4 +22,5 @@ export class technicalArticles { "get" ); } + } diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index cf238a9..6548475 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -33,9 +33,14 @@ const router = createRouter({ component: () => import("@/views/downloadPrograms/index.vue"), }, { - path: "/downloadPrograms/:id", - name: "downloadProgramsDetail", - component: () => import("@/views/downloadPrograms/detail.vue"), + path: "/article", + name: "articleDetail", + component: () => import("@/views/components/detail_article.vue"), + }, + { + path: "/resource", + name: "resourceDetail", + component: () => import("@/views/components/detail_resource.vue"), }, { path: "/downloadGames", diff --git a/frontend/src/views/components/detail_article.vue b/frontend/src/views/components/detail_article.vue new file mode 100644 index 0000000..849bb3b --- /dev/null +++ b/frontend/src/views/components/detail_article.vue @@ -0,0 +1,353 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/views/components/detail_resource.vue b/frontend/src/views/components/detail_resource.vue new file mode 100644 index 0000000..f739d8f --- /dev/null +++ b/frontend/src/views/components/detail_resource.vue @@ -0,0 +1,420 @@ + + + + + diff --git a/frontend/src/views/downloadGames/index.vue b/frontend/src/views/downloadGames/index.vue index d388b5c..9dd3618 100644 --- a/frontend/src/views/downloadGames/index.vue +++ b/frontend/src/views/downloadGames/index.vue @@ -3,9 +3,9 @@
-

办公资源

+

游戏资源

-

发现优质程序与工具

+

发现优质游戏资源

@@ -40,7 +40,7 @@

{{ resource.title }}

@@ -97,6 +97,12 @@ const currentPage = ref(1); // 当前页码 const pageSize = ref(10); // 每页条数 const total = ref(0); // 总条数 +// 当前选中分类的名称 +const currentCategoryName = computed(() => { + const category = categories.value.find(cat => cat.id === selectedCategory.value); + return category?.name || ''; +}); + // 获取图片地址 const getImageUrl = (imagePath: string) => { if (!imagePath) return "/src/assets/imgs/default.png"; diff --git a/frontend/src/views/downloadPrograms/detail.vue b/frontend/src/views/downloadPrograms/detail.vue deleted file mode 100644 index cabc16b..0000000 --- a/frontend/src/views/downloadPrograms/detail.vue +++ /dev/null @@ -1,428 +0,0 @@ - - - - - diff --git a/frontend/src/views/downloadPrograms/index.vue b/frontend/src/views/downloadPrograms/index.vue index ddeacbe..1ac689c 100644 --- a/frontend/src/views/downloadPrograms/index.vue +++ b/frontend/src/views/downloadPrograms/index.vue @@ -3,9 +3,9 @@
-

办公资源

+

程序资源

-

发现优质程序与工具

+

发现优质程序资源

@@ -40,7 +40,7 @@

{{ resource.title }}

@@ -82,7 +82,7 @@