提交 f36b94f8 编写于 作者: sq3536's avatar sq3536

登录样式

上级 48a73aa6
...@@ -19,13 +19,14 @@ ...@@ -19,13 +19,14 @@
right: 0; right: 0;
top: 150px; top: 150px;
margin: auto; margin: auto;
width: 400px; width: 450px;
.ivu-card-head { .ivu-card-head {
padding: 14px 6px; padding: 30px 6px;
border-bottom: 0px;
>p{ >p{
line-height: 20px; line-height: 20px;
font-size: 14px; font-size: 24px;
color: #17233d; color: #666666;
font-weight: 700; font-weight: 700;
} }
} }
...@@ -36,7 +37,7 @@ ...@@ -36,7 +37,7 @@
padding: 30px 0; padding: 30px 0;
} }
.form-con{ .form-con{
padding: 10px 0 0; padding: 0px 20px 0px 20px;
>i-button{ >i-button{
width: 170px; width: 170px;
height: 40px; height: 40px;
...@@ -46,20 +47,21 @@ ...@@ -46,20 +47,21 @@
font-size: 10px; font-size: 10px;
text-align: center; text-align: center;
color: red; color: red;
height: 30px;
} }
} }
} }
.login_btn{ .login_btn{
width: 175px; width: 175px;
height: 32px; height: 40px;
font-size: 14px; font-size: 18px;
font-family: MicrosoftYaHei; font-family: MicrosoftYaHei;
} }
.login_register { .login_register {
width: 175px; width: 175px;
height: 32px; height: 40px;
font-size: 14px; font-size: 18px;
font-family: MicrosoftYaHei; font-family: MicrosoftYaHei;
float: right; float: right;
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<i-form ref='loginForm' :rules="rules" :model="form"> <i-form ref='loginForm' :rules="rules" :model="form">
<form-item prop='loginname'> <form-item prop='loginname'>
<i-input <i-input
size='large'
prefix='ios-contact' prefix='ios-contact'
v-model.trim="form.loginname" v-model.trim="form.loginname"
placeholder="用户名" placeholder="用户名"
...@@ -19,6 +20,7 @@ ...@@ -19,6 +20,7 @@
</form-item> </form-item>
<form-item prop='password'> <form-item prop='password'>
<i-input <i-input
size='large'
prefix='ios-key' prefix='ios-key'
v-model.trim="form.password" v-model.trim="form.password"
type='password' type='password'
...@@ -61,9 +63,8 @@ ...@@ -61,9 +63,8 @@
</div> </div>
</card> </card>
<div class="log_footer"> <div class="log_footer">
<div class="copyright">Copyright © 2018 <div class="copyright">
<a href="http://www.ibizsys.net/ibizsys/channelview?channelId=ibizsys.about" target="_blank">埃毕致(上海)云计算科技</a> <a href="https://www.ibizlab.cn/" target="_blank">{{appTitle}} is based on ibizlab .</a>
版权所有
</div> </div>
</div> </div>
</div> </div>
...@@ -86,7 +87,7 @@ ...@@ -86,7 +87,7 @@
* @type {*} * @type {*}
* @memberof Login * @memberof Login
*/ */
public form: any = {loginname: '', password: ''}; public form: any = {loginname: 'ibzadmin', password: '123456'};
/** /**
* 登录提示语 * 登录提示语
...@@ -181,7 +182,7 @@ ...@@ -181,7 +182,7 @@
localStorage.setItem('user', JSON.stringify(data.user)); localStorage.setItem('user', JSON.stringify(data.user));
} }
// 设置cookie,保存账号密码7天 // 设置cookie,保存账号密码7天
this.setCookie(loginname, password, 7); this.setCookie(loginname, 7);
// 跳转首页 // 跳转首页
const url: any = this.$route.query.redirect ? this.$route.query.redirect : '*'; const url: any = this.$route.query.redirect ? this.$route.query.redirect : '*';
this.$router.push({path: url}); this.$router.push({path: url});
...@@ -190,11 +191,12 @@ ...@@ -190,11 +191,12 @@
// const loginfailed: any = this.$t('components.login.loginfailed'); // const loginfailed: any = this.$t('components.login.loginfailed');
// this.$Notice.error({ title: (this.$t('components.login.error') as any), desc: loginfailed }); // this.$Notice.error({ title: (this.$t('components.login.error') as any), desc: loginfailed });
// 登录提示 // 登录提示
// this.loginTip = loginfailed;
const data = error.data; const data = error.data;
if (data && data.message) { if (data && data.message) {
this.loginTip = data.message;
this.$Message.error({ this.$Message.error({
content: "登录失败," + data.detail, content: "登录失败," + data.message,
duration: 5, duration: 5,
closable: true closable: true
}); });
...@@ -223,14 +225,13 @@ ...@@ -223,14 +225,13 @@
* @param loginname * @param loginname
* @param password * @param password
*/ */
public setCookie(loginname: any, password: any, exdays: any) { public setCookie(loginname: any, exdays: any) {
// 获取时间 // 获取时间
let exdate = new Date(); let exdate = new Date();
// 保存的天数 // 保存的天数
exdate.setTime(exdate.getTime() + 24 * 60 * 60 * 1000 * exdays); exdate.setTime(exdate.getTime() + 24 * 60 * 60 * 1000 * exdays);
// 字符串拼接cookie // 字符串拼接cookie
window.document.cookie = "loginname" + "=" + loginname + ";path=/;expires=" + exdate.toUTCString(); window.document.cookie = "loginname" + "=" + loginname + ";path=/;expires=" + exdate.toUTCString();
window.document.cookie = "password" + "=" + password + ";path=/;expires=" + exdate.toUTCString();
} }
/** /**
...@@ -244,8 +245,6 @@ ...@@ -244,8 +245,6 @@
//判断查找相对应的值 //判断查找相对应的值
if (arr2[0] == 'loginname') { if (arr2[0] == 'loginname') {
this.form.loginname = arr2[1]; this.form.loginname = arr2[1];
} else if (arr2[0] == 'password') {
this.form.password = arr2[1];
} }
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册