Commit 9a07b125 authored by 罗超's avatar 罗超

parent dbe2402e
......@@ -8,32 +8,32 @@
.box{
width: 100%;
box-sizing: border-box;
padding: 0 20px;
padding: 0 40rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.dc{
font-size: 26px;
font-size: 60rpx;
color: #111111;
font-weight: bold;
margin-top: 160rpx;
}
.dclx{
padding:4px 6px ;
border-radius: 3px;
padding:4rpx 6rpx ;
border-radius: 3rpx;
background: #E8E9EA;
font-size: 14px;
font-size: 28rpx;
color: #666666;
margin-top: 18px;
margin-top: 36rpx;
word-wrap: break-word;
}
.dclx2{
font-size: 16px;
font-size: 32rpx;
font-weight: 500;
color: #111111;
margin-top: 30px;
margin-top: 60rpx;
}
.btn{
width: 100%;
......@@ -42,7 +42,7 @@
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-size: 32rpx;
color: #4C50E7;
margin-top: 160rpx;
background: #E4E5FB;
......@@ -56,7 +56,7 @@
}
.sign{
position: absolute;
right: 33px;
right: 66rpx;
top: 36rpx;
}
.error{
......@@ -65,6 +65,7 @@
}
.row{
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
......@@ -72,13 +73,13 @@
<template>
<view class="fillInTheBlanks">
<view class="box">
<view class="dc row" >
<text>火曜日</text>
<mypone maxlength="2" v-model="test" style="display: inline-block;"></mypone>
<text>日sa</text>
<view style="font-size:26rpx;width:100%">{{item.Title}}</view>
<mypone :maxlength="getNum(item)" v-model="test" style="display: inline-block;"></mypone>
</view>
<view class="dclx">名词</view>
<view class="dclx2">今天是星期二</view>
<view class="dclx">{{item.WordType}}</view>
<view class="dclx2">{{item.ChineseMean}}</view>
<view class="btn" v-if="type==0" @click="getjieguo">确定</view>
<view class="btn correct" v-if="type==1">正确
<view class="sign" >
......@@ -104,13 +105,31 @@
components: {
mypone
},
props:{
item:{
type:Object,
default:()=>{
return{}
}
}
},
setup(props,{attrs,slots,emit}) {
let data = reactive({
test:'',
type:0,//1是正确 2是错误
})
let methods = {
getNum(item){
const answer=item.Answer
const index =answer.indexOf("(")
if(index>-1){
return index+1
}else{
return answer.length
}
},
getjieguo(){
console.log(130,data.test)
if(data.test==''){
uni.showToast({
title:'请输入',
......@@ -126,8 +145,7 @@
}
}
onMounted(()=>{
console.log(137,props.item)
})
let that = methods;
return {
......
......@@ -89,6 +89,8 @@
color: #fff;
background-color: #4C50E7;
margin: auto;
font-size: 28rpx;
font-weight: 500;
}
.study_GoLearn {
......@@ -100,11 +102,15 @@
color: #4C50E7;
background-color: #E4E5FB;
margin: 36rpx auto;
font-size: 28rpx;
font-weight: 500;
}
.studyBack {
color: #BBBCCE;
margin-top: 60rpx;
font-size: 28rpx;
font-weight: 500;
}
.study_Piao {
......
<template>
<view class="wordTest">
<swiper class="swiper" >
<swiper-item v-for="(item,index) in reviewGroupList" :key="index" class="swiper-item">
<Choice v-if="item.QuestionTypeId==1"></Choice>
<!-- <Explain v-if="item.QuestionTypeId==3"></Explain> -->
<FillIn v-if="item.QuestionTypeId==3" :item="item"></FillIn>
</swiper-item>
<swiper-item v-for="(item,index) in prepGroupList" :key="index" class="swiper-item">
</swiper-item>
<swiper-item></swiper-item>
</swiper>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
getCurrentInstance,
onMounted,
} from "vue";
import Choice from '../../components/word/choiceQuestion.vue'
import Explain from '../../components/word/explain.vue'
import FillIn from '../../components/word/fillInTheBlanks.vue'
export default {
components: {
Choice,
Explain,
FillIn
},
setup(props) {
let {
proxy
} = getCurrentInstance();
let data = reactive({
msg: {
CourseId: 0,
ChapterId: 0,
NextChapterId: 0
},
reviewGroupList: [],
prepGroupList: [],
})
let methods = {
getList() {
proxy.$request('/AppletWords/CreateCourseExam', data.msg).then(res => {
data.reviewGroupList=res.Data.reviewGroupList
data.prepGroupList=res.Data.prepGroupList
})
}
}
onMounted(() => {
})
let that = methods;
return {
...toRefs(data),
...methods,
};
},
onLoad(options) {
uni.setNavigationBarTitle({
title: '单词测试'
});
const userInfo = uni.getStorageSync('userinfo');
this.msg.CourseId=options.CourseId
this.msg.ChapterId=options.ChapterId
this.msg.NextChapterId=options.NextChapterId
this.getList()
},
}
</script>
<style scoped>
.wordTest {
min-height: 100vh;
background-color: #F5F5F5;
}
.wordTest .swiper {
min-height: 100vh;
background-color: #F5F5F5;
}
</style>
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