|
@@ -265,19 +265,19 @@ export default {
|
|
api.exam
|
|
api.exam
|
|
.studentQuestionCollectionCollections({
|
|
.studentQuestionCollectionCollections({
|
|
km: Number(this.query.subject),
|
|
km: Number(this.query.subject),
|
|
- questionIds: uni.getStorageSync(storageName).map((item) => item),
|
|
|
|
|
|
+ cols: uni.getStorageSync(storageName).map((item) => item),
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title:"合并成功"
|
|
|
|
- })
|
|
|
|
|
|
+ title: "合并成功",
|
|
|
|
+ });
|
|
api.exam
|
|
api.exam
|
|
- .studentQuestionCollectionCollectionByUser({
|
|
|
|
|
|
+ .studentQuestionCollectionAppCollectionByUser({
|
|
km: Number(this.query.subject),
|
|
km: Number(this.query.subject),
|
|
})
|
|
})
|
|
.then((result) => {
|
|
.then((result) => {
|
|
let userCollectionIds = result.data.map((item) => {
|
|
let userCollectionIds = result.data.map((item) => {
|
|
- return item.id;
|
|
|
|
|
|
+ return item;
|
|
});
|
|
});
|
|
uni.setStorageSync(storageName, userCollectionIds);
|
|
uni.setStorageSync(storageName, userCollectionIds);
|
|
this.collectionListCount = userCollectionIds.length;
|
|
this.collectionListCount = userCollectionIds.length;
|
|
@@ -288,19 +288,19 @@ export default {
|
|
api.exam
|
|
api.exam
|
|
.studentQuestionCollectionBakCollections({
|
|
.studentQuestionCollectionBakCollections({
|
|
km: Number(this.query.subject),
|
|
km: Number(this.query.subject),
|
|
- questionIds: uni.getStorageSync(storageName).map((item) => item),
|
|
|
|
|
|
+ cols: uni.getStorageSync(storageName).map((item) => item),
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- uni.showToast({
|
|
|
|
- title:"备份成功"
|
|
|
|
- })
|
|
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: "备份成功",
|
|
|
|
+ });
|
|
api.exam
|
|
api.exam
|
|
- .studentQuestionCollectionCollectionByUser({
|
|
|
|
|
|
+ .studentQuestionCollectionAppCollectionByUser({
|
|
km: Number(this.query.subject),
|
|
km: Number(this.query.subject),
|
|
})
|
|
})
|
|
.then((result) => {
|
|
.then((result) => {
|
|
let userCollectionIds = result.data.map((item) => {
|
|
let userCollectionIds = result.data.map((item) => {
|
|
- return item.id;
|
|
|
|
|
|
+ return item;
|
|
});
|
|
});
|
|
uni.setStorageSync(storageName, userCollectionIds);
|
|
uni.setStorageSync(storageName, userCollectionIds);
|
|
this.collectionListCount = userCollectionIds.length;
|
|
this.collectionListCount = userCollectionIds.length;
|
|
@@ -309,15 +309,15 @@ export default {
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
api.exam
|
|
api.exam
|
|
- .studentQuestionCollectionCollectionByUser({
|
|
|
|
|
|
+ .studentQuestionCollectionAppCollectionByUser({
|
|
km: Number(this.query.subject),
|
|
km: Number(this.query.subject),
|
|
})
|
|
})
|
|
.then((result) => {
|
|
.then((result) => {
|
|
- uni.showToast({
|
|
|
|
- title:"恢复成功"
|
|
|
|
- })
|
|
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: "恢复成功",
|
|
|
|
+ });
|
|
let userCollectionIds = result.data.map((item) => {
|
|
let userCollectionIds = result.data.map((item) => {
|
|
- return item.id;
|
|
|
|
|
|
+ return item;
|
|
});
|
|
});
|
|
uni.setStorageSync(storageName, userCollectionIds);
|
|
uni.setStorageSync(storageName, userCollectionIds);
|
|
this.collectionListCount = userCollectionIds.length;
|
|
this.collectionListCount = userCollectionIds.length;
|
|
@@ -344,19 +344,19 @@ export default {
|
|
api.exam
|
|
api.exam
|
|
.studentQuestionWrongWrongs({
|
|
.studentQuestionWrongWrongs({
|
|
km: Number(this.query.subject),
|
|
km: Number(this.query.subject),
|
|
- questionIds: uni.getStorageSync(storageName).map((item) => item),
|
|
|
|
|
|
+ wrongs: uni.getStorageSync(storageName).map((item) => item),
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title:'合并成功'
|
|
|
|
- })
|
|
|
|
|
|
+ title: "合并成功",
|
|
|
|
+ });
|
|
api.exam
|
|
api.exam
|
|
- .studentQuestionWrongWrongByUser({
|
|
|
|
|
|
+ .studentQuestionWrongAppWrongByUser({
|
|
km: Number(this.query.subject),
|
|
km: Number(this.query.subject),
|
|
})
|
|
})
|
|
.then((result) => {
|
|
.then((result) => {
|
|
let userWrongIds = result.data.map((item) => {
|
|
let userWrongIds = result.data.map((item) => {
|
|
- return item.id;
|
|
|
|
|
|
+ return item;
|
|
});
|
|
});
|
|
uni.setStorageSync(storageName, userWrongIds);
|
|
uni.setStorageSync(storageName, userWrongIds);
|
|
this.wrongListCount = userWrongIds.length;
|
|
this.wrongListCount = userWrongIds.length;
|
|
@@ -367,19 +367,19 @@ export default {
|
|
api.exam
|
|
api.exam
|
|
.studentQuestionWrongBakWrongs({
|
|
.studentQuestionWrongBakWrongs({
|
|
km: Number(this.query.subject),
|
|
km: Number(this.query.subject),
|
|
- questionIds: uni.getStorageSync(storageName).map((item) => item),
|
|
|
|
|
|
+ wrongs: uni.getStorageSync(storageName).map((item) => item),
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- uni.showToast({
|
|
|
|
- title:'备份成功'
|
|
|
|
- })
|
|
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: "备份成功",
|
|
|
|
+ });
|
|
api.exam
|
|
api.exam
|
|
- .studentQuestionWrongWrongByUser({
|
|
|
|
|
|
+ .studentQuestionWrongAppWrongByUser({
|
|
km: Number(this.query.subject),
|
|
km: Number(this.query.subject),
|
|
})
|
|
})
|
|
.then((result) => {
|
|
.then((result) => {
|
|
let userWrongIds = result.data.map((item) => {
|
|
let userWrongIds = result.data.map((item) => {
|
|
- return item.id;
|
|
|
|
|
|
+ return item;
|
|
});
|
|
});
|
|
uni.setStorageSync(storageName, userWrongIds);
|
|
uni.setStorageSync(storageName, userWrongIds);
|
|
this.wrongListCount = userWrongIds.length;
|
|
this.wrongListCount = userWrongIds.length;
|
|
@@ -388,15 +388,15 @@ export default {
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
api.exam
|
|
api.exam
|
|
- .studentQuestionWrongWrongByUser({
|
|
|
|
|
|
+ .studentQuestionWrongAppWrongByUser({
|
|
km: Number(this.query.subject),
|
|
km: Number(this.query.subject),
|
|
})
|
|
})
|
|
.then((result) => {
|
|
.then((result) => {
|
|
- uni.showToast({
|
|
|
|
- title:'恢复成功'
|
|
|
|
- })
|
|
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: "恢复成功",
|
|
|
|
+ });
|
|
let userWrongIds = result.data.map((item) => {
|
|
let userWrongIds = result.data.map((item) => {
|
|
- return item.id;
|
|
|
|
|
|
+ return item;
|
|
});
|
|
});
|
|
uni.setStorageSync(storageName, userWrongIds);
|
|
uni.setStorageSync(storageName, userWrongIds);
|
|
this.wrongListCount = userWrongIds.length;
|
|
this.wrongListCount = userWrongIds.length;
|
|
@@ -408,7 +408,17 @@ export default {
|
|
this.wrongSyncShow = false;
|
|
this.wrongSyncShow = false;
|
|
},
|
|
},
|
|
goExercise(type) {
|
|
goExercise(type) {
|
|
|
|
+ let storageName1 =
|
|
|
|
+ uni.getStorageSync("userInfo").xcxOpenid +
|
|
|
|
+ "_userWrongIds_" +
|
|
|
|
+ this.query.subject;
|
|
|
|
+
|
|
|
|
+ let storageName2 =
|
|
|
|
+ uni.getStorageSync("userInfo").xcxOpenid +
|
|
|
|
+ "_userCollectionIds_" +
|
|
|
|
+ this.query.subject;
|
|
let query = Object.assign({}, this.query);
|
|
let query = Object.assign({}, this.query);
|
|
|
|
+ console.log(query)
|
|
if (type == "wrong" && this.wrongListCount == 0) {
|
|
if (type == "wrong" && this.wrongListCount == 0) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: "没有题目了",
|
|
title: "没有题目了",
|
|
@@ -425,11 +435,17 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
if (type == "wrong") {
|
|
if (type == "wrong") {
|
|
|
|
+ // query.questionIds =uni.getStorageSync(storageName1)? uni.getStorageSync(storageName1).map((item) => {
|
|
|
|
+ // return item.id;
|
|
|
|
+ // }).join(','):'';
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: "/otherPages/exerciseWrong/index?" + utils.mapToUrlQuery(query),
|
|
url: "/otherPages/exerciseWrong/index?" + utils.mapToUrlQuery(query),
|
|
});
|
|
});
|
|
}
|
|
}
|
|
if (type === "collect") {
|
|
if (type === "collect") {
|
|
|
|
+ // query.questionIds =uni.getStorageSync(storageName2)? uni.getStorageSync(storageName2).map((item) => {
|
|
|
|
+ // return item.id;
|
|
|
|
+ // }).join(','):'';
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url:
|
|
url:
|
|
"/otherPages/exerciseCollect/index?" + utils.mapToUrlQuery(query),
|
|
"/otherPages/exerciseCollect/index?" + utils.mapToUrlQuery(query),
|