fix: 断点续答

This commit is contained in:
steven
2022-11-29 18:49:27 +08:00
parent 5144e797a1
commit 8c7182c0aa

View File

@@ -353,9 +353,9 @@ export default defineComponent({
questionsData.value.action = data.action;
callback(data.jump_to);
// 写入关联选项缓存
if (props.isAnswer) {
if (props.isAnswer && questionsData.value.survey.is_breakpoint) {
if (data.action.code === 20010) {
const questionsCache = JSON.parse(localStorage.getItem(questionsCache)) || {};
const questionsCache = JSON.parse(localStorage.getItem("questionsCache")) || {};
questionsCache[proxy.$route.query.sn] = questionsData.value.questions;
localStorage.setItem("questionsCache", JSON.stringify(questionsCache));
} else {