|
@@ -14,7 +14,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="hflex acenter">
|
|
<view class="hflex acenter">
|
|
<view class="answer">
|
|
<view class="answer">
|
|
- <u-icon name="order" color="#333333" size="22"></u-icon>
|
|
|
|
|
|
+ <u-icon name="order" color="#333333" size="22" @click="showSheet = true"></u-icon>
|
|
</view>
|
|
</view>
|
|
<u-icon v-if="examPaper.exam[index - 1].collect" name="star-fill" color="#FA6400" size="22" @click="collect"></u-icon>
|
|
<u-icon v-if="examPaper.exam[index - 1].collect" name="star-fill" color="#FA6400" size="22" @click="collect"></u-icon>
|
|
<u-icon v-else name="star" color="#333333" size="22" @click="collect"></u-icon>
|
|
<u-icon v-else name="star" color="#333333" size="22" @click="collect"></u-icon>
|
|
@@ -26,11 +26,28 @@
|
|
<view class="content">
|
|
<view class="content">
|
|
<u-parse :content="examPaper.exam[index - 1].topic"></u-parse>
|
|
<u-parse :content="examPaper.exam[index - 1].topic"></u-parse>
|
|
</view>
|
|
</view>
|
|
- <view class="options">
|
|
|
|
- <view class="hflex acenter">
|
|
|
|
- <view class="options_sele">A</view>
|
|
|
|
|
|
+ <view class="">
|
|
|
|
+ <view class="hflex acenter cell" @click="select('A')">
|
|
|
|
+ <view class="options" :class="examPaper.exam[index - 1].value.includes('A') ? 'active' : ''">A</view>
|
|
|
|
+ <view class="options_value">{{examPaper.exam[index - 1].options[0].name}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="hflex acenter cell" @click="select('B')">
|
|
|
|
+ <view class="options" :class="examPaper.exam[index - 1].value.includes('B') ? 'active' : ''">B</view>
|
|
|
|
+ <view class="options_value">{{examPaper.exam[index - 1].options[1].name}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="hflex acenter cell" @click="select('C')">
|
|
|
|
+ <view class="options" :class="examPaper.exam[index - 1].value.includes('C') ? 'active' : ''">C</view>
|
|
|
|
+ <view class="options_value">{{examPaper.exam[index - 1].options[2].name}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="hflex acenter cell" @click="select('D')">
|
|
|
|
+ <view class="options" :class="examPaper.exam[index - 1].value.includes('D') ? 'active' : ''">D</view>
|
|
|
|
+ <view class="options_value">{{examPaper.exam[index - 1].options[3].name}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="changebtn">
|
|
|
|
+ <view v-if="index === examPaper.exam.length" class="btn1" @click="showSheet = true">交卷</view>
|
|
|
|
+ <view v-else class="btn1" @click="nextExam">下一题</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<!-- 离开考试 -->
|
|
<!-- 离开考试 -->
|
|
<u-popup :show="showLeave" @close="showLeave = false" mode="center">
|
|
<u-popup :show="showLeave" @close="showLeave = false" mode="center">
|
|
@@ -43,6 +60,24 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
|
|
+ <!-- 答题卡 -->
|
|
|
|
+ <u-popup :show="showSheet" @close="showSheet = false" mode="bottom" :round="10">
|
|
|
|
+ <view class="popup_sheet vflex acenter jcenter">
|
|
|
|
+ <view class="hflex acenter jbetween" style="width: 100%;">
|
|
|
|
+ <view></view>
|
|
|
|
+ <view class="popup_title">答题卡</view>
|
|
|
|
+ <u-icon name="close" color="#333333" size="18" @click="showSheet = false"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="hflex acenter fwrap">
|
|
|
|
+ <block v-for="(item,index) in examPaper.exam" :key="index">
|
|
|
|
+ <view class="options options_item" :class="item.state ? 'active' : ''" @click="toTest(index)">{{index + 1}}</view>
|
|
|
|
+ </block>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="sheet_bottom">
|
|
|
|
+ <view class="sheet_submit" @click="submitExam">交卷</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </u-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -72,7 +107,9 @@
|
|
name: '①②③④⑤'
|
|
name: '①②③④⑤'
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- collect: false
|
|
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
},
|
|
},
|
|
{
|
|
{
|
|
id: 1,
|
|
id: 1,
|
|
@@ -92,7 +129,9 @@
|
|
name: '①②③④⑤'
|
|
name: '①②③④⑤'
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- collect: false
|
|
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
},
|
|
},
|
|
{
|
|
{
|
|
id: 1,
|
|
id: 1,
|
|
@@ -112,7 +151,119 @@
|
|
name: '①②③④⑤'
|
|
name: '①②③④⑤'
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- collect: false
|
|
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ type: '多选题',
|
|
|
|
+ topic: '西别联做约今情器日《金往需例少员传应边海般运容》意构,声今情器日速国最手决查更布。',
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ type: '单选题',
|
|
|
|
+ topic: '西别联做约今情器日《金往需例少员传应边海般运容》意构,声今情器日速国最手决查更布。',
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ type: '多选题',
|
|
|
|
+ topic: '西别联做约今情器日《金往需例少员传应边海般运容》意构,声今情器日速国最手决查更布。',
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ type: '单选题',
|
|
|
|
+ topic: '西别联做约今情器日《金往需例少员传应边海般运容》意构,声今情器日速国最手决查更布。',
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ type: '多选题',
|
|
|
|
+ topic: '西别联做约今情器日《金往需例少员传应边海般运容》意构,声今情器日速国最手决查更布。',
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
},
|
|
},
|
|
{
|
|
{
|
|
id: 1,
|
|
id: 1,
|
|
@@ -132,16 +283,86 @@
|
|
name: '①②③④⑤'
|
|
name: '①②③④⑤'
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- collect: false
|
|
|
|
- }
|
|
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ type: '多选题',
|
|
|
|
+ topic: '西别联做约今情器日《金往需例少员传应边海般运容》意构,声今情器日速国最手决查更布。',
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ type: '单选题',
|
|
|
|
+ topic: '西别联做约今情器日《金往需例少员传应边海般运容》意构,声今情器日速国最手决查更布。',
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ type: '多选题',
|
|
|
|
+ topic: '西别联做约今情器日《金往需例少员传应边海般运容》意构,声今情器日速国最手决查更布。',
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '①②③④⑤'
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ collect: false,
|
|
|
|
+ state: false,
|
|
|
|
+ value: []
|
|
|
|
+ },
|
|
]
|
|
]
|
|
},
|
|
},
|
|
index: 1,
|
|
index: 1,
|
|
- showLeave: false
|
|
|
|
|
|
+ showLeave: false,
|
|
|
|
+ values: [],
|
|
|
|
+ showSheet:false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
- console.log(this.examPaper.exam.length);
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 离开考试
|
|
// 离开考试
|
|
@@ -155,6 +376,38 @@
|
|
// 收藏题目
|
|
// 收藏题目
|
|
collect() {
|
|
collect() {
|
|
this.examPaper.exam[this.index - 1].collect = !this.examPaper.exam[this.index - 1].collect
|
|
this.examPaper.exam[this.index - 1].collect = !this.examPaper.exam[this.index - 1].collect
|
|
|
|
+ },
|
|
|
|
+ // 选择答案
|
|
|
|
+ select(val) {
|
|
|
|
+ var that = this
|
|
|
|
+ var index = that.index - 1
|
|
|
|
+ that.values.push(val)
|
|
|
|
+ var length = that.values.length - 1
|
|
|
|
+ if (that.examPaper.exam[index].type == '单选题') {
|
|
|
|
+ that.examPaper.exam[index].value = that.values[length]
|
|
|
|
+ that.examPaper.exam[index].state = true
|
|
|
|
+ } else {
|
|
|
|
+ that.examPaper.exam[index].value = that.values
|
|
|
|
+ that.examPaper.exam[index].state = true
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 答题卡
|
|
|
|
+ toTest(inx) {
|
|
|
|
+ this.index = inx + 1
|
|
|
|
+ this.showSheet = false
|
|
|
|
+ },
|
|
|
|
+ // 下一题
|
|
|
|
+ nextExam() {
|
|
|
|
+ this.values = []
|
|
|
|
+ this.index ++;
|
|
|
|
+ },
|
|
|
|
+ // 交卷
|
|
|
|
+ submitExam() {
|
|
|
|
+
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/index/exam/submit'
|
|
|
|
+ })
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -211,7 +464,44 @@
|
|
padding: 16rpx 0 60rpx;
|
|
padding: 16rpx 0 60rpx;
|
|
}
|
|
}
|
|
.options {
|
|
.options {
|
|
-
|
|
|
|
|
|
+ width: 72rpx;
|
|
|
|
+ height: 72rpx;
|
|
|
|
+ border: 1px solid #979797;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ font-size: 40rpx;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #666666;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 72rpx;
|
|
|
|
+ }
|
|
|
|
+ .options_value {
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #333333;
|
|
|
|
+ letter-spacing: 1px;
|
|
|
|
+ padding-left: 26rpx;
|
|
|
|
+ }
|
|
|
|
+ .cell {
|
|
|
|
+ padding: 20rpx;
|
|
|
|
+ }
|
|
|
|
+ .active {
|
|
|
|
+ background: #2988FE;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ }
|
|
|
|
+ .changebtn {
|
|
|
|
+ width: 100%;
|
|
|
|
+ margin-top: 144rpx;
|
|
|
|
+ }
|
|
|
|
+ .btn1 {
|
|
|
|
+ width: 690rpx;
|
|
|
|
+ height: 80rpx;
|
|
|
|
+ background: linear-gradient(135deg, #53BDFF 0%, #2988FE 100%);
|
|
|
|
+ border-radius: 40rpx;
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 80rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.popup {
|
|
.popup {
|
|
@@ -221,6 +511,13 @@
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 28rpx 32rpx;
|
|
padding: 28rpx 32rpx;
|
|
}
|
|
}
|
|
|
|
+ .popup_sheet {
|
|
|
|
+ width: 100%;
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
+ border-radius: 24px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 28rpx 32rpx;
|
|
|
|
+ }
|
|
.popup_title {
|
|
.popup_title {
|
|
font-size: 40rpx;
|
|
font-size: 40rpx;
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
@@ -230,8 +527,29 @@
|
|
font-size: 40rpx;
|
|
font-size: 40rpx;
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
color: #333333;
|
|
color: #333333;
|
|
|
|
+ box-sizing: border-box;
|
|
padding: 48rpx 68rpx;
|
|
padding: 48rpx 68rpx;
|
|
}
|
|
}
|
|
|
|
+ .options_item {
|
|
|
|
+ margin: 60rpx 66rpx 0 0;
|
|
|
|
+ }
|
|
|
|
+ .options_item:nth-child(5n) {
|
|
|
|
+ margin: 60rpx 0 0 0;
|
|
|
|
+ }
|
|
|
|
+ .sheet_bottom {
|
|
|
|
+ margin-top: 106rpx;
|
|
|
|
+ }
|
|
|
|
+ .sheet_submit {
|
|
|
|
+ width: 690rpx;
|
|
|
|
+ height: 80rpx;
|
|
|
|
+ background: linear-gradient(135deg, #53BDFF 0%, #2988FE 100%);
|
|
|
|
+ border-radius: 40rpx;
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 80rpx;
|
|
|
|
+ }
|
|
.leftBtn {
|
|
.leftBtn {
|
|
width: 256rpx;
|
|
width: 256rpx;
|
|
height: 80rpx;
|
|
height: 80rpx;
|
|
@@ -254,5 +572,6 @@
|
|
text-align: center;
|
|
text-align: center;
|
|
line-height: 80rpx;
|
|
line-height: 80rpx;
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|