Newer
Older
import {Component} from '@angular/core';
import {NavController, NavParams, ViewController} from "ionic-angular";
import {TabsService} from "../../pages/tabs/tabs.service";
@Component({
selector: 'reply',
templateUrl: 'reply.html'
})
export class ReplyComponent {
comment;
relpyList;
replyContent;
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
constructor(public navCtrl: NavController, public navParams: NavParams,
private tabSer: TabsService,
public viewCtrl: ViewController, public appService: AppService) {
}
ionViewDidLoad() {
this.comment = this.navParams.get('comment');
console.log(this.comment);
this.getReply();
}
getReply() {
const data = {
commentId: this.comment.id,
pageNum: 1,
pageSize: 100
};
this.tabSer.commentReplySearch(data).subscribe(
(res) => {
this.relpyList = res.data.list;
}
)
}
replyHandle() {
const data = {
commentId: this.comment.id,
content: this.replyContent,
parentId: '',
};
this.tabSer.commentReply(data).subscribe(
(res) => {
this.getReply();
}
)
}
cancel() {
}
close() {
this.viewCtrl.dismiss();
}
stop(e) {
e.stopPropagation();
}
}