| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <!-- 我的 -->
- <template>
- <view id="mine">
- <teacher-mine class="flex-box-page" ref="teacherMine" v-if="userType==1"></teacher-mine>
- <pupil-mine class="flex-box-page" ref="pupilMine" v-if="userType==2"></pupil-mine>
- </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>
|