Commit a8879c24 authored by wangqinghua's avatar wangqinghua

纠错

parent ec3fe9a8
......@@ -7,7 +7,7 @@
"proxies": [
{
"path": "/wisdomgroup",
"proxyUrl": "http://180.168.156.212:2931/wisdomgroup"
"proxyUrl": "http://10.10.202.8:8080/wisdomgroup"
}
]
}
\ No newline at end of file
@import "../theme/icon.scss";
html{
font-size: 15px;
}
p {
margin: 0;
}
......
......@@ -34,6 +34,11 @@ export class LearnService{
return this.http.post(AppGlobal.domain+'/wisdomgroup/modules/learnTest/viewAnswerDetail',this.commonSer.toFormData(data));
}
//纠错
questionCorrecting(data): Observable<any>{
return this.http.post(AppGlobal.domain+'/wisdomgroup/learntest/questionCorrecting/submit',data);
}
//top5
getTop5(data): Observable<any>{
return this.http.get(AppGlobal.domain+'/wisdomgroup/modules/learnPcTest/top/' + data);
......
......@@ -67,8 +67,7 @@ export class LearningDoPage {
//清楚定时器
ionViewDidLeave() {
this.nav.swipeBackEnabled = true;
this.index = 1;
this.index = 0;
this.slides.slideTo(0);
window.clearInterval(this.clock);
}
......@@ -160,10 +159,20 @@ export class LearningDoPage {
//纠错
sure(){
this.error = false;
console.log(this.list[this.index]);
console.log(this.errorContent);
// this.errorContent = "";
const data = {
questionId:this.list[this.index].questionId,
questionType:this.list[this.index].questionType,
content:this.errorContent
};
this.commonSer.log(data);
this.learnSer.questionCorrecting(data).subscribe(
(res)=>{
this.commonSer.toast("提交成功!")
this.error = false;
this.errorContent = "";
}
)
}
cancel(){
......
......@@ -40,14 +40,15 @@
</div>
<div class="content-button padding-15-0 fontSize-15">
<span>排名:</span>
<span class="color-red">1</span>
<span *ngIf="!item?.ranking"></span>
<span class="color-red">{{item.ranking}}</span>
<span (click)="goToRank(item)" float-right class="look">排行榜</span>
</div>
<div class="content-button padding-15-0 fontSize-15">
<span>重复测试:</span>
<span *ngIf="item.isRepeat == 1">允许</span>
<span *ngIf="item.isRepeat == 0">不允许</span>
<span float-right >最高分:100</span>
<span float-right *ngIf="item?.maxNum" >最高分:{{item.maxNum}}</span>
</div>
</div>
</ion-item>
......@@ -82,14 +83,14 @@
</div>
<div class="content-button padding-15-0 fontSize-15">
<span>排名:</span>
<span class="color-red">1</span>
<span class="color-red">{{item.ranking}}</span>
<span (click)="goToRank(item)" float-right class="look">排行榜</span>
</div>
<div class="content-button padding-15-0 fontSize-15">
<span>重复测试:</span>
<span *ngIf="item.isRepeat == 1">允许</span>
<span *ngIf="item.isRepeat == 0">不允许</span>
<span float-right >最高分:100</span>
<span float-right >最高分:{{item.maxNum}}</span>
</div>
</div>
</ion-item>
......@@ -125,14 +126,14 @@
</div>
<div class="content-button padding-15-0 fontSize-15">
<span>排名:</span>
<span class="color-red">1</span>
<span class="color-red">{{item.ranking}}</span>
<span (click)="goToRank(item)" float-right class="look">排行榜</span>
</div>
<div class="content-button padding-15-0 fontSize-15">
<span>重复测试:</span>
<span *ngIf="item.isRepeat == 1">允许</span>
<span *ngIf="item.isRepeat == 0">不允许</span>
<span float-right >最高分:100</span>
<span float-right >最高分:{{item.maxNum}}</span>
</div>
</div>
</ion-item>
......
......@@ -21,7 +21,6 @@ page-learning-list {
padding: 3px 10px;
font-size: 1.5rem;
border-radius: 2px;
margin-right: 10px;
}
.join{
background-color: #34b4fc;
......@@ -29,6 +28,5 @@ page-learning-list {
padding: 3px 10px;
font-size: 1.5rem;
border-radius: 2px;
margin-right: 10px;
}
}
......@@ -91,6 +91,9 @@
</div>
</ion-slide>
</ion-slides>
<div class=" button-error">
<button (click)="error = true;" class="submit-error">我要纠错</button>
</div>
</div>
<div class="footer-subject">
<div (click)="prev()" class="prev">上一题</div>
......
......@@ -13,6 +13,9 @@ page-review-learn {
.swiper-slide, .slide-zoom {
text-align: left;
}
ion-slides{
height: calc(100% - 4rem);
}
.swiper-slide {
justify-content: normal;
align-items: normal;
......
......@@ -3,6 +3,7 @@ import {IonicPage, NavController, NavParams, Slides, ToastController} from 'ioni
import {AppService} from "../../../../service/appHttpService";
import {message} from "../../../../app/main";
import {LearnService} from "../learn.service";
import {CommonService} from "../../../../service/common.service";
@IonicPage()
......@@ -20,7 +21,7 @@ export class ReviewLearnPage {
error;
errorContent;
constructor(public navCtrl: NavController, public navParams: NavParams,public learnSer:LearnService,
public toastCtrl:ToastController,public appService:AppService) {
public toastCtrl:ToastController,public appService:AppService,public commonSer:CommonService) {
}
ionViewDidLoad() {
......@@ -103,10 +104,18 @@ export class ReviewLearnPage {
//纠错
sure(){
this.error = false;
console.log(this.list[this.index]);
console.log(this.errorContent);
// this.errorContent = "";
const data = {
questionId:this.list[this.index].questionId,
questionType:this.list[this.index].questionType,
content:this.errorContent
};
this.commonSer.log(data);
this.learnSer.questionCorrecting(data).subscribe(
(res)=>{
this.commonSer.toast("提交成功!");
this.error = false;
}
)
}
cancel(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment