123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <view>
- <view class="app-wrapper" :style="{height: bodyHeight}">
- <dataIndex v-if="templateView == 'dataIndex'"></dataIndex>
- <!-- <liveIndex ref="mescrollItem1" v-show="templateView == 'liveIndex'"></liveIndex>
- <courseIndex ref="mescrollItem2" v-show="templateView == 'courseIndex'"></courseIndex> -->
- <vipIndex ref="mescrollItem3" v-show="templateView == 'vipIndex'"></vipIndex>
- </view>
- <view class="myTabBar x-f x-bc">
- <view class="myTabBar-item x-f y-f" @click="handleTab('dataIndex')">
- <image src="../../static/logo.png" mode="aspectFill"></image>
- <text>数据</text>
- </view>
- <view class="myTabBar-item x-f y-f" @click="handleTab('liveIndex')">
- <image src="../../static/logo.png" mode="aspectFill"></image>
- <text>直播课</text>
- </view>
- <view class="myTabBar-item x-f y-f" @click="handleTab('courseIndex')">
- <image src="../../static/logo.png" mode="aspectFill"></image>
- <text>训练营</text>
- </view>
- <view class="myTabBar-item x-f y-f" @click="handleTab('vipIndex')">
- <image src="../../static/logo.png" mode="aspectFill"></image>
- <text>会员</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- import MescrollCompMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-comp.js";
- import dataIndex from "./dataIndex/index.vue"
- import liveIndex from "./live/index.vue"
- import courseIndex from "./course/index.vue"
- import vipIndex from "./vip/index.vue"
- export default {
- mixins: [MescrollCompMixin],
- components: {
- dataIndex,
- liveIndex,
- courseIndex,
- vipIndex
- },
- data() {
- return {
- templateView: 'vipIndex',
- statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
- windowHeight: uni.getSystemInfoSync().windowHeight,
- bodyHeight: 0,
- tabIndex: 0
- }
- },
- onLoad() {
- this.bodyHeight = `calc(${this.windowHeight}px - 56px)`
- uni.setNavigationBarTitle({
- title: '数据'
- });
- },
- methods: {
- handleTab(tem) {
- this.templateView = tem
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .app-wrapper {
- width: 100%;
- }
- .myTabBar {
- height: 56px;
- border-top: 1px solid #f5f5f5;
- box-sizing: border-box;
- width: 100%;
- background-color: #fff;
- position: fixed;
- bottom: var(--window-bottom);
- left: 0;
- font-size: 10px;
- image {
- width: 24px;
- height: 24px;
- margin-bottom: 3px;
- }
- &-item {
- flex: 1;
- }
- }
- </style>
|