|
@@ -162,6 +162,9 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
+ canShow(){
|
|
|
+ return this.$route.params.canShow
|
|
|
+ },
|
|
|
// 获取当前时间
|
|
|
currentTime() {
|
|
|
return formatAxis(new Date());
|
|
@@ -182,36 +185,40 @@ export default {
|
|
|
var time = new Date(this.$c.updateTime).getTime()
|
|
|
var time2 = new Date().getTime()
|
|
|
if(time2 < time){
|
|
|
- this.$router.push({path: '/'})
|
|
|
- return false
|
|
|
+ if(!this.canShow){
|
|
|
+ this.$router.push({path: '/'})
|
|
|
+ return false
|
|
|
+ }else{
|
|
|
+ this.show = true
|
|
|
+ }
|
|
|
}else{
|
|
|
this.show = true
|
|
|
}
|
|
|
-
|
|
|
- var url=location.href;
|
|
|
- var params=url.split("?");
|
|
|
- if(params[1]){
|
|
|
- var a = params[1]
|
|
|
- var b= a.split("=")
|
|
|
- // console.log(b[1])
|
|
|
- if(b){
|
|
|
- var token=b[1]
|
|
|
- this.$api.IsadminLogin({token:token}).then(response=>{
|
|
|
- // console.log(response)
|
|
|
- if(response.data==true){
|
|
|
- this.$router.push({
|
|
|
- path: '/admin/rManage'
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.$message.error('您未登录,请重新登录!')
|
|
|
- }
|
|
|
+ if(!this.canShow){
|
|
|
+ var url=location.href;
|
|
|
+ var params=url.split("?");
|
|
|
+ if(params[1]){
|
|
|
+ var a = params[1]
|
|
|
+ var b= a.split("=")
|
|
|
+ // console.log(b[1])
|
|
|
+ if(b){
|
|
|
+ var token=b[1]
|
|
|
+ this.$api.IsadminLogin({token:token}).then(response=>{
|
|
|
+ // console.log(response)
|
|
|
+ if(response.data==true){
|
|
|
+ this.$router.push({
|
|
|
+ path: '/admin/rManage'
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.$message.error('您未登录,请重新登录!')
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
this.initTime();
|
|
|
|
|
|
},
|