提交 d1f10208 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 ec820f95
...@@ -86,6 +86,16 @@ Page({ ...@@ -86,6 +86,16 @@ Page({
work_contents: json.work_contents || '', work_contents: json.work_contents || '',
group: json.questions.map(function (_, i) { group: json.questions.map(function (_, i) {
let str = '', _json = JSON.parse(_.question_options) let str = '', _json = JSON.parse(_.question_options)
/* 答过题目时 */
if (json.work_contents) {
let a = JSON.parse(json.work_contents)
for (let i = 0; i < a.length; i++) {
if (a[i].question_id == _.id) {
_json = a[i].options
break
}
}
}
_json.forEach(function (__, j) { _json.forEach(function (__, j) {
if (__.checked) { if (__.checked) {
switch(j) { switch(j) {
...@@ -102,16 +112,6 @@ Page({ ...@@ -102,16 +112,6 @@ Page({
} }
} }
}) })
/* 答过题目时 */
if (json.work_contents) {
let a = JSON.parse(json.work_contents)
for (let i = 0; i < a.length; i++) {
if (a[i].question_id == _.id) {
_json = a[i].options
break
}
}
}
return { return {
id: _.id, id: _.id,
type: _.question_type, type: _.question_type,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论