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
40
41
42
43
44
45
46
47
48
49
50
51
52
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {ReadLearnPage} from "../read-learn/read-learn";
import {LearnManageService} from "../learnManage.service";
import {CommonService} from "../../../../provide/common.service";
import {RankListPage} from "../rank-list/rank-list";
@IonicPage()
@Component({
selector: 'page-learn-detail',
templateUrl: 'learn-detail.html',
})
export class LearnDetailPage {
testId;
test;
constructor(public navCtrl: NavController, public navParams: NavParams,
public learnManageSer:LearnManageService,public commonSer:CommonService) {
}
ionViewDidEnter() {
this.testId = this.navParams.get('testId');
const data = {
testId:this.testId
}
this.learnManageSer.getDetail(data).subscribe(
(res)=>{
this.test = res.data;
}
)
}
//批阅试卷
gotoRead() {
if(this.test.markNumber > 0){
this.navCtrl.push('ReadLearnPage',{
testId:this.testId
})
}else{
this.commonSer.toast("当前试卷无问答题");
}
}
//查看排行榜
goToRank(){
this.navCtrl.push('RankListPage',{
testId:this.testId
})
}
}