2023-01-30 14:57:39 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="AppLegalLearning">
|
|
|
|
|
<div class="tabs_box">
|
|
|
|
|
<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>
|
2023-01-31 16:19:20 +08:00
|
|
|
<OnlineClass ref="OnlineClass" @toDetail="toDetail" v-show="currIndex == 0"></OnlineClass>
|
|
|
|
|
<GeneralLawExam ref="GeneralLawExam" @toTest="toTest" v-show="currIndex == 1"></GeneralLawExam>
|
2023-01-30 14:57:39 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-01-31 09:49:26 +08:00
|
|
|
import OnlineClass from './components/OnlineClass.vue'
|
|
|
|
|
import GeneralLawExam from './components/GeneralLawExam.vue'
|
2023-01-30 14:57:39 +08:00
|
|
|
export default {
|
|
|
|
|
name: 'AppLegalLearning',
|
|
|
|
|
appName: '法治学习',
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-02-01 18:02:38 +08:00
|
|
|
currIndex: 1,
|
2023-01-30 14:57:39 +08:00
|
|
|
tabs: [
|
|
|
|
|
{
|
|
|
|
|
name: '在线课堂',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '普法考试',
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
},
|
|
|
|
|
components: {
|
2023-01-31 09:49:26 +08:00
|
|
|
OnlineClass,
|
|
|
|
|
GeneralLawExam
|
2023-01-30 14:57:39 +08:00
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
currIndex: {
|
|
|
|
|
handler(v) {
|
|
|
|
|
if(v == 0) {
|
|
|
|
|
this.$refs.OnlineClass.getList();
|
|
|
|
|
} else if(v == 1) {
|
|
|
|
|
this.$refs.GeneralLawExam.getList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-01-31 09:49:26 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
2023-01-31 16:19:20 +08:00
|
|
|
toTest() {
|
2023-01-31 09:49:26 +08:00
|
|
|
uni.navigateTo({url: "./testForm"})
|
2023-01-31 16:19:20 +08:00
|
|
|
},
|
|
|
|
|
toDetail() {
|
|
|
|
|
uni.navigateTo({url: "./classDetail"})
|
2023-01-31 09:49:26 +08:00
|
|
|
}
|
2023-01-30 14:57:39 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" socped>
|
|
|
|
|
.AppGeneralLawExam {
|
|
|
|
|
.tabs_box {
|
|
|
|
|
height: 100px;
|
|
|
|
|
line-height: 100px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|