普法考试

This commit is contained in:
shijingjing
2023-01-31 09:49:26 +08:00
parent 4617698596
commit b0f5da59f1
6 changed files with 93 additions and 78 deletions

View File

@@ -4,14 +4,14 @@
<u-tabs :list="tabs" font-size="32" bg-color="#f3f5f7" inactive-color="#999999"
:active-item-style="{color: '#222222'}" :is-scroll="true" :current="currIndex" @change="(i) => (currIndex = i)"> </u-tabs>
</div>
<AppOnlineClass ref="OnlineClass" v-show="currIndex == 0"></AppOnlineClass>
<AppGeneralLawExam ref="GeneralLawExam" v-show="currIndex == 1"></AppGeneralLawExam>
<OnlineClass ref="OnlineClass" v-show="currIndex == 0"></OnlineClass>
<GeneralLawExam ref="GeneralLawExam" @LinkToTest="LinkToTest" v-show="currIndex == 1"></GeneralLawExam>
</div>
</template>
<script>
import AppOnlineClass from './components/AppOnlineClass.vue'
import AppGeneralLawExam from './components/AppGeneralLawExam.vue'
import OnlineClass from './components/OnlineClass.vue'
import GeneralLawExam from './components/GeneralLawExam.vue'
export default {
name: 'AppLegalLearning',
appName: '法治学习',
@@ -31,8 +31,8 @@ export default {
onShow() {
},
components: {
AppOnlineClass,
AppGeneralLawExam
OnlineClass,
GeneralLawExam
},
watch: {
currIndex: {
@@ -44,6 +44,11 @@ export default {
}
}
}
},
methods: {
LinkToTest() {
uni.navigateTo({url: "./testForm"})
}
}
}
</script>

View File

@@ -1,5 +1,5 @@
<template>
<div class="AppGeneralLawExam">
<div class="GeneralLawExam">
<div class="search_box">
<u-search placeholder="请输入需要搜索的考试" bg-color="#FFF" v-model="keyword" :show-action="false"></u-search>
</div>
@@ -21,7 +21,7 @@
</div>
<div class="grade">98</div>
</div>
<div class="card_bottom col_blue" @click="toTest">参加考试</div>
<div class="card_bottom col_blue" @click="toTest()">参加考试</div>
</div>
</div>
</div>
@@ -40,13 +40,10 @@ export default {
},
methods: {
getList() {
console.log('111');
console.log('普法考试列表');
},
toTest() {
console.log('tiaozhuan');
uni.navigateTo({
url: './test'
})
this.$emit('LinkToTest')
}
},
onReachBottom() {
@@ -57,7 +54,7 @@ export default {
</script>
<style lang="scss" socped>
.AppGeneralLawExam {
.GeneralLawExam {
.search_box {
margin: 24px 0;
padding: 0 32px;

View File

@@ -1,5 +1,5 @@
<template>
<div class="AppOnlineClass">
<div class="OnlineClass">
在线课堂
</div>
</template>
@@ -17,18 +17,18 @@ export default {
methods: {
getList() {
console.log('222');
console.log('在线课堂列表');
}
},
// onReachBottom() {
// this.current ++;
// this.getList()
// },
onReachBottom() {
this.current ++;
this.getList()
},
}
</script>
<style lang="scss" socped>
.AppOnlineClass {
.OnlineClass {
}
</style>

View File

@@ -1,31 +0,0 @@
<template>
<div class="question">
</div>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
},
onReachBottom() {
},
}
</script>
<style lang="scss" scoped>
.question {
}
</style>

View File

@@ -1,26 +0,0 @@
<template>
<div class="test">
哈哈
<!-- <Question></Question> -->
</div>
</template>
<script>
import Question from "./question.vue";
export default {
data() {
return {
}
},
components: {
Question
}
}
</script>
<style lang="scss" scoped>
.test {
}
</style>

View File

@@ -0,0 +1,70 @@
<template>
<div class="testForm">
答题
<div v-for="(item,index) in questionList" :key="index">
<div v-if="activeIndex === index">
<div>{{ item.subject }}</div>
<div @click="next">下一题</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
activeIndex: 0,
questionList: [
{
index: 0,
subject: "第1题",
answer: "答案",
jiexi: '解析'
},
{
index: 1,
subject: "第2题",
answer: "答案",
jiexi: '解析'
},
{
index: 2,
subject: "第3题",
answer: "答案",
jiexi: '解析'
},
{
index: 3,
subject: "第4题",
answer: "答案",
jiexi: '解析'
},
{
index: 4,
subject: "第5题",
answer: "答案",
jiexi: '解析'
}
]
}
},
methods: {
getList() {
console.log('题目列表');
},
next() {
this.activeIndex ++;
}
},
onReachBottom() {
this.current ++;
},
}
</script>
<style lang="scss" scoped>
.testForm {
}
</style>