This commit is contained in:
shijingjing
2023-02-17 14:12:38 +08:00
parent 284c8bd02b
commit 2a5fa63b4b
5 changed files with 52 additions and 47 deletions

View File

@@ -5,8 +5,8 @@
<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>
<OnlineClass ref="OnlineClass" @toDetail="toDetail" v-show="currIndex == 0"></OnlineClass>
<GeneralLawExam ref="GeneralLawExam" @toTest="toTest" v-show="currIndex == 1"></GeneralLawExam>
<OnlineClass ref="OnlineClass" :height="height" @toDetail="toDetail" v-show="currIndex == 0"></OnlineClass>
<GeneralLawExam ref="GeneralLawExam" :height="height" @toTest="toTest" v-show="currIndex == 1"></GeneralLawExam>
</div>
</template>
@@ -19,7 +19,7 @@ export default {
customNavigation: true,
data() {
return {
currIndex: 0,
currIndex: 1,
tabs: [
{
name: '在线课堂',
@@ -28,6 +28,8 @@ export default {
name: '普法考试',
}
],
screenHeight: 0,
height: 0,
}
},
onShow() {
@@ -37,6 +39,11 @@ export default {
this.$refs.GeneralLawExam.getList();
this.$refs.GeneralLawExam.getUserInfo()
}
uni.getSystemInfo({
success: (res)=> {
this.screenHeight = res.screenHeight
}
});
},
components: {
OnlineClass,
@@ -52,6 +59,11 @@ export default {
this.$refs.GeneralLawExam.getUserInfo()
}
}
},
screenHeight(v) {
if(v) {
this.height = this.screenHeight - 230
}
}
},
methods: {