Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { Response } from '@angular/http';
import { AppService } from '../../../../service/http.service';
import { AppGlobal } from "../../../../service/http.service";
@IonicPage()
@Component({
selector: 'page-announcementView',
templateUrl: 'announcementView.html'
})
export class AnnouncementViewPage {
notice = {
'noticeContent':''
};
noticeContent = '';
constructor(
public navCtrl: NavController,
public navParams: NavParams,
public appService: AppService
) {
let id = this.navParams.get("id");
this.getNoticeById(id);
}
//通过id获取通知公告详情
getNoticeById(id) {
this.appService.ObserverHttpGet("/wisdomgroup/modules/notice/getNoticeById", { id: id })
.subscribe((res: Response) => {
this.notice = res.json().notice;
let src = this.notice.noticeContent.split('src="');
this.noticeContent = src.join('src="'+AppGlobal.pictureNotice);
}, error => {
}
);
}
}