Commit dfbc38d4 authored by 姬鋆屾's avatar 姬鋆屾

tui

parent 56ccd4d4
......@@ -7,23 +7,36 @@
<script>
export default {
mounted() {
let token = this.$route.query.token
console.log("token:"+token)
if(token ) {
let token = this.$route.query.token;
console.log("token:" + token);
if (token) {
window.sessionStorage.setItem("token", token);
this.$router.push('/index') // 有token直接跳转首页
}else{
this.$route.query.sysName
? localStorage.setItem("sysName", this.$route.query.sysName)
: "";
this.$route.query.sysName
? (document.title = this.$route.query.sysName)
: "";
this.$route.query.sysLogo
? localStorage.setItem("sysLogo", this.$route.query.sysLogo)
: "";
this.$router.push("/index"); // 有token直接跳转首页
} else {
this.$message({
message: '没有权限,正在跳转登录页面...',
center: true
});
setTimeout(function(){
window.location.href=process.env.VUE_APP_PORTAL_URL=='undefined'?'http://192.168.0.98:11072':process.env.VUE_APP_PORTAL_URL
//this.$router.push('/login')
},1000)
message: "没有权限,正在跳转登录页面...",
center: true,
});
setTimeout(function() {
window.location.href =
process.env.VUE_APP_PORTAL_URL == "undefined"
? "http://192.168.0.98:11072"
: process.env.VUE_APP_PORTAL_URL;
//this.$router.push('/login')
}, 1000);
}
}
}
},
};
</script>
<style>
......@@ -31,4 +44,4 @@ export default {
width: 300px;
height: 100px;
}
</style>
\ No newline at end of file
</style>
......@@ -3,23 +3,35 @@
<template>
<div class="page page-login flex flex-v">
<div class="form-wrap flex flex-1">
<el-form @submit.prevent='onSubmit' ref="form" :model="form" label-width="80px" size="small">
<h1>日志管理平台</h1>
<el-form
@submit.prevent="onSubmit"
ref="form"
:model="form"
label-width="80px"
size="small"
>
<h1>{{ title }}</h1>
<el-form-item label="用户名">
<el-input v-model="form.loginName"></el-input>
</el-form-item>
<el-form-item label="密码">
<el-input v-model="form.password" type='password'></el-input>
<el-input v-model="form.password" type="password"></el-input>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" native-type='submit' :loading='loading' @click='onSubmit'>登录</el-button>
<el-button
type="primary"
native-type="submit"
:loading="loading"
@click="onSubmit"
>登录</el-button
>
</el-form-item>
</el-form>
</div>
<div class="footer">
登陆 &copy; <a href="">信宏翔网络科技有限公司</a> 出品
</div>
</div>
</div>
</template>
......@@ -34,13 +46,14 @@ export default {
// obj.lat = 30.56;
// obj.address = "测试站点";
// obj.siteId = 2;
// this.originData.push(obj);
// this.$nextTick(() => {
// this.$refs.map1.refresh(this.originData);
// });
// window.location.href=process.env.VUE_APP_PORTAL_URL=='undefined'?'http://192.168.0.98:11072':process.env.VUE_APP_PORTAL_URL
localStorage.getItem("sysName")
? (this.title = localStorage.getItem("sysName"))
: (this.title = "日志管理系统");
},
methods: {
login() {
......@@ -91,6 +104,7 @@ export default {
loginName: "",
password: "",
},
title: "",
};
},
};
......@@ -139,4 +153,3 @@ export default {
}
}
</style>
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