From ccb72e9512c07e07ccf04e41db504459f5873f3b Mon Sep 17 00:00:00 2001 From: ZHD <123456> Date: Fri, 1 May 2020 19:25:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E5=B8=96=E5=AD=90=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=8E=B7=E5=8F=96=E5=AE=8C=E6=95=B4=E6=AD=A3=E6=96=87?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/forum/forum/forum.component.html | 8 ++++---- src/app/forum/forum/forum.component.ts | 6 +++++- src/app/interface/ForumType.ts | 6 ++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/app/forum/forum/forum.component.html b/src/app/forum/forum/forum.component.html index 3acc993..3823959 100644 --- a/src/app/forum/forum/forum.component.html +++ b/src/app/forum/forum/forum.component.html @@ -136,7 +136,7 @@

{{getForum().title}}

- {{getForum().content}} + {{getContent().content}}
@@ -246,7 +246,7 @@

{{getForum().title}}

- {{getForum().content}} + {{getContent().content}}
diff --git a/src/app/forum/forum/forum.component.ts b/src/app/forum/forum/forum.component.ts index 29266bd..a46ceb1 100644 --- a/src/app/forum/forum/forum.component.ts +++ b/src/app/forum/forum/forum.component.ts @@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core'; import {Router} from '@angular/router'; import {ForumService} from '../forum.service'; import {Result} from '../../interface/Result'; -import {Active, Complaint, Forum, Score} from '../../interface/ForumType'; +import {Active, Complaint, Forum, ForumContent, Score} from '../../interface/ForumType'; import {Notice} from '../../interface/Notice'; import {MessageInterface, MessageUtil} from '../../message/message.service'; import {NoticeService} from '../notice/notice.service'; @@ -68,6 +68,10 @@ export class ForumComponent implements OnInit, MessageInterface { return this.posts.forumList.list[this.currentIndex]; } + getContent(): ForumContent { + return this.getForum().detailContent; +} + getActive(): Active { return this.getForum().activeDto; } diff --git a/src/app/interface/ForumType.ts b/src/app/interface/ForumType.ts index 16bb1c7..f59dd93 100644 --- a/src/app/interface/ForumType.ts +++ b/src/app/interface/ForumType.ts @@ -12,6 +12,10 @@ export enum ForumStatus { ok = 'ok', fail = 'fail' } +export interface ForumContent { + // 正文 + content: string; +} export interface Forum { // 帖子 @@ -36,6 +40,8 @@ export interface Forum { score: Score; // 发帖人详情信息 info: Info; + // 1楼信息 + detailContent: ForumContent; }