提交 6bacb635 authored 作者: 宋雄's avatar 宋雄

一期封版

上级 b1978fff
NODE_ENV=development NODE_ENV=development
VUE_APP_API_BASE_URL='http://192.168.0.119:9999' # VUE_APP_API_BASE_URL='http://192.168.0.119:9999'
# VUE_APP_API_BASE_URL='http://220.203.25.212:9999' VUE_APP_API_BASE_URL='http://220.203.25.212:9999'
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
......
...@@ -252,7 +252,6 @@ ...@@ -252,7 +252,6 @@
<div class="load_title">加载中,请稍等</div> <div class="load_title">加载中,请稍等</div>
</div> </div>
</div> </div>
<script type="text/javascript" src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=CHUN0HYsI6BBdicixQPL6dFLOFICXDkm"></script>
</body> </body>
</html> </html>
\ No newline at end of file
<template> <template>
<div id="userLayout" :class="['user-layout-wrapper', device]"> <div id="userLayout" :class="['user-layout-wrapper', device]">
<div class="container"> <div class="container" v-if="isPageUrlTrue">
<div class="top"> <div class="top">
<div class="header"> <div class="header">
<a href="/"> <a href="/">
<!-- <img src="~@/assets/logo.svg" class="logo" alt="logo"> --> <!-- <img src="~@/assets/logo.svg" class="logo" alt="logo"> -->
<img src="~@/assets/logo.png" class="logo" alt="logo"> <img v-if="pageImage" :src="pageImage" class="logo" alt="logo">
<img v-else src="~@/assets/logo.png" class="logo" alt="logo">
<span class="title">欢迎登陆</span> <span class="title">欢迎登陆</span>
</a> </a>
</div> </div>
<div class="desc"> <div class="desc">{{pageTitle}}</div>
湖北汉江之星科技有限公司
</div>
</div> </div>
<route-view></route-view> <route-view></route-view>
...@@ -27,21 +26,41 @@ ...@@ -27,21 +26,41 @@
</div> </div>
</div> --> </div> -->
</div> </div>
<div v-else>
<err-page />
</div>
</div> </div>
</template> </template>
<script> <script>
import RouteView from "@/components/layouts/RouteView" import RouteView from "@/components/layouts/RouteView"
import { mixinDevice } from '@/utils/mixin.js' import { mixinDevice } from '@/utils/mixin.js'
import store from '@/store/'
import { getFileAccessHttpUrl } from '@/api/manage'
import errPage from './urlErr.vue'
export default { export default {
name: "UserLayout", name: "UserLayout",
components: { RouteView }, components: { RouteView, errPage },
mixins: [mixinDevice], mixins: [mixinDevice],
data () { data () {
return {} return {
}
},
computed:{
isPageUrlTrue() {
return store.state.user.pageUrlFlag
},
pageTitle () {
return store.getters.pageTitle
},
pageImage () {
return store.getters.pageImage ? getFileAccessHttpUrl(store.getters.pageImage) : ''
}
}, },
mounted () { mounted () {
console.log(store)
document.body.classList.add('userLayout') document.body.classList.add('userLayout')
}, },
beforeDestroy () { beforeDestroy () {
......
<template>
<div class="exception">
<div class="img">
<img src="https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg"/>
</div>
<div class="content">
<h1>404</h1>
<div class="desc">抱歉,你访问的页面地址错误</div>
<!-- <div class="action">
<a-button type="primary" @click="handleToHome">返回首页</a-button>
</div> -->
</div>
</div>
</template>
<script>
export default {
name: "ErrPage",
data() {
return {}
},
methods: {
}
}
</script>
<style lang="less" scoped>
.exception {
min-height: 500px;
height: 80%;
align-items: center;
text-align: center;
margin-top: 150px;
.img {
display: inline-block;
padding-right: 52px;
zoom: 1;
img {
height: 360px;
max-width: 430px;
}
}
.content {
display: inline-block;
flex: auto;
h1 {
color: #434e59;
font-size: 72px;
font-weight: 600;
line-height: 72px;
margin-bottom: 24px;
}
.desc {
color: rgba(0, 0, 0, .45);
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;
}
}
}
.mobile {
.exception {
margin-top: 30px;
.img {
padding-right: unset;
img {
height: 40%;
max-width: 80%;
}
}
}
}
</style>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:collapsible="collapsible" :collapsible="collapsible"
v-model="collapsed" v-model="collapsed"
:trigger="null"> :trigger="null">
<logo /> <logo :showTitle="false" />
<s-menu <s-menu
:collapsed="collapsed" :collapsed="collapsed"
:menu="menus" :menu="menus"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
:type="collapsed ? 'menu-unfold' : 'menu-fold'" :type="collapsed ? 'menu-unfold' : 'menu-fold'"
@click="toggle"/> @click="toggle"/>
<span v-if="device === 'desktop'">欢迎进入 {{companyName}} 物业公司</span> <span v-if="device === 'desktop'">欢迎进入 {{companyName}}</span>
<!-- <span v-else>Jeecg-Boot</span> --> <!-- <span v-else>Jeecg-Boot</span> -->
<user-menu :theme="theme"/> <user-menu :theme="theme"/>
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
<router-link :to="routerLinkTo"> <router-link :to="routerLinkTo">
<!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 --> <!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 -->
<img v-if="navTheme === 'dark'" src="~@/assets/logo-white.png" alt="logo"> <!-- <img v-if="navTheme === 'dark'" src="~@/assets/logo-white.png" alt="logo">
<img v-else src="~@/assets/logo.png" alt="logo"> <img v-else src="~@/assets/logo.png" alt="logo"> -->
<img :src="getAvatar()" alt="logo">
<!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 --> <!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 -->
<h1 v-if="showTitle">{{ title }}</h1> <h1 v-if="showTitle">{{ title }}</h1>
...@@ -14,6 +15,8 @@ ...@@ -14,6 +15,8 @@
<script> <script>
import { mixin } from '@/utils/mixin.js' import { mixin } from '@/utils/mixin.js'
import { getFileAccessHttpUrl } from "@/api/manage"
import { mapGetters } from 'vuex'
export default { export default {
name: 'Logo', name: 'Logo',
...@@ -34,6 +37,12 @@ ...@@ -34,6 +37,12 @@
type: Object, type: Object,
default: () => ({name: 'dashboard'}), default: () => ({name: 'dashboard'}),
}, },
},
methods: {
...mapGetters(["avatar"]),
getAvatar(){
return getFileAccessHttpUrl(this.avatar())
}
} }
} }
</script> </script>
......
...@@ -319,7 +319,7 @@ export const constantRouterMap = [ ...@@ -319,7 +319,7 @@ export const constantRouterMap = [
path: 'alteration', path: 'alteration',
name: 'alteration', name: 'alteration',
component: () => import(/* webpackChunkName: "user" */ '@/views/user/alteration/Alteration') component: () => import(/* webpackChunkName: "user" */ '@/views/user/alteration/Alteration')
}, }
] ]
}, },
...@@ -362,6 +362,5 @@ export const constantRouterMap = [ ...@@ -362,6 +362,5 @@ export const constantRouterMap = [
{ {
path: '/404', path: '/404',
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404') component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
}, }
] ]
...@@ -18,7 +18,8 @@ const getters = { ...@@ -18,7 +18,8 @@ const getters = {
return state.enhance.enhanceJs[code] return state.enhance.enhanceJs[code]
}, },
sysSafeMode: state => state.user.sysSafeMode, sysSafeMode: state => state.user.sysSafeMode,
pageTitle: state => state.user.pageTitle,
pageImage: state => state.user.pageImage
} }
export default getters export default getters
...@@ -19,6 +19,9 @@ const user = { ...@@ -19,6 +19,9 @@ const user = {
info: {}, info: {},
// 系统安全模式 // 系统安全模式
sysSafeMode: null, sysSafeMode: null,
pageUrlFlag: true,
pageTitle: '湖北汉江之星科技有限公司',
pageImage: ''
}, },
mutations: { mutations: {
...@@ -55,6 +58,15 @@ const user = { ...@@ -55,6 +58,15 @@ const user = {
state.sysSafeMode = false state.sysSafeMode = false
} }
}, },
SET_PAGE_URL_FLAG: (state, flag) => {
state.pageUrlFlag = flag
},
SET_PAGE_TITLE: (state, name) => {
state.pageTitle = name
},
SET_PAGE_IMAGE: (state, image) => {
state.pageImage = image
}
}, },
actions: { actions: {
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types' import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types'
import store from '@/store/'
import LoginSelectTenant from './LoginSelectTenant' import LoginSelectTenant from './LoginSelectTenant'
import { getEncryptedString } from '@/utils/encryption/aesEncrypt' import { getEncryptedString } from '@/utils/encryption/aesEncrypt'
import { timeFix } from '@/utils/util' import { timeFix } from '@/utils/util'
...@@ -65,9 +66,14 @@ export default { ...@@ -65,9 +66,14 @@ export default {
Vue.ls.remove(ACCESS_TOKEN) Vue.ls.remove(ACCESS_TOKEN)
this.getRouterData(); this.getRouterData();
this.rememberMe = true this.rememberMe = true
// loginUrlCheck({platformType: 'company'}).then(res=> { loginUrlCheck({platformType: 'company'}).then(res=> {
if(res.result && res.result.logoUrl) {
// }) store.commit('SET_PAGE_TITLE', res.result.name)
store.commit('SET_PAGE_IMAGE', res.result.logoUrl)
} else {
store.commit('SET_PAGE_URL_FLAG', false)
}
})
}, },
methods:{ methods:{
handleTabClick(key){ handleTabClick(key){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论