|
|
@@ -185,7 +185,8 @@ export default {
|
|
|
collecStatus: false,
|
|
|
isWrites: [], //已做的题目id
|
|
|
sc: false, //收藏集进来的?
|
|
|
- ct: false //错题进来的?
|
|
|
+ ct: false, //错题进来的?
|
|
|
+ simulateId: 0,
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
@@ -360,6 +361,7 @@ export default {
|
|
|
}
|
|
|
var objList = {
|
|
|
bankId: self.bankId,
|
|
|
+ isRight: -1,
|
|
|
questionId: self.nowPageData.questionId,
|
|
|
replyStr: self.replyL,
|
|
|
selectIds: self.selects
|
|
|
@@ -448,48 +450,50 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- if (option.bankSectionId) {
|
|
|
- var data = {
|
|
|
- bankSectionId: option.bankSectionId
|
|
|
- };
|
|
|
- }
|
|
|
- if (option.examId) {
|
|
|
- var data = {
|
|
|
- examId: option.examId
|
|
|
- };
|
|
|
- }
|
|
|
- if (option.bankSectionId === undefined && option.examId === undefined) {
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '没有题目',
|
|
|
- showCancel: false,
|
|
|
- confirmText: '返回上级',
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
- uni.navigateBack({
|
|
|
- delta: 1
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- self.$api.questiondetailList(data).then(res => {
|
|
|
- if (res.data.rows.length) {
|
|
|
- res.data.rows.forEach((items, indexs) => {
|
|
|
- items.jsonStr = JSON.parse(items.jsonStr);
|
|
|
- });
|
|
|
- if (res.data.rows[self.numIndex].type === 4) {
|
|
|
- self.replyL = [];
|
|
|
- for (var i = 0; i < res.data.rows[self.numIndex].jsonStr.length; i++) {
|
|
|
- self.replyL.push({ selectId: [] });
|
|
|
+ if (this.typeId === '1') {
|
|
|
+ self.$api.questionsimulate(self.bankId).then(res => {
|
|
|
+ self.simulateId = res.data.data.simulateId
|
|
|
+ if (res.data.data.list.length) {
|
|
|
+ res.data.data.list.forEach((items, indexs) => {
|
|
|
+ items.jsonStr = JSON.parse(items.jsonStr);
|
|
|
+ });
|
|
|
+ if (res.data.data.list[self.numIndex].type === 4) {
|
|
|
+ self.replyL = [];
|
|
|
+ for (var i = 0; i < res.data.data.list[self.numIndex].jsonStr.length; i++) {
|
|
|
+ self.replyL.push({ selectId: [] });
|
|
|
+ }
|
|
|
}
|
|
|
+ self.nowPageData = res.data.data.list[self.numIndex];
|
|
|
+ self.favoritesStatus(res.data.data.list[self.numIndex].questionId);
|
|
|
+ self.list = res.data.data.list;
|
|
|
+ } else {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '没有题目',
|
|
|
+ showCancel: false,
|
|
|
+ confirmText: '返回上级',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
- self.nowPageData = res.data.rows[self.numIndex];
|
|
|
- self.favoritesStatus(res.data.rows[self.numIndex].questionId);
|
|
|
- self.list = res.data.rows;
|
|
|
- } else {
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (option.bankSectionId) {
|
|
|
+ var data = {
|
|
|
+ bankSectionId: option.bankSectionId
|
|
|
+ };
|
|
|
+ }
|
|
|
+ if (option.examId) {
|
|
|
+ var data = {
|
|
|
+ examId: option.examId
|
|
|
+ };
|
|
|
+ }
|
|
|
+ if (option.bankSectionId === undefined && option.examId === undefined) {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '没有题目',
|
|
|
@@ -503,8 +507,40 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ return;
|
|
|
}
|
|
|
- });
|
|
|
+ console.log(option);
|
|
|
+ self.$api.questiondetailList(data).then(res => {
|
|
|
+ if (res.data.rows.length) {
|
|
|
+ res.data.rows.forEach((items, indexs) => {
|
|
|
+ items.jsonStr = JSON.parse(items.jsonStr);
|
|
|
+ });
|
|
|
+ if (res.data.rows[self.numIndex].type === 4) {
|
|
|
+ self.replyL = [];
|
|
|
+ for (var i = 0; i < res.data.rows[self.numIndex].jsonStr.length; i++) {
|
|
|
+ self.replyL.push({ selectId: [] });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ self.nowPageData = res.data.rows[self.numIndex];
|
|
|
+ self.favoritesStatus(res.data.rows[self.numIndex].questionId);
|
|
|
+ self.list = res.data.rows;
|
|
|
+ } else {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '没有题目',
|
|
|
+ showCancel: false,
|
|
|
+ confirmText: '返回上级',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
activeList(data, int) {
|
|
|
var self = this;
|
|
|
@@ -659,7 +695,7 @@ export default {
|
|
|
data.examId = self.examId;
|
|
|
}
|
|
|
if (self.simulateId !== null) {
|
|
|
- data.simulateId = self.bankSectionId;
|
|
|
+ data.simulateId = self.simulateId;
|
|
|
}
|
|
|
if (self.sc === 'true') {
|
|
|
var num = 0;
|
|
|
@@ -671,7 +707,9 @@ export default {
|
|
|
uni.redirectTo({
|
|
|
url: `/pages2/bank/endBG?bankId=${self.bankId}&type=${
|
|
|
self.typeId
|
|
|
- }&allIndex=${num}&correct=${correct}&error=${errorz}&errorArrayList=${errorArrays.toString()}&bankSectionId=${self.bankSectionId}&examId=${self.examId}`
|
|
|
+ }&allIndex=${num}&correct=${correct}&error=${errorz}&errorArrayList=${errorArrays.toString()}&bankSectionId=${self.bankSectionId}&examId=${
|
|
|
+ self.examId
|
|
|
+ }`
|
|
|
});
|
|
|
} else {
|
|
|
self.$api.questiondetailrecord(data).then(res => {
|
|
|
@@ -685,7 +723,9 @@ export default {
|
|
|
uni.redirectTo({
|
|
|
url: `/pages2/bank/endBG?bankId=${self.bankId}&type=${
|
|
|
self.typeId
|
|
|
- }&allIndex=${num}&correct=${correct}&error=${errorz}&errorArrayList=${errorArrays.toString()}&bankSectionId=${self.bankSectionId}&examId=${self.examId}`
|
|
|
+ }&allIndex=${num}&correct=${correct}&error=${errorz}&errorArrayList=${errorArrays.toString()}&bankSectionId=${self.bankSectionId}&examId=${
|
|
|
+ self.examId
|
|
|
+ }`
|
|
|
});
|
|
|
} else {
|
|
|
uni.showToast({
|