|
@@ -81,11 +81,11 @@
|
|
|
<view class="pad_8 answer">
|
|
|
<view>
|
|
|
正确答案:
|
|
|
- <text v-for="ansItem in bank.ans">{{ ast[ansItem - 1] }}</text>
|
|
|
+ <text v-for="(ansItem,ansIndex) in bank.ans" :key="ansIndex">{{ ast[ansItem - 1] }}</text>
|
|
|
</view>
|
|
|
<view>
|
|
|
我的答案:
|
|
|
- <text v-for="quesItem in bank.ques">{{ ast[quesItem - 1] }}</text>
|
|
|
+ <text v-for="(quesItem,quesIndex) in bank.ques" :key="quesIndex">{{ ast[quesItem - 1] }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="pad_8 answerInfos">
|
|
@@ -137,7 +137,7 @@
|
|
|
</view>
|
|
|
<view class="textarea"><textarea v-model="bank.ansText.text" placeholder="在此输入答案"></textarea></view>
|
|
|
<view class="imgs">
|
|
|
- <view class="img" v-for="(img, imgIndex) in bank.ansText.imageList">
|
|
|
+ <view class="img" v-for="(img, imgIndex) in bank.ansText.imageList" :key="imgIndex">
|
|
|
<text @click="deleteImg(imgIndex, bankIndex)">x</text>
|
|
|
<image :src="$method.splitImgHost(img, true)"></image>
|
|
|
</view>
|
|
@@ -146,7 +146,7 @@
|
|
|
<view class="ans_submit answerInfos" v-if="bank.ques">
|
|
|
<view class="answerTitle">我的答案:</view>
|
|
|
{{ bank.ques.text }}
|
|
|
- <view class="imgs"><image class="img" v-for="ques in bank.ques.imageList" :src="$method.splitImgHost(ques, true)"></image></view>
|
|
|
+ <view class="imgs"><image class="img" :key="quesIndex" v-for="(ques,quesIndex) in bank.ques.imageList" :src="$method.splitImgHost(ques, true)"></image></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-if="bank.ques">
|
|
@@ -187,7 +187,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-if="bank.ques[ansIndex]">
|
|
|
- <view v-for="(option, childIndex) in ansItem.optionsList" :key="index" class="lisSty">
|
|
|
+ <view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
|
|
|
<text
|
|
|
:class="{
|
|
|
right: option.optionsId == bank.ques[ansIndex] || option.optionsId == bank.ans[ansIndex],
|
|
@@ -237,11 +237,11 @@
|
|
|
<view class="pad_8 answer">
|
|
|
<view>
|
|
|
正确答案:
|
|
|
- <text v-for="ansItem1 in bank.ans[ansIndex]">{{ ast[ansItem1 - 1] }}</text>
|
|
|
+ <text :key="ansItemIndex1" v-for="(ansItem1,ansItemIndex1) in bank.ans[ansIndex]">{{ ast[ansItem1 - 1] }}</text>
|
|
|
</view>
|
|
|
<view>
|
|
|
我的答案:
|
|
|
- <text v-for="quesItem in bank.ques[ansIndex]">{{ ast[quesItem - 1] }}</text>
|
|
|
+ <text :key="quesItemIndex" v-for="(quesItem,quesItemIndex) in bank.ques[ansIndex]">{{ ast[quesItem - 1] }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="pad_8 answerInfos">
|
|
@@ -295,7 +295,7 @@
|
|
|
</view>
|
|
|
<view class="textarea"><textarea v-model="ansItem.ansText.text" placeholder="在此输入答案"></textarea></view>
|
|
|
<view class="imgs">
|
|
|
- <view class="img" v-for="(img, imgIndex) in ansItem.ansText.imageList">
|
|
|
+ <view class="img" v-for="(img, imgIndex) in ansItem.ansText.imageList" :key="imgIndex">
|
|
|
<text @click="deleteImgChild(imgIndex, bankIndex, ansIndex)">x</text>
|
|
|
<image :src="$method.splitImgHost(img, true)"></image>
|
|
|
</view>
|
|
@@ -305,7 +305,7 @@
|
|
|
<view class="answerTitle">答案我的</view>
|
|
|
{{ bank.ques[ansIndex].text }}
|
|
|
<view class="imgs">
|
|
|
- <image class="img" v-for="ques in bank.ques[ansIndex].imageList" :src="$method.splitImgHost(ques, true)"></image>
|
|
|
+ <image class="img" v-for="(ques,quesIndex) in bank.ques[ansIndex].imageList" :key="quesIndex" :src="$method.splitImgHost(ques, true)"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -481,6 +481,15 @@ export default {
|
|
|
this.isFromVideo = option.isFromVideo||'';
|
|
|
this.gradeId = option.gradeId || '';
|
|
|
let isBack = option.isback;
|
|
|
+
|
|
|
+ let showDialog = uni.getStorageSync('showDialog');
|
|
|
+
|
|
|
+ if(showDialog) {
|
|
|
+ this.showDialog = false;
|
|
|
+ } else {
|
|
|
+ this.showDialog = true;
|
|
|
+ uni.setStorageSync('showDialog','1');
|
|
|
+ }
|
|
|
|
|
|
if (isBack) {
|
|
|
console.log(getApp());
|
|
@@ -490,6 +499,23 @@ export default {
|
|
|
for (var k in globalData.bankData) {
|
|
|
this[k] = globalData.bankData[k];
|
|
|
}
|
|
|
+
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ if (this.lastTime <= 0) {
|
|
|
+ clearInterval(this.timer);
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:'考试时间到,自动交卷',
|
|
|
+ duration:1000
|
|
|
+ })
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.submit();
|
|
|
+ }, 1000);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.lastTime--;
|
|
|
+ }, 1000);
|
|
|
} else {
|
|
|
this.goodsQuestionList();
|
|
|
this.bankExam();
|
|
@@ -504,6 +530,7 @@ export default {
|
|
|
if (this.needBack) {
|
|
|
let app = getApp();
|
|
|
app.globalData.bankData = this.$data;
|
|
|
+ clearInterval(this.timer);
|
|
|
uni.navigateTo({
|
|
|
url: '/pages2/bank/questionBank?id=' + this.id + '&goodsid=' + this.goodsId + '&isback=true'
|
|
|
});
|
|
@@ -643,6 +670,7 @@ export default {
|
|
|
*/
|
|
|
leaveNow() {
|
|
|
this.needBack = false;
|
|
|
+ this.isSubmit = true;
|
|
|
uni.navigateBack({
|
|
|
delta: 1
|
|
|
});
|
|
@@ -778,6 +806,8 @@ export default {
|
|
|
recordId: this.recordId,
|
|
|
rightQuestionNum: number,
|
|
|
status: 1,
|
|
|
+ moduleExamId:this.moduleId || 0,
|
|
|
+ chapterExamId:this.chapterId || 0,
|
|
|
doQuestionIds:doQuestionIds.join(','),
|
|
|
rightQuestionIds:rightQuestionIds.join(','),
|
|
|
doQuestionNum: doQuestionNum,
|
|
@@ -796,6 +826,8 @@ export default {
|
|
|
|
|
|
//错题集id提交(客观题)
|
|
|
this.$api.examWrongRecord({
|
|
|
+ moduleExamId:this.moduleId || 0,
|
|
|
+ chapterExamId:this.chapterId || 0,
|
|
|
examId: this.id,
|
|
|
goodsId: this.goodsId,
|
|
|
questionIds: doWrongQuestionIds,
|
|
@@ -911,6 +943,8 @@ export default {
|
|
|
goodsId: this.goodsId,
|
|
|
recordId: this.recordId,
|
|
|
rightQuestionNum: number,
|
|
|
+ moduleExamId:this.moduleId || 0,
|
|
|
+ chapterExamId:this.chapterId || 0,
|
|
|
status: 0,
|
|
|
doQuestionNum: doQuestionNum,
|
|
|
historyExamJson: JSON.stringify(this.questionList)
|
|
@@ -1009,15 +1043,15 @@ export default {
|
|
|
this.timer = setInterval(() => {
|
|
|
if (this.lastTime <= 0) {
|
|
|
clearInterval(this.timer);
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '考试时间到,自动交卷',
|
|
|
- confirmText: '确定',
|
|
|
- showCancel: false,
|
|
|
- success: res => {
|
|
|
- this.submit();
|
|
|
- }
|
|
|
- });
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:'考试时间到,自动交卷',
|
|
|
+ duration:1000
|
|
|
+ })
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.submit();
|
|
|
+ }, 1000);
|
|
|
return;
|
|
|
}
|
|
|
this.lastTime--;
|
|
@@ -1104,6 +1138,8 @@ export default {
|
|
|
.examWrongRecord({
|
|
|
examId: this.id,
|
|
|
goodsId: this.goodsId,
|
|
|
+ moduleExamId:this.moduleId || 0,
|
|
|
+ chapterExamId:this.chapterId || 0,
|
|
|
questionIds: [this.questionList[bindex].questionId],
|
|
|
recordId: this.recordId
|
|
|
})
|
|
@@ -1166,6 +1202,8 @@ export default {
|
|
|
.examWrongRecord({
|
|
|
examId: this.id,
|
|
|
goodsId: this.goodsId,
|
|
|
+ moduleExamId:this.moduleId || 0,
|
|
|
+ chapterExamId:this.chapterId || 0,
|
|
|
questionIds: [this.questionList[bindex].questionId],
|
|
|
recordId: this.recordId
|
|
|
})
|
|
@@ -1212,6 +1250,8 @@ export default {
|
|
|
.examWrongRecord({
|
|
|
examId: this.id,
|
|
|
goodsId: this.goodsId,
|
|
|
+ moduleExamId:this.moduleId || 0,
|
|
|
+ chapterExamId:this.chapterId || 0,
|
|
|
questionIds:[this.questionList[bindex].questionId],
|
|
|
recordId: this.recordId
|
|
|
})
|
|
@@ -1422,6 +1462,8 @@ export default {
|
|
|
recordId: this.recordId,
|
|
|
rightQuestionNum: number,
|
|
|
status: 1,
|
|
|
+ moduleExamId:this.moduleId || 0,
|
|
|
+ chapterExamId:this.chapterId || 0,
|
|
|
doQuestionIds:doQuestionIds.join(','),
|
|
|
rightQuestionIds:rightQuestionIds.join(','),
|
|
|
doQuestionNum: doQuestionNum,
|