Commit 61126524 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/xiangwei/educationstu into master

# Conflicts:
#	src/pages/word/test.vue
parents 8b0a53f0 6c4dc420
<template> <template>
<view class="wordTest"> <view class="wordTest">
<button class=""> <button class="" @click="submitWordsTest">
交卷 交卷
</button> </button>
<swiper class="swiper" @change="changeSwiper" :current="curTest"> <swiper class="swiper" @change="changeSwiper" :current="curTest">
<swiper-item v-for="(item,index) in reviewGroupList" :key="index" class="swiper-item"> <swiper-item
<Choice v-if="item.QuestionTypeId==1" :item="item" @next="next($event,item)"></Choice> v-for="(item, index) in reviewGroupList"
<FillIn v-if="item.QuestionTypeId==3" :item="item" @next="next($event,item)"></FillIn> :key="index"
</swiper-item> class="swiper-item"
<swiper-item v-for="(item,index) in prepGroupList" :key="index" class="swiper-item"> >
<Choice v-if="item.QuestionTypeId==1" :item="item" @next="next($event,item)"></Choice> <Choice
<FillIn v-if="item.QuestionTypeId==3" :item="item" @next="next($event,item)"></FillIn> v-if="item.QuestionTypeId == 1"
</swiper-item> :item="item"
<swiper-item></swiper-item> @next="next($event, item)"
</swiper> ></Choice>
</view> <FillIn
v-if="item.QuestionTypeId == 3"
:item="item"
@next="next($event, item)"
></FillIn>
</swiper-item>
<swiper-item
v-for="(item, index) in prepGroupList"
:key="index"
class="swiper-item"
>
<Choice
v-if="item.QuestionTypeId == 1"
:item="item"
@next="next($event, item)"
></Choice>
<FillIn
v-if="item.QuestionTypeId == 3"
:item="item"
@next="next($event, item)"
></FillIn>
</swiper-item>
<swiper-item></swiper-item>
</swiper>
</view>
</template> </template>
<script> <script>
import { import { ref, reactive, toRefs, getCurrentInstance, onMounted } from "vue";
ref, import Choice from "../../components/word/choiceQuestion.vue";
reactive, import FillIn from "../../components/word/fillInTheBlanks.vue";
toRefs, export default {
getCurrentInstance, components: {
onMounted, Choice,
} from "vue"; FillIn,
import Choice from '../../components/word/choiceQuestion.vue' },
import FillIn from '../../components/word/fillInTheBlanks.vue' setup(props) {
export default { let { proxy } = getCurrentInstance();
components: { let data = reactive({
Choice, msg: {
FillIn CourseId: 0,
}, ChapterId: 0,
setup(props) { NextChapterId: 0,
let { },
proxy curTest: 0,
} = getCurrentInstance(); reviewGroupList: [],
let data = reactive({ prepGroupList: [],
msg: { });
CourseId: 0, let methods = {
ChapterId: 0, getList() {
NextChapterId: 0 proxy
}, .$request("/AppletWords/CreateCourseExam", data.msg)
curTest:0, .then((res) => {
reviewGroupList: [], data.reviewGroupList = res.Data.reviewGroupList;
prepGroupList: [], data.prepGroupList = res.Data.prepGroupList;
}) });
let methods = { },
getList() { changeSwiper(val) {
proxy.$request('/AppletWords/CreateCourseExam', data.msg).then(res => { data.curTest = val.detail.current;
data.reviewGroupList=res.Data.reviewGroupList },
data.prepGroupList=res.Data.prepGroupList next(val, item) {
}) if (val) {
}, item.IsTrue = val;
changeSwiper(val){ }
data.curTest=val.detail.current data.curTest += 1;
}, },
next(val,item){ //提交单词测试
if(val){ submitWordsTest() {
item.IsTrue=val var postMsg = {
} ClassId: 1,
data.curTest+=1 CourseId: 1,
} ChapterId: 1,
} ExamStartTime: "2021-01-12 10:00:00",
onMounted(() => { Details: data.reviewGroupList,
};
}) proxy.$request("/AppletWords/SubmitWordsExam", postMsg).then((res) => {
let that = methods; console.log("SubmitWordsExam", res);
return { });
...toRefs(data), },
...methods, };
}; onMounted(() => {});
}, let that = methods;
onLoad(options) { return {
uni.setNavigationBarTitle({ ...toRefs(data),
title: '单词测试' ...methods,
}); };
const userInfo = uni.getStorageSync('userinfo'); },
this.msg.CourseId=options.CourseId onLoad(options) {
this.msg.ChapterId=options.ChapterId uni.setNavigationBarTitle({
this.msg.NextChapterId=options.NextChapterId title: "单词测试",
this.getList() });
}, const userInfo = uni.getStorageSync("userinfo");
} this.msg.CourseId = options.CourseId;
this.msg.ChapterId = options.ChapterId;
this.msg.NextChapterId = options.NextChapterId;
this.getList();
},
};
</script> </script>
<style scoped> <style scoped>
.wordTest { .wordTest {
min-height: 100vh; min-height: 100vh;
background-color: #F5F5F5; background-color: #f5f5f5;
} }
.wordTest .swiper { .wordTest .swiper {
min-height: 100vh; min-height: 100vh;
background-color: #F5F5F5; background-color: #f5f5f5;
} }
</style> </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