From f5530d4259655beb2cd99d62d2bf54296fd65fe0 Mon Sep 17 00:00:00 2001 From: panqihua <1029559041@qq.com> Date: Mon, 13 Apr 2020 04:34:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=AC=E5=91=8A=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0/=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../account/register/register.component.html | 2 +- src/app/app-routing.module.ts | 5 +- src/app/app.module.ts | 4 +- src/app/forum/forum.component.html | 83 ++++++++++++------- src/app/forum/forum.component.scss | 9 +- src/app/forum/forum.component.ts | 45 +++++++--- src/app/forum/forum.service.ts | 13 +-- src/app/forum/forum/forum.module.ts | 4 +- src/app/forum/notice/notice.component.html | 39 +++++++++ src/app/forum/notice/notice.component.scss | 0 src/app/forum/notice/notice.component.spec.ts | 25 ++++++ src/app/forum/notice/notice.component.ts | 67 +++++++++++++++ src/app/forum/notice/notice.service.spec.ts | 16 ++++ src/app/forum/notice/notice.service.ts | 53 ++++++++++++ src/app/interface/HttpInterface.ts | 6 +- src/app/interface/Notice.ts | 6 +- src/app/interface/Response.ts | 6 ++ src/app/message/message.service.ts | 7 ++ src/assets/i18n/en-US.json | 21 ++++- src/assets/i18n/zh-CN.json | 21 ++++- 20 files changed, 362 insertions(+), 70 deletions(-) create mode 100644 src/app/forum/notice/notice.component.html create mode 100644 src/app/forum/notice/notice.component.scss create mode 100644 src/app/forum/notice/notice.component.spec.ts create mode 100644 src/app/forum/notice/notice.component.ts create mode 100644 src/app/forum/notice/notice.service.spec.ts create mode 100644 src/app/forum/notice/notice.service.ts diff --git a/src/app/account/register/register.component.html b/src/app/account/register/register.component.html index 16bec4c..806d818 100644 --- a/src/app/account/register/register.component.html +++ b/src/app/account/register/register.component.html @@ -78,7 +78,7 @@ [class.is-invalid]="getValue('email').invalid"/> diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 094b299..5310f75 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -4,6 +4,7 @@ import {LoginComponent} from './account/login/login.component'; import {RegisterComponent} from './account/register/register.component'; import {ResetpwdComponent} from './account/resetpwd/resetpwd.component'; import {ForumComponent} from './forum/forum.component'; +import {NoticeComponent} from './forum/notice/notice.component'; // 路由配置 export const routes: Routes = [ @@ -13,8 +14,10 @@ export const routes: Routes = [ {path: 'register', component: RegisterComponent}, // 重置密码 {path: 'reset_pwd', component: ResetpwdComponent}, - // 论坛管理' + // 论坛管理 {path: 'forum', component: ForumComponent}, + // 公告管理 + {path: 'notice', component: NoticeComponent}, // 自动重定向到登陆 {path: '', redirectTo: 'login', pathMatch: 'full'} ]; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 4ed4df4..dc1acd0 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -20,6 +20,7 @@ import {ForumModule} from './forum/forum/forum.module'; // Http请求模块 import {HttpClient, HttpClientModule} from '@angular/common/http'; import {HtmlPipe} from './html.pipe'; +import {NoticeComponent} from './forum/notice/notice.component'; export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http); @@ -32,7 +33,8 @@ export function HttpLoaderFactory(http: HttpClient) { declarations: [ AppComponent, ErrorComponent, - HtmlPipe + HtmlPipe, + NoticeComponent ], imports: [ BrowserModule, diff --git a/src/app/forum/forum.component.html b/src/app/forum/forum.component.html index 5ddd941..c910588 100644 --- a/src/app/forum/forum.component.html +++ b/src/app/forum/forum.component.html @@ -1,47 +1,66 @@ - - -