Commit b7fef7dc authored by 罗超's avatar 罗超

1

parent bfc29922
......@@ -17,7 +17,7 @@
<swiper
class="swiper-box"
:style="{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
height: `calc(100vh - 200rpx - ${statusBarHeight}px)`,
}"
:autoplay="autoplay"
:current="current"
......@@ -41,91 +41,219 @@
@touchend="touchend"
>本阅读理解共5小题</view
>
<view class="questionView">
<view
v-for="(item2, index2) in item1.QuestionContentObj"
:key="index2"
class="item2"
>
<view class="flex questionTitle">
<view
>{{ index2 + 1 }}、({{ item2.QuestionName }},{{
item2.SubScore
}}分)</view
>
<view v-html="item2.SubTitle"></view>
</view>
<template v-if="!isOperate">
<view class="questionView">
<view
v-for="(item3, index3) in item2.SubAnwser"
:key="index3"
v-for="(item2, index2) in item1.QuestionContentObj"
:key="index2"
class="item2"
>
<!-- 单选 、判断-->
<view class="flex questionTitle">
<view style="white-space: nowrap"
>{{ index2 + 1 }}、({{
item2.QuestionName.slice(0, 2)
}})</view
>
<view v-html="item2.SubTitle" class="grow"></view>
</view>
<view
class="flex flex_start_center item3"
v-if="
item2.QuestionKey === 'single' ||
item2.QuestionKey === 'judge'
"
v-for="(item3, index3) in item2.SubAnwser"
:key="index3"
>
<!-- 单选 、判断-->
<view
class="chooseNum"
:class="{ myAnswer: item3.IsAnswer }"
@click="singerChange(item2, item3)"
>{{ item3.Name }}
class="flex flex_start_center item3"
v-if="
item2.QuestionKey === 'single' ||
item2.QuestionKey === 'judge'
"
>
<view
class="chooseNum"
:class="{ myAnswer: item3.IsAnswer }"
@click="singerChange(item2, item3)"
>{{ item3.Name }}
</view>
<view
class="chooseName"
@click="singerChange(item2, item3)"
v-html="item3.Content"
></view>
</view>
<!-- 多选 -->
<view
class="chooseName"
@click="singerChange(item2, item3)"
v-html="item3.Content"
></view>
</view>
<!-- 多选 -->
<view
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'multiple'"
>
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'multiple'"
>
<view
class="chooseNum"
:class="{ myAnswer: item3.IsAnswer }"
@click="multipleChange(item2, item3)"
>{{ item3.Name }}
</view>
<view
class="chooseName"
@click="multipleChange(item2, item3)"
v-html="item3.Content"
></view>
</view>
<!-- 填空 -->
<view
class="chooseNum"
:class="{ myAnswer: item3.IsAnswer }"
@click="multipleChange(item2, item3)"
>{{ item3.Name }}
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'fill-in'"
>
<view class="chooseNum">{{ index3 + 1 }} </view>
<input
type="text"
v-model="item3.Content"
class="chooseName chooseName2"
placeholder="请填写答案"
@input="AnswerChange(item2)"
/>
</view>
<!-- 简答 -->
<view
class="chooseName"
@click="multipleChange(item2, item3)"
v-html="item3.Content"
></view>
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'short-answer'"
>
<textarea
type="text"
v-model="item3.Content"
class="chooseName chooseName2"
placeholder="请填写答案"
@input="AnswerChange(item2)"
/>
</view>
</view>
<!-- 填空 -->
<view
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'fill-in'"
>
<view class="chooseNum">{{ index3 + 1 }} </view>
<input
type="text"
v-model="item3.Content"
class="chooseName chooseName2"
placeholder="请填写答案"
@input="AnswerChange(item2)"
/>
</view>
</view>
</template>
<template v-else>
<view class="questionView">
<view
v-for="(item2, index2) in item1.QuestionContentObj"
:key="index2"
class="item2"
>
<view class="flex questionTitle">
<view style="white-space: nowrap"
>{{ index2 + 1 }}、({{
item2.QuestionName.slice(0, 2)
}})</view
>
<view v-html="item2.SubTitle"></view>
</view>
<!-- 简答 -->
<view
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'short-answer'"
v-for="(item3, index3) in item2.SubAnwser"
:key="index3"
>
<textarea
type="text"
v-model="item3.Content"
class="chooseName chooseName2"
placeholder="请填写答案"
@input="AnswerChange(item2)"
/>
<!-- 单选 、判断-->
<view
class="flex flex_start_center item3"
v-if="
item2.QuestionKey === 'single' ||
item2.QuestionKey === 'judge'
"
>
<view
class="chooseNum"
:class="{ myAnswer: item3.IsAnswer }"
>{{ item3.Name }}
</view>
<view
class="chooseName"
:class="{ myAnswerText: item3.IsAnswer }"
v-html="item3.Content"
></view>
</view>
<!-- 多选 -->
<view
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'multiple'"
>
<view
class="chooseNum"
:class="{ myAnswer: item3.IsAnswer }"
>{{ item3.Name }}
</view>
<view
class="chooseName"
:class="{ myAnswerText: item3.IsAnswer }"
v-html="item3.Content"
></view>
</view>
<!-- 填空 -->
<view
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'fill-in'"
>
<view class="chooseNum">{{ index3 + 1 }} </view>
<!-- <input
type="text"
v-model="item3.Content"
class="chooseName chooseName2"
placeholder="请填写答案"
disabled
/> -->
<view v-html="item3.Content" class="chooseName"></view>
</view>
<!-- 简答 -->
<view
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'short-answer'"
>
<!-- <textarea
type="text"
v-model="item3.Content"
class="chooseName chooseName2"
placeholder="请填写答案"
disabled
/> -->
<view v-html="item3.Content" class="chooseName"></view>
</view>
</view>
<view class="AnswerContent" v-if="isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{
item1.QuestionAnswerList[index2].SubAnswer
}}</text
>
<text
>您的答案:
<template v-if="item2.StundetAnswer != ''">
<text
v-if="
item1.QuestionAnswerList[index2].SubAnswer ==
item1.AnswerList[index2].SubAnswer
"
class="isTrueAnswer"
>
{{ item1.AnswerList[index2].SubAnswer }}
</text>
<text v-else class="isNotAnswer"
>{{
item1.AnswerList[index2].SubAnswer
}},回答错误</text
>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
</view>
</view>
<view
style="word-wrap: break-word; margin: 0 30rpx 30rpx 30rpx"
class="AnswerContent"
>
<text style="color: #8c8a94">解析:</text>
<text style="color: #000">{{ item1.AnswerParse }}</text>
</view>
</view>
</view>
</template>
</view>
</view>
</swiper-item>
......@@ -155,6 +283,7 @@ export default {
sortTotal: Number,
isLast: Boolean,
startIndex: Number,
isOperate: Boolean,
},
setup(props, context) {
let { ctx } = getCurrentInstance();
......@@ -170,6 +299,7 @@ export default {
timer: null,
timeOutEvent: false,
statusBarHeight: 0,
isOperate: props.isOperate,
});
//判断是否是第一大题
if (data.sortIndex === 1) {
......@@ -255,20 +385,9 @@ export default {
data.timeOutEvent = false;
clearTimeout(data.timer);
},
//获取正确答案
getTrueAnswer(item) {
let AnSwer = "";
if (item && item.length > 0) {
item.forEach((x) => {
if (x.IsAnswer) {
AnSwer = x.Name;
}
});
}
return AnSwer;
},
};
onMounted(() => {
console.log(361, data.data);
if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
......@@ -346,12 +465,14 @@ export default {
width: 100%;
min-height: 500rpx !important;
max-height: 800rpx !important;
background-color: #eee;
/* background-color: #eee; */
position: absolute;
left: 0rpx;
bottom: 0rpx;
z-index: 9;
color: #000000;
transition: all 0.5;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
}
.questionView {
height: 100%;
......@@ -365,7 +486,7 @@ export default {
font-family: PingFang SC;
font-weight: bold;
color: #888888;
margin: 20rpx 0;
padding: 30rpx 0;
}
.questionTitle {
font-size: 26rpx;
......@@ -375,7 +496,7 @@ export default {
}
.item2 {
box-sizing: border-box;
margin: 30rpx 0;
margin-bottom: 60rpx;
padding: 0 30rpx;
}
......@@ -383,7 +504,9 @@ export default {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.myAnswerText {
color: #00acf9 !important;
}
.item3 {
padding-left: 25rpx;
margin: 20rpx 0;
......@@ -406,10 +529,24 @@ export default {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
.chooseName2 {
flex-grow: 1;
border-bottom: 1px solid #111;
color: #111111;
}
.isTrueAnswer {
color: green !important;
}
.isNotAnswer {
color: red !important;
}
.AnswerContent {
font-size: 30rpx;
padding: 25rpx;
background-color: #f4f4f4;
border-radius: 5px;
}
</style>
......@@ -277,6 +277,20 @@ export default {
title: "首页",
});
},
onShareAppMessage() {
return {
title: "甲小鹤",
query: "/pages/index/index",
imageUrl: "",
};
},
onShareTimeline() {
return {
title: "甲小鹤",
query: "/pages/index/index",
imageUrl: "",
};
},
};
</script>
......
......@@ -12,7 +12,6 @@ export let uploadFile = (path, file, successCallback) => {
for (let i = 0; i < file.length; i++) {
UploadSelfFile(path, file[i], successCallback)
}
}
//获取base64格式路径
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment