1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <template>
- <div class="body-content">
- <home-slice v-if="showSlice"/>
- <header-container/>
- <div class="container-wrapper">
- <slot>
- <div class="main-container">
- <router-view/>
- </div>
- </slot>
- </div>
- <footer-container/>
- </div>
- </template>
- <script>
- import Http from '@/js/http.js'
- import HeaderContainer from '@/components/commons/Header2.0'
- import FooterContainer from '@/components/commons/Footer2.0'
- import HomeSlice from '@/components/commons/HomeSlice'
- import {getCurrentUser, storageGet, storageSave} from '@/js/index'
- import {setConfig} from '../src/config/index'
- export default {
- name: 'App',
- components: {HeaderContainer, FooterContainer, HomeSlice},
- data(){
- return {
- // showSlice:false
- }
- },
- methods: {
- setUserInfo () {
- // storageGet('user').then((res)=>{
- // if (res == null){
- // this.setCurrUserByHttp()
- // }else{
- // this.fullScreenLoading = false
- // this.isLogin = true
- // }
- // }).catch((error)=>{
- // this.setCurrUserByHttp()
- // })
- // if (storageGet('user') == null) {
- // storageSave('rolesPermissions', {
- // 'isRegionManager': false,
- // 'isIndividualUser': false,
- // 'isEnterpriseUser': false,
- // 'isAgency': false,
- // 'isSystemAdministrator': false
- // })
- // console.log('本地没有用户信息,开始加载用户信息')
- // getCurrentUser().then((res) => {
- // console.log(res)
- // storageSave('user', res)
- // storageSave('rolesPermissions', getRolesPermissions(res.roleList))
- // console.log('用户信息加载成功')
- // }).catch(error => {
- // console.log('用户信息加载失败')
- // if (error.status == 401) {
- // notify('warning', error.data)
- // } else {
- // notify('error', error.data)
- // }
- // })
- // } else {
- // this.fullScreenLoading = false
- // this.isLogin = true
- // }
- },
- },
- computed:{
- showSlice(){
- if(this.$route.path==='/home' || this.$route.path==='/')
- return true;
- }
- },
- }
- </script>
- <style>
- .body-content{
- width:100%;
- min-width: 1300px;
- height: 100%;
- }
- .container-wrapper {
- min-height: calc(100% - 70px - 180px);
- }
- .main-container {
- width: 100%;
- min-height: calc(100% - 70px - 180px);
- margin: 0 auto;
- padding-bottom: 30px;
- }
- </style>
|