|
@@ -1963,6 +1963,19 @@ export default {
|
|
|
return "";
|
|
|
}
|
|
|
},
|
|
|
+ noListTip(content = "该试卷暂无题目") {
|
|
|
+ this.hideDialog();
|
|
|
+ uni.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content,
|
|
|
+ success: (k) => {
|
|
|
+ if (k.confirm) {
|
|
|
+ this.isSubmit = true;
|
|
|
+ uni.navigateBack();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
/**
|
|
|
* 请求题目列表
|
|
|
*/
|
|
@@ -1976,17 +1989,7 @@ export default {
|
|
|
from: 2,
|
|
|
}).then(async (res) => {
|
|
|
if (res.data.code == 500) {
|
|
|
- uni.showModal({
|
|
|
- showCancel: false,
|
|
|
- content: "你已完成所有题目",
|
|
|
- success: (k) => {
|
|
|
- if (k.confirm) {
|
|
|
- this.isSubmit = true;
|
|
|
- uni.navigateBack();
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- return;
|
|
|
+ return this.noListTip('你已完成所有题目')
|
|
|
}
|
|
|
let data = res.data.data;
|
|
|
if (this.doMode == 3) {
|
|
@@ -1994,17 +1997,7 @@ export default {
|
|
|
data = data.questionList;
|
|
|
}
|
|
|
if (!data.length) {
|
|
|
- this.hideDialog();
|
|
|
- uni.showModal({
|
|
|
- showCancel: false,
|
|
|
- content: "该试卷暂无题目",
|
|
|
- success: function (k) {
|
|
|
- if (k.confirm) {
|
|
|
- uni.navigateBack();
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- return;
|
|
|
+ return this.noListTip()
|
|
|
}
|
|
|
this.allTimes = data[0].answerTime * 60;
|
|
|
this.lastTime = data[0].answerTime && data[0].answerTime * 60;
|
|
@@ -2859,7 +2852,7 @@ export default {
|
|
|
imageList: this.questionList[bankindex].ansText.imageList,
|
|
|
text: this.questionList[bankindex].ansText.text,
|
|
|
});
|
|
|
- this.$u.toast("已确认答案");
|
|
|
+ this.$u.toast("已确认答案");
|
|
|
this.isDoOver();
|
|
|
},
|
|
|
|
|
@@ -2886,7 +2879,7 @@ export default {
|
|
|
this.questionList[bankindex].jsonStr[ansindex].ansText.imageList,
|
|
|
text: this.questionList[bankindex].jsonStr[ansindex].ansText.text,
|
|
|
});
|
|
|
- this.$u.toast("已确认答案");
|
|
|
+ this.$u.toast("已确认答案");
|
|
|
this.isDoOver();
|
|
|
},
|
|
|
isCheck(item, index) {
|