Commit 2af700b3 by lihu541

不同角色登录,显示内容修改

parent 630f0b7d
<template> <template>
<div id="app"> <div id="app">
<router-view/> <router-view v-if="isRouterAlive"></router-view>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'App' name: 'App',
provide (){
return {
reload:this.reload
}
},
data(){
return {
isRouterAlive:true
}
},
methods:{
reload (){
this.isRouterAlive = false
this.$nextTick(function(){
this.isRouterAlive = true
})
}
},
components:{
}
} }
</script> </script>
......
...@@ -54,6 +54,9 @@ ...@@ -54,6 +54,9 @@
.header2 .area .name{ clear: both; line-height: 30px; color:#B3BFD2; text-align: right; padding-right: 5px;} .header2 .area .name{ clear: both; line-height: 30px; color:#B3BFD2; text-align: right; padding-right: 5px;}
.el-button--primary{ color: #fff; width: 50px; background-color: #FF69B4; border-color: #FF69B4;} .el-button--primary{ color: #fff; width: 50px; background-color: #FF69B4; border-color: #FF69B4;}
.card-dark {background: rgba(0, 0, 0, 0.21) none repeat scroll 0% 0%; border: 1px solid #000;position: relative; border-radius:5px;} .card-dark {background: rgba(0, 0, 0, 0.21) none repeat scroll 0% 0%; border: 1px solid #000;position: relative; border-radius:5px;}
.card-dark ::-webkit-scrollbar {
display: none;
}
.clear10{ clear: both; height: 10px;} .clear10{ clear: both; height: 10px;}
.card-01{ float: left; width: 470px; height: 165px;} .card-01{ float: left; width: 470px; height: 165px;}
.card1-mod{ float: left; width: 233px; padding: 10px; height: 165px;} .card1-mod{ float: left; width: 233px; padding: 10px; height: 165px;}
...@@ -105,7 +108,7 @@ ...@@ -105,7 +108,7 @@
.card2-mod .modtitle2{ clear: both; line-height: 25px; color: #B3BFD2;} .card2-mod .modtitle2{ clear: both; line-height: 25px; color: #B3BFD2;}
.card2-mod .modtitle2 span{ padding: 0 5px; color: #0097FD;} .card2-mod .modtitle2 span{ padding: 0 5px; color: #0097FD;}
.card2-mod .modtitle2 span.myclk{color: #42CCFF; font-weight: 600; font-size: 14px} .card2-mod .modtitle2 span.myclk{color: #42CCFF; font-weight: 600; font-size: 14px}
.card-03{ float: left; width: 150px; height: 310px; padding:10px 10px 0px 10px; overflow: hidden; overflow-y: scroll;} .card-03{ float: left; width: 150px; height: 310px; padding:10px 10px 0px 10px;}
.card-03 ul{width: 100%;} .card-03 ul{width: 100%;}
.card-03 ul li{font-size: 14px;width: 100%; text-align: left; color: #B3BFD2; padding-left: 15px; margin-bottom: 9px; height: 50px; line-height: 50px; background: #1a1d25; border: 1px #13161d solid; border-radius: 25px;} .card-03 ul li{font-size: 14px;width: 100%; text-align: left; color: #B3BFD2; padding-left: 15px; margin-bottom: 9px; height: 50px; line-height: 50px; background: #1a1d25; border: 1px #13161d solid; border-radius: 25px;}
.card-03 ul li.clk{color: #fff; background: -webkit-linear-gradient(left, #0097fd, #4fb6fb);} .card-03 ul li.clk{color: #fff; background: -webkit-linear-gradient(left, #0097fd, #4fb6fb);}
......
...@@ -157,10 +157,10 @@ ...@@ -157,10 +157,10 @@
</swiper-slide> </swiper-slide>
<swiper-slide> <swiper-slide>
<screenTwoPag1 v-if="screenTagshow == 1" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag1> <screenTwoPag1 v-if="screenTagshow == 1" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag1>
<!--<screenTwoPag2 v-else-if="screenTagshow == 2" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag2>--> <screenTwoPag2 v-else-if="screenTagshow == 2" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag2>
<!--<screenTwoPag3 v-else-if="screenTagshow == 3" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag3>--> <screenTwoPag3 v-else-if="screenTagshow == 3" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag3>
<!--<screenTwoPag4 v-else-if="screenTagshow == 4" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag4>--> <screenTwoPag4 v-else-if="screenTagshow == 4" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag4>
<!--<screenTwoPag5 v-else-if="screenTagshow == 5" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag5>--> <screenTwoPag5 v-else-if="screenTagshow == 5" @screenTwoPagefunc="changeScreenTwo" :PlaceCode="PlaceCode"></screenTwoPag5>
</swiper-slide> </swiper-slide>
<div class="swiper-pagination" slot="pagination"></div> <div class="swiper-pagination" slot="pagination"></div>
</swiper> </swiper>
...@@ -1183,6 +1183,9 @@ ...@@ -1183,6 +1183,9 @@
// 获取子组件传递来的数据 用以操作home页组件 // 获取子组件传递来的数据 用以操作home页组件
this.screenTagshow = data this.screenTagshow = data
localStorage.setItem("ScreenPage", this.screenTagshow) localStorage.setItem("ScreenPage", this.screenTagshow)
},
toSideTwo(){
this.$refs.mySwiper.swiper.slideTo(1, 10, true)
} }
}, },
mounted() { mounted() {
......
...@@ -30,7 +30,44 @@ service.interceptors.response.use( ...@@ -30,7 +30,44 @@ service.interceptors.response.use(
}) })
return Promise.reject('error') return Promise.reject('error')
} else { } else {
return response.data const statusCode = response.data.code
if(statusCode === 1){
return response.data
} else
if (statusCode) {
if (statusCode === 401) {
MessageBox.alert(
'登录状态已过期,请重新登录',
'系统提示',
{
confirmButtonText: '确定',
showClose:false,
type: 'warning'
}
).then(() => {
location.href = '/'
}).catch(() => {
});
} else if (statusCode === 403) {
console.log('网址错误')
} else {
const errorMsg = response.data.message
if (errorMsg !== undefined) {
Notification.error({
title: errorMsg,
duration: 5000
})
}
}
} else {
Notification.error({
title: '接口请求失败',
duration: 5000
})
}
} }
}, },
error => { error => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment