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; }