123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <template>
- <div class="body-content">
- <home-slice v-if="showSlice && slice_type === 1"/>
- <home-slice-online v-if="showSlice && slice_type === 0"/>
- <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 HomeSliceOnline from '@/components/commons/HomeSliceOnline'
- import {getCurrentUser, storageGet, storageSave} from '@/js/index'
- import {setConfig} from '../src/config/index'
- import {slice_type} from "../tool4deploy/slider-type";
- export default {
- name: 'App',
- components: {HeaderContainer, FooterContainer, HomeSlice ,HomeSliceOnline},
- data(){
- return {
- // showSlice:false
- slice_type
- }
- },
- 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;
- }
- .home-slice {
- width: 100%;
- height: 170px;
- background-image: url("./assets/img/homeSlice.png");
- background-size: 100% 100%
- }
- </style>
|