|
@@ -1,4 +1,12 @@
|
|
|
-import { ActionSheet, Button, Image, Popup, Swipe, SwipeItem } from 'vant';
|
|
|
+import {
|
|
|
+ ActionSheet,
|
|
|
+ Button,
|
|
|
+ Image,
|
|
|
+ Popup,
|
|
|
+ Swipe,
|
|
|
+ SwipeItem,
|
|
|
+ showToast
|
|
|
+} from 'vant';
|
|
|
import {
|
|
|
computed,
|
|
|
defineComponent,
|
|
@@ -199,6 +207,13 @@ export default defineComponent({
|
|
|
try {
|
|
|
const questionList = state.questionList || [];
|
|
|
|
|
|
+ const question: any = questionList[state.currentIndex];
|
|
|
+ if (question?.userAnswer?.length <= 0) {
|
|
|
+ showToast('题目尚未做答');
|
|
|
+ state.nextStatus = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let result: any = {};
|
|
|
questionList.forEach((question: any, index: number) => {
|
|
|
// 格式化所有题目的答案
|