From 6f41b07f7193187cfc733c7d4478eca56d882980 Mon Sep 17 00:00:00 2001 From: oddfar Date: Thu, 12 Oct 2023 14:29:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E9=A6=96=E9=A1=B5=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/SysIndexController.java | 35 +++++++++++++++++++ .../src/main/resources/application.yml | 1 + pom.xml | 5 +-- vue_campus_admin/src/api/system/index.js | 9 +++++ vue_campus_admin/src/views/index.vue | 28 +++++++++++---- 5 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 campus-admin/src/main/java/com/oddfar/campus/admin/controller/system/SysIndexController.java create mode 100644 vue_campus_admin/src/api/system/index.js diff --git a/campus-admin/src/main/java/com/oddfar/campus/admin/controller/system/SysIndexController.java b/campus-admin/src/main/java/com/oddfar/campus/admin/controller/system/SysIndexController.java new file mode 100644 index 0000000..ce524db --- /dev/null +++ b/campus-admin/src/main/java/com/oddfar/campus/admin/controller/system/SysIndexController.java @@ -0,0 +1,35 @@ +package com.oddfar.campus.admin.controller.system; + +import com.oddfar.campus.common.domain.R; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; + + +/** + * 首页 + */ +@RestController +public class SysIndexController { + + @Value("${campus.version}") + private String version; + + @Value("${campus.frameworkVersion}") + private String frameworkVersion; + + /** + * 版本情况 + */ + @RequestMapping("/version") + public R version() { + HashMap map = new HashMap<>(); + map.put("version", version); + map.put("frameworkVersion", frameworkVersion); + return R.ok(map); + } + + +} diff --git a/campus-modular/src/main/resources/application.yml b/campus-modular/src/main/resources/application.yml index 3f8402e..1cb8028 100644 --- a/campus-modular/src/main/resources/application.yml +++ b/campus-modular/src/main/resources/application.yml @@ -4,6 +4,7 @@ campus: name: campus-imaotai # 版本 version: ${revision} + frameworkVersion: ${campus.revision} server: port: 8160 diff --git a/pom.xml b/pom.xml index 80b7ba3..09c3ac1 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ campus http://campus.oddfar.com - 校园信息墙 + i茅台自动预约 campus-common @@ -21,7 +21,8 @@ - 1.0.8 + 1.0.9 + 1.1.6 UTF-8 1.8 1.21 diff --git a/vue_campus_admin/src/api/system/index.js b/vue_campus_admin/src/api/system/index.js new file mode 100644 index 0000000..540c80b --- /dev/null +++ b/vue_campus_admin/src/api/system/index.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +// 版本情况 +export function getVersion() { + return request({ + url: '/version', + method: 'get', + }) +} diff --git a/vue_campus_admin/src/views/index.vue b/vue_campus_admin/src/views/index.vue index 6711873..a1d5ac4 100644 --- a/vue_campus_admin/src/views/index.vue +++ b/vue_campus_admin/src/views/index.vue @@ -1,7 +1,5 @@ @@ -39,12 +53,14 @@ export default { font-size: 17.5px; border-left: 5px solid #eee; } + hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eee; } + .col-item { margin-bottom: 20px; }