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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import {Component} from '@angular/core';
import {IonicPage, LoadingController, NavController, NavParams} from 'ionic-angular';
import {AppService} from "../../../../service/http.service";
import {Storage} from "@ionic/storage";
import {Response} from "@angular/http";
@IonicPage()
@Component({
selector: 'page-survery',
templateUrl: 'survery.html',
})
export class SurveryPage {
userId;
list = [];
loading;
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService, public storage: Storage,
public loadingCtrl: LoadingController) {
}
ionViewDidLoad() {
this.loading = this.loadingCtrl.create({
content: '请稍等...',
// dismissOnPageChange: true,
enableBackdropDismiss: true
});
this.loading.present();
this.getList();
this.addRecodings();
}
ionViewDidEnter() {
this.getList();
}
//增加阅读记录
addRecodings() {
this.appService.ObserverHttpGet("/wisdomgroup/modules/question/addRecodings", null)
.subscribe((res: Response) => {
}, error => {
}
);
}
getList() {
this.storage.get("user").then((res) => {
this.appService.ObserverHttpGetAdd('/wisdomgroup/modules/question/findQuesByUserId/', res.id)
.subscribe((res) => {
if (this.loading) {
this.loading.dismiss();
}
this.list = res.json().datalist;
})
});
}
//填写问卷
geToWrite(item) {
this.navCtrl.push('SurveyWritePage', {item: item});
}
//查看问卷结果
goToResult(item) {
this.navCtrl.push('SurveyPreviewPage', {item: item});
}
}