待发布测试版本
This commit is contained in:
parent
bbcd5ad611
commit
cf2f362c98
Binary file not shown.
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 90 KiB |
@ -24,6 +24,7 @@ const currentId = ref(props.questionId); //当前id 0~11
|
|||||||
|
|
||||||
const questionList = ref(data); //随机打乱题库
|
const questionList = ref(data); //随机打乱题库
|
||||||
const isChecked = ref(false)
|
const isChecked = ref(false)
|
||||||
|
const checkedOption = ref('')
|
||||||
|
|
||||||
// 答题事件
|
// 答题事件
|
||||||
const answerFn = (item, event) => {
|
const answerFn = (item, event) => {
|
||||||
@ -35,6 +36,7 @@ const answerFn = (item, event) => {
|
|||||||
gsap.set('.option-tips,.analysis', { autoAlpha: 1 })
|
gsap.set('.option-tips,.analysis', { autoAlpha: 1 })
|
||||||
gsap.set('.answer-box', { pointerEvents: 'none' })
|
gsap.set('.answer-box', { pointerEvents: 'none' })
|
||||||
isChecked.value = true
|
isChecked.value = true
|
||||||
|
checkedOption.value = item.aid
|
||||||
if (item.result === 'correct') {
|
if (item.result === 'correct') {
|
||||||
gsap.set('.create-btn', { display: 'block' })
|
gsap.set('.create-btn', { display: 'block' })
|
||||||
} else {
|
} else {
|
||||||
@ -131,7 +133,8 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
<!-- 选项 -->
|
<!-- 选项 -->
|
||||||
<div class="answer-box">
|
<div class="answer-box">
|
||||||
<div class="answer" :class="isChecked ? item.result + '-bg' : ''"
|
<div class="answer"
|
||||||
|
:class="[(isChecked) ? item.result + '-bg' : '', checkedOption==item.aid ? 'checked':'no-checked']"
|
||||||
v-for="item in questionList[currentId].answer" :key="item.aid">
|
v-for="item in questionList[currentId].answer" :key="item.aid">
|
||||||
<div class="answer-text-box">
|
<div class="answer-text-box">
|
||||||
<div class="answer-text" v-for="a in item.text" :key="a">
|
<div class="answer-text" v-for="a in item.text" :key="a">
|
||||||
@ -147,7 +150,7 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
<!-- 解析 -->
|
<!-- 解析 -->
|
||||||
<div class="analysis">
|
<div class="analysis">
|
||||||
<div v-for="(li,index) in questionList[currentId].analysis" :key="li">
|
<div v-for="(li, index) in questionList[currentId].analysis" :key="li">
|
||||||
<span class="analysis-tips" v-if="index == 0">提示:</span>
|
<span class="analysis-tips" v-if="index == 0">提示:</span>
|
||||||
<span v-html="li"></span>
|
<span v-html="li"></span>
|
||||||
</div>
|
</div>
|
||||||
@ -266,7 +269,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
|
|
||||||
// 选中状态
|
// 选中状态
|
||||||
.correct-bg {
|
.checked {
|
||||||
border: 1px solid rgb(255, 238, 186) !important;
|
border: 1px solid rgb(255, 238, 186) !important;
|
||||||
background-image: linear-gradient(177deg, rgb(255, 184, 127) 0%, rgb(255, 238, 186) 100%);
|
background-image: linear-gradient(177deg, rgb(255, 184, 127) 0%, rgb(255, 238, 186) 100%);
|
||||||
background-image: -webkit-linear-gradient(177deg, rgb(255, 184, 127) 0%, rgb(255, 238, 186) 100%);
|
background-image: -webkit-linear-gradient(177deg, rgb(255, 184, 127) 0%, rgb(255, 238, 186) 100%);
|
||||||
@ -281,9 +284,14 @@ onMounted(() => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.incorrect-bg {
|
.no-checked {
|
||||||
background-image: -webkit-linear-gradient(177deg, rgb(195, 59, 22) 0%, rgb(209, 84, 51) 100%);
|
// background-image: -webkit-linear-gradient(177deg, rgb(195, 59, 22) 0%, rgb(209, 84, 51) 100%);
|
||||||
box-shadow: 0px 3px 6px 0px rgba(133, 0, 3, 0.85), inset 0px 2px 5px 0px rgba(236, 74, 42, 0.004);
|
// box-shadow: 0px 3px 6px 0px rgba(133, 0, 3, 0.85), inset 0px 2px 5px 0px rgba(236, 74, 42, 0.004);
|
||||||
|
|
||||||
|
box-shadow: 0px 3px 6px 0px rgba(133, 0, 3, 0.85),inset 0px 2px 5px 0px rgba(236, 74, 42, 0.004);
|
||||||
|
background-image: -webkit-linear-gradient( 177deg, rgb(195,59,22) 0%, rgb(209,84,51) 100%);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.answer-option {
|
.answer-option {
|
||||||
color: #ffe2ad;
|
color: #ffe2ad;
|
||||||
@ -295,6 +303,10 @@ onMounted(() => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.checked{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.answer {
|
.answer {
|
||||||
@ -302,7 +314,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 47.5px;
|
border-radius: 47.5px;
|
||||||
border: 2px solid rgb(255, 225, 172);
|
// border: 2px solid rgb(255, 225, 172);
|
||||||
// margin-bottom: 35px;
|
// margin-bottom: 35px;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -59,7 +59,7 @@ const executeTasks = async () => {
|
|||||||
{ width: 750, height: 1334 },
|
{ width: 750, height: 1334 },
|
||||||
[
|
[
|
||||||
{ name: "bg", src: posterImgList[posterId.value - 1], pos: { w: 750, h: 1334, x: 0, y: 0 } },
|
{ name: "bg", src: posterImgList[posterId.value - 1], pos: { w: 750, h: 1334, x: 0, y: 0 } },
|
||||||
{ name: "eqcode", src: eqcodePic.value, pos: { w: 164, h: 164, x: 159, y: 1122 } },
|
{ name: "eqcode", src: eqcodePic.value, pos: { w: 194, h: 194, x: 514, y: 1098 } },
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user