12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <!-- 我的 -->
- <template>
- <view id="mine">
- <teacherMine class="flex-box-page" ref="teacherMine" v-if="userType==1"></teacherMine>
- <pupilMine class="flex-box-page" ref="pupilMine" v-if="userType==2"></pupilMine>
- </view>
- </template>
- <script>
- import {
- teacherMine
- } from '@/pages/views/teacherPage/teacherMine'
- import {
- pupilMine
- } from '@/pages/views/pupilPage/pupilMine'
-
- export default {
-
- components: {
- teacherMine,
- pupilMine,
- },
-
- data() {
- return {
- userType: 0,
- }
- },
- onLoad() {
- },
- onShow() {
- this.userType = uni.getStorageSync('userType')
- this.$nextTick(()=>{
- if(this.userType == 1){
- this.$refs.teacherMine.initialize();
- }else if(this.userType == 2){
- this.$refs.pupilMine.initialize();
- }
- })
- },
- methods: {
-
- },
- }
- </script>
- <style lang="stylus" scoped>
- #mine {
- height: 100%;
- display: flex;
- flex-direction: column;
- .flex-box-page{
- flex:1;
- display: flex;
- flex-direction: column;
- }
- }
- </style>
|