Просмотр исходного кода

Merge branch 'master' into dev

En route 1 год назад
Родитель
Сommit
19cd65fd3b

+ 1 - 1
pages2/bank/questionBank.vue

@@ -1170,7 +1170,7 @@
 				console.log("datas:", datas);
 				datas.forEach((item, index) => {
 					// if (typeof item.jsonStr == 'string') {
-					item.jsonStr = JSON.parse(item.jsonStr);
+					item.jsonStr = JSON.parse(item.jsonStr) || [];
 
 					if (item.type == 2) {
 						//多选

+ 1 - 1
pages2/bank/questionBankContinue.vue

@@ -1040,7 +1040,7 @@ export default {
       this.$api.examReport(this.recordId).then((res) => {
         let json = JSON.parse(res.data.data.historyExamJson);
         this.examData = res.data.data;
-        this.questionList = json;
+        this.questionList = json || [];
 		console.log(json,'json')
         this.getCollectInfo(this.current);
       });

+ 1 - 1
pages2/bank/questionBankExplain.vue

@@ -519,7 +519,7 @@ export default {
     analyseData(datas = []) {
       datas.forEach((item, index) => {
             if (typeof item.jsonStr == "string") {
-              item.jsonStr = JSON.parse(item.jsonStr);
+              item.jsonStr = JSON.parse(item.jsonStr) || [];
 
               if (item.type == 2) {
                 //多选

+ 3 - 3
pages2/bank/questionBankExplainDetail.vue

@@ -851,7 +851,7 @@ export default {
         .then((res) => {
           res.data.rows.forEach((item, index) => {
             if (typeof item.jsonStr == "string") {
-              item.jsonStr = JSON.parse(item.jsonStr);
+              item.jsonStr = JSON.parse(item.jsonStr) || [];
 
               if (item.type == 2) {
                 //多选
@@ -945,7 +945,7 @@ export default {
         .then((res) => {
           res.data.rows.forEach((item, index) => {
             if (typeof item.jsonStr == "string") {
-              item.jsonStr = JSON.parse(item.jsonStr);
+              item.jsonStr = JSON.parse(item.jsonStr) || [];
 
               if (item.type == 2) {
                 //多选
@@ -1086,7 +1086,7 @@ export default {
           .then((res) => {
             res.data.data.forEach((item, index) => {
               if (typeof item.jsonStr == "string") {
-                item.jsonStr = JSON.parse(item.jsonStr);
+                item.jsonStr = JSON.parse(item.jsonStr) || [];
 
                 if (item.type == 2) {
                   //多选

+ 1 - 1
pages2/bank/questionBankTest.vue

@@ -786,7 +786,7 @@ export default {
         .then((res) => {
           res.data.data.forEach((item, index) => {
             // if(typeof item.jsonStr == 'string') {
-            item.jsonStr = JSON.parse(item.jsonStr);
+            item.jsonStr = JSON.parse(item.jsonStr) || [];
 
             if (item.type == 2) {
               //多选

+ 1 - 1
pages2/class/questionBank.vue

@@ -1556,7 +1556,7 @@
 					}
 					data.forEach((item, index) => {
 						if (typeof item.jsonStr == "string") {
-							item.jsonStr = JSON.parse(item.jsonStr);
+							item.jsonStr = JSON.parse(item.jsonStr) || [];
 
 							if (item.type == 2) {
 								//多选

+ 1 - 1
pages2/subject/collectBank.vue

@@ -789,7 +789,7 @@ export default {
     analysteData(rows) {
       rows.forEach((item, index) => {
             if (typeof item.jsonStr == "string") {
-              item.jsonStr = JSON.parse(item.jsonStr);
+              item.jsonStr = JSON.parse(item.jsonStr) || [];
 
               if (item.type == 2) {
                 //多选

+ 1 - 1
pages2/subject/collectTypeBank.vue

@@ -740,7 +740,7 @@ export default {
         .then((res) => {
           res.data.rows.forEach((item, index) => {
             if (typeof item.jsonStr == "string") {
-              item.jsonStr = JSON.parse(item.jsonStr);
+              item.jsonStr = JSON.parse(item.jsonStr) || [];
 
               if (item.type == 2) {
                 //多选

+ 2 - 2
pages2/subject/wrongBank.vue

@@ -758,7 +758,7 @@ export default {
         .then((res) => {
           res.data.rows.forEach((item, index) => {
             if (typeof item.jsonStr == "string") {
-              item.jsonStr = JSON.parse(item.jsonStr);
+              item.jsonStr = JSON.parse(item.jsonStr) || [];
 
               if (item.type == 2) {
                 //多选
@@ -885,7 +885,7 @@ export default {
         .then((res) => {
           res.data.rows.forEach((item, index) => {
             if (typeof item.jsonStr == "string") {
-              item.jsonStr = JSON.parse(item.jsonStr);
+              item.jsonStr = JSON.parse(item.jsonStr) || [];
 
               if (item.type == 2) {
                 //多选

+ 1 - 1
pages2/subject/wrongTypeBank.vue

@@ -739,7 +739,7 @@ export default {
         .then((res) => {
           res.data.rows.forEach((item, index) => {
             if (typeof item.jsonStr == "string") {
-              item.jsonStr = JSON.parse(item.jsonStr);
+              item.jsonStr = JSON.parse(item.jsonStr) || [];
 
               if (item.type == 2) {
                 //多选

+ 1 - 1
pages5/examBank/index.vue

@@ -1087,7 +1087,7 @@
 
 					data.forEach((item, index) => {
 						// if (typeof item.jsonStr == 'string') {
-						item.jsonStr = JSON.parse(item.jsonStr);
+						item.jsonStr = JSON.parse(item.jsonStr) || [];
 
 						if (item.type == 2) {
 							//多选