|
@@ -11,6 +11,16 @@
|
|
<text class="option-change" @click="onSelect(index)">{{item.number}}</text>
|
|
<text class="option-change" @click="onSelect(index)">{{item.number}}</text>
|
|
<rich-text :nodes="item.label" class="option-question"></rich-text>
|
|
<rich-text :nodes="item.label" class="option-question"></rich-text>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
|
|
+ <view class="phone-question-answer-box">
|
|
|
|
+ <view class="phone-line-title">答案解析</view>
|
|
|
|
+ <view class="btdf-row">本题得分:<text>{{data.score}}</text>分</view>
|
|
|
|
+ <view class="zqda-row">正确答案:<text>{{data.result}}</text></view>
|
|
|
|
+ <view class="ndda-row">您的答案:<text>{{data.reply}}</text></view>
|
|
|
|
+ <view class="dajx-row">答案解析:
|
|
|
|
+ <rich-text :nodes="data.answer"></rich-text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -39,6 +49,10 @@
|
|
|
|
|
|
const data = reactive({
|
|
const data = reactive({
|
|
name: '', //题干数据
|
|
name: '', //题干数据
|
|
|
|
+ score: '',
|
|
|
|
+ result: '',
|
|
|
|
+ reply: '',
|
|
|
|
+ answer: '',
|
|
contents: [], // 选项数据
|
|
contents: [], // 选项数据
|
|
})
|
|
})
|
|
|
|
|
|
@@ -66,13 +80,27 @@
|
|
|
|
|
|
function formatData(val) {
|
|
function formatData(val) {
|
|
if (val) {
|
|
if (val) {
|
|
|
|
+ console.log('val',val);
|
|
data.name = val.name;
|
|
data.name = val.name;
|
|
|
|
+ data.answer = val.answer;
|
|
|
|
+ data.score = val.score;
|
|
|
|
+ if (val.reply && val.reply.trim() !== '') {
|
|
|
|
+ data.reply = getLetterByIndex(val.reply) ;
|
|
|
|
+ } else {
|
|
|
|
+ reply = '未答'
|
|
|
|
+ }
|
|
|
|
+ if (val.result) {
|
|
|
|
+ data.result = getLetterByIndex(val.result);
|
|
|
|
+ } else {
|
|
|
|
+ result = '无答案'
|
|
|
|
+ }
|
|
data.contents = val.content.map((item, index) => {
|
|
data.contents = val.content.map((item, index) => {
|
|
return {
|
|
return {
|
|
label: item,
|
|
label: item,
|
|
number: getLetterByIndex(index)
|
|
number: getLetterByIndex(index)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ console.log('data.contents',data.contents);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|