From 3cd3ca7afc5d1248c99e53c42b0f813b62d32277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=B5=B7?= Date: Thu, 23 Apr 2020 17:29:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=9C=80=E8=BF=91=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index/src/app/api/api.service.ts | 13 +++++++-- .../src/app/view/update/update.component.html | 28 +++++++++++++++++-- .../src/app/view/update/update.component.less | 6 ++++ index/src/app/view/update/update.component.ts | 13 +++++++-- index/src/app/view/update/update.module.ts | 4 ++- 5 files changed, 54 insertions(+), 10 deletions(-) diff --git a/index/src/app/api/api.service.ts b/index/src/app/api/api.service.ts index 4e1a4b7..e1a2dfd 100644 --- a/index/src/app/api/api.service.ts +++ b/index/src/app/api/api.service.ts @@ -330,9 +330,16 @@ export class ApiService extends HttpService { }); } - lastestUpdateTime() { - return super.Service({ - path: '/lastestUpdateTime', + lastestUpdate() { + return super.Service<{ + lastUpdateTime: string; + lastUpdateInfo: string; + lastCommit: string; + committerAuthor: string; + committerDate: string; + commitUrl: string + }>({ + path: '/lastestUpdate', method: 'GET' }); } diff --git a/index/src/app/view/update/update.component.html b/index/src/app/view/update/update.component.html index e35dc1b..7f7f983 100644 --- a/index/src/app/view/update/update.component.html +++ b/index/src/app/view/update/update.component.html @@ -4,9 +4,31 @@
-
+

更新日志

-

最后更新于 {{lastUpdateTime}}

+

最后更新于: + {{lastUpdate.lastUpdateTime}} +

+

最后更新内容: + {{lastUpdate.lastUpdateInfo}} +

+

最后提交代码于: + {{lastUpdate.committerDate}} +

+

最后提交内容: + + {{lastUpdate.lastCommit}} + + By + + {{lastUpdate.committerAuthor}} + +

+

+ 最后构建状态       + build Status +

@@ -30,4 +52,4 @@
-
\ No newline at end of file +
diff --git a/index/src/app/view/update/update.component.less b/index/src/app/view/update/update.component.less index 7c843cc..184a26b 100644 --- a/index/src/app/view/update/update.component.less +++ b/index/src/app/view/update/update.component.less @@ -1,3 +1,9 @@ +nz-tag { + text-indent: initial; +} +.pointer{ + cursor: pointer; +} @media screen and (min-width: 768px) { .site-inner { margin: 0 19%; diff --git a/index/src/app/view/update/update.component.ts b/index/src/app/view/update/update.component.ts index 7abc490..77d8819 100644 --- a/index/src/app/view/update/update.component.ts +++ b/index/src/app/view/update/update.component.ts @@ -14,12 +14,19 @@ export class UpdateComponent implements OnInit { titleService.setTitle('小海博客 | 网站更新记录'); } - lastUpdateTime: string; + lastUpdate: { + lastUpdateTime: string; + lastUpdateInfo: string; + lastCommit: string; + committerAuthor: string; + committerDate: string; + commitUrl:string + } ; webUpdate: { id: number, info: string, time: string }[] = []; ngOnInit() { - this.apiService.lastestUpdateTime().subscribe(data => { - this.lastUpdateTime = data.result; + this.apiService.lastestUpdate().subscribe(data => { + this.lastUpdate = data.result; }); this.apiService.webUpdate().subscribe(data => { this.webUpdate = data.result.reverse(); diff --git a/index/src/app/view/update/update.module.ts b/index/src/app/view/update/update.module.ts index ba9661b..d6237f5 100644 --- a/index/src/app/view/update/update.module.ts +++ b/index/src/app/view/update/update.module.ts @@ -2,6 +2,7 @@ import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {UpdateComponent} from './update.component'; import {Route, RouterModule} from '@angular/router'; +import {NzTagModule} from "ng-zorro-antd"; const routes: Route[] = [{path: '**', component: UpdateComponent}]; @@ -9,7 +10,8 @@ const routes: Route[] = [{path: '**', component: UpdateComponent}]; declarations: [UpdateComponent], imports: [ CommonModule, - RouterModule.forChild(routes) + RouterModule.forChild(routes), + NzTagModule ] }) export class UpdateModule { -- 2.49.1