diff --git a/frontend/.env.development b/frontend/.env.development new file mode 100644 index 0000000..2417238 Binary files /dev/null and b/frontend/.env.development differ diff --git a/frontend/.env.production b/frontend/.env.production new file mode 100644 index 0000000..9206ce0 Binary files /dev/null and b/frontend/.env.production differ diff --git a/frontend/frontend/.env.development b/frontend/frontend/.env.development new file mode 100644 index 0000000..ccfa5cc --- /dev/null +++ b/frontend/frontend/.env.development @@ -0,0 +1,7 @@ +# 寮€鍙戠幆澧冮厤缃?# API 鍩虹鍦板潃 +VITE_API_DOMAIN=http://localhost:8000 + +# 寮€鍙戠幆澧冩爣璇?NODE_ENV=development + +# 璋冭瘯妯″紡 +VITE_DEBUG=true diff --git a/frontend/frontend/frontend/.env.production b/frontend/frontend/frontend/.env.production new file mode 100644 index 0000000..8d32a9e --- /dev/null +++ b/frontend/frontend/frontend/.env.production @@ -0,0 +1,9 @@ +# 鐢熶骇鐜閰嶇疆 +# API 鍩虹鍦板潃 +VITE_API_DOMAIN=https://api.yourdomain.com + +# 鐢熶骇鐜鏍囪瘑 +NODE_ENV=production + +# 璋冭瘯妯″紡 +VITE_DEBUG=false diff --git a/frontend/package.json b/frontend/package.json index ab8c90d..2025b0c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -4,8 +4,8 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", - "build": "vue-tsc -b && vite build", + "dev": "vite --mode development", + "build": "vite build --mode production", "preview": "vite preview" }, "dependencies": { diff --git a/frontend/src/api/api.ts b/frontend/src/api/api.ts index d8a09f9..a5beb66 100644 --- a/frontend/src/api/api.ts +++ b/frontend/src/api/api.ts @@ -1,5 +1,4 @@ //进行接口API的统一管理 -import { request } from "./axios"; export class UserService { diff --git a/frontend/src/api/downloadGames.ts b/frontend/src/api/downloadGames.ts new file mode 100644 index 0000000..70ff86f --- /dev/null +++ b/frontend/src/api/downloadGames.ts @@ -0,0 +1,21 @@ +//进行接口API的统一管理 +import { request } from "./axios"; + +export class downloadGames { + /** + * @description 获取downloadGames分类 + * @return {Promise} 返回请求结果 + */ + static async getDownloadGamesCategory() { + return request("/index/program/getDownloadGamesCategory", "get"); + } + + /** + * @description 获取downloadGames文章列表 + * @param {string} cateid - 分类ID + * @return {Promise} 返回请求结果 + */ + static async getDownloadGamesLists(cateid: string) { + return request("/index/program/getDownloadGamesLists", { cateid }, "get"); + } +} \ No newline at end of file diff --git a/frontend/src/api/downloadPrograms.ts b/frontend/src/api/downloadPrograms.ts new file mode 100644 index 0000000..4861b31 --- /dev/null +++ b/frontend/src/api/downloadPrograms.ts @@ -0,0 +1,21 @@ +//进行接口API的统一管理 +import { request } from "./axios"; + +export class downloadPrograms { + /** + * @description 获取downloadPrograms分类 + * @return {Promise} 返回请求结果 + */ + static async getDownloadProgramsCategory() { + return request("/index/program/getDownloadProgramsCategory", "get"); + } + + /** + * @description 获取downloadPrograms文章列表 + * @param {string} cateid - 分类ID + * @return {Promise} 返回请求结果 + */ + static async getDownloadProgramsLists(cateid: string) { + return request("/index/program/getDownloadProgramsLists", { cateid }, "get"); + } +} \ No newline at end of file diff --git a/frontend/src/api/officeResources.ts b/frontend/src/api/officeResources.ts new file mode 100644 index 0000000..9a68cd6 --- /dev/null +++ b/frontend/src/api/officeResources.ts @@ -0,0 +1,21 @@ +//进行接口API的统一管理 +import { request } from "./axios"; + +export class officeResources { + /** + * @description 获取officeResources分类 + * @return {Promise} 返回请求结果 + */ + static async getOfficeResourcesCategory() { + return request("/index/program/getOfficeResourcesCategory", "get"); + } + + /** + * @description 获取officeResources文章列表 + * @param {string} cateid - 分类ID + * @return {Promise} 返回请求结果 + */ + static async getOfficeResourcesLists(cateid: string) { + return request("/index/program/getOfficeResourcesLists", { cateid }, "get"); + } +} \ No newline at end of file diff --git a/frontend/src/api/siteInformation.ts b/frontend/src/api/siteInformation.ts index a74a3d7..140e2da 100644 --- a/frontend/src/api/siteInformation.ts +++ b/frontend/src/api/siteInformation.ts @@ -18,4 +18,4 @@ 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 new file mode 100644 index 0000000..ed06283 --- /dev/null +++ b/frontend/src/api/technicalArticles.ts @@ -0,0 +1,25 @@ +//进行接口API的统一管理 +import { request } from "./axios"; + +export class technicalArticles { + /** + * @description 获取technicalArticles分类 + * @return {Promise} 返回请求结果 + */ + static async getTechnicalArticlesCategory() { + return request("/index/articles/getTechnicalArticlesCategory", "get"); + } + + /** + * @description 获取technicalArticles文章列表 + * @param {string} cateid - 分类ID + * @return {Promise} 返回请求结果 + */ + static async getTechnicalArticlesLists(cateid: string) { + return request( + "/index/articles/getTechnicalArticlesLists", + { cateid }, + "get" + ); + } +} diff --git a/frontend/src/assets/imgs/default.png b/frontend/src/assets/imgs/default.png new file mode 100644 index 0000000..d4e4af0 Binary files /dev/null and b/frontend/src/assets/imgs/default.png differ diff --git a/frontend/src/views/downloadGames/index.vue b/frontend/src/views/downloadGames/index.vue index d0cc976..5da2ffb 100644 --- a/frontend/src/views/downloadGames/index.vue +++ b/frontend/src/views/downloadGames/index.vue @@ -1,11 +1,80 @@