You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bocai_supplyChain_pc/src/views/login.vue

135 lines
3.0 KiB
Vue

4 years ago
<template>
<div class="login-container">
4 years ago
<div class="centerbox">
<div class="contentleft">
4 years ago
<div class="slogan">
<i class="iconfont icon-yigezhuanmenfuwudailidepingtai2"></i>
</div>
4 years ago
</div>
<div class="contentright">
<div class="contentbox">
<router-view></router-view>
4 years ago
</div>
</div>
</div>
</div>
</template>
<script>
4 years ago
// import { loginApi, getPhoneCodeApi } from "../api/login";
4 years ago
export default {
// 组件名称
name: "login",
// 局部注册的组件
components: {},
// 组件参数 接收来自父组件的数据
props: {},
// 组件状态值
data() {
return {
loginway: 1,
4 years ago
islogoshow: true, // 控制logo是否显示
4 years ago
form: this.$form.createForm(this),
form1: this.$form.createForm(this),
isfinish: true,
deadline: 60,
4 years ago
path: this.$route.fullPath,
4 years ago
};
},
// 计算属性
computed: {},
// 侦听器
4 years ago
watch: {
path() {
this.getpathinfo();
console.log(this.path);
},
},
4 years ago
// 生命周期钩子 注:没用到的钩子请自行删除
/**
* 组件实例创建完成属性已绑定但DOM还未生成$ el属性还不存在
*/
4 years ago
created() {
4 years ago
// this.getpathinfo();
4 years ago
},
4 years ago
/**
* el 被新创建的 vm.el 替换并挂载到实例上去之后调用该钩子
* 如果 root 实例挂载了一个文档内元素 mounted 被调用时 vm.el 也在文档内
*/
mounted() {},
// 组件方法
4 years ago
methods: {
4 years ago
getpathinfo() {
this.path = this.$route.fullPath;
if (this.path.indexOf("updatepsw") > -1) {
this.islogoshow = false;
} else {
this.islogoshow = true;
}
console.log(this.path);
4 years ago
},
},
4 years ago
};
</script>
<style scoped lang="less">
.login-container {
4 years ago
height: calc(100% - 190px);
4 years ago
width: 100%;
position: relative;
// background: url("../assets/Bg.png") no-repeat center;
// background-size: 100% 100%;
// box-shadow: 5px 5px 10px gray;
.centerbox {
position: absolute;
4 years ago
width: 640px;
height: 400px;
4 years ago
// background-color: pink;
4 years ago
left: 50%;
4 years ago
top: 55%;
4 years ago
transform: translateX(-50%) translateY(-50%);
4 years ago
margin: auto;
border-radius: 16px;
overflow: hidden;
.contentleft {
4 years ago
width: 320px;
4 years ago
height: 100%;
float: left;
position: relative;
background-color: #ff6a00;
.slogan {
position: absolute;
4 years ago
top: 50%;
left: 50%;
// margin: auto;
transform: translateX(-50%) translateY(-50%);
4 years ago
// background-color: skyblue;
4 years ago
// img {
// width: 100%;
// height: 100%;
// }
i {
font-size: 91px;
color: #fff;
line-height: 91px;
4 years ago
}
}
4 years ago
}
4 years ago
.contentright {
4 years ago
width: 320px;
4 years ago
height: 100%;
float: left;
// padding: 40px 55px;
box-sizing: border-box;
background-color: #fff;
4 years ago
4 years ago
.contentbox {
4 years ago
width: 290px;
4 years ago
margin: 0 auto;
4 years ago
}
4 years ago
// .content;
4 years ago
}
}
}
</style>