创建版本
This commit is contained in:
@@ -0,0 +1,225 @@
|
||||
<style>
|
||||
body {
|
||||
text-align: center;
|
||||
background-image: url({{$asset_url}}/images/login-bg2.jpg);
|
||||
background-repeat: no-repeat;
|
||||
height: 100vh;
|
||||
background-attachment: scroll;
|
||||
background-position: center center;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
}
|
||||
.content-body {
|
||||
margin: 0;
|
||||
}
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 0;
|
||||
background: rgba(0, 0, 0, 0.50);
|
||||
background: linear-gradient(to bottom, rgba(25, 137, 250, 0.65), rgba(25, 137, 250, 0.35));
|
||||
}
|
||||
|
||||
.text-muted {
|
||||
color: #fff;
|
||||
}
|
||||
.text-muted a {
|
||||
color: #fff;
|
||||
}
|
||||
.login-box {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
text-align: left;
|
||||
max-width: 750px;
|
||||
}
|
||||
.login-box .h5 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
.toast {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.login-box {
|
||||
padding-top: 220px;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
padding: 20px;
|
||||
padding-top: 60px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.text-title {
|
||||
font-weight: 500;
|
||||
font-size: 36px;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 10px;
|
||||
padding-top: 10px;
|
||||
border-top: solid 1px rgba(255, 255, 255, 0.3);
|
||||
text-align: right;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.login-box {
|
||||
padding-top: 60px;
|
||||
}
|
||||
.logo-text {
|
||||
text-align: center;
|
||||
}
|
||||
.row {
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.footer {
|
||||
border-top: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.panel-heading {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.fa-lock {
|
||||
color: #666;
|
||||
font-size: 18px;
|
||||
}
|
||||
.text-tips {
|
||||
color: #999;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.panel {
|
||||
border-radius: 5px !important;
|
||||
}
|
||||
|
||||
.show_captcha {
|
||||
display: flex;
|
||||
}
|
||||
#refresh_captcha {
|
||||
margin-left: 5px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="overlay"></div>
|
||||
|
||||
<div class="login-box">
|
||||
|
||||
@if(Session::has('error'))
|
||||
<div class="alert alert-warning alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
{{Session::pull('error')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-7 col-xs-12" id="aaa">
|
||||
<div class="logo-text layer" data-depth="0.60">
|
||||
<h2 class="text-white text-title">{{$setting['title']}}</h2>
|
||||
<small class="text-muted">Good Online Office</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-5 col-xs-12">
|
||||
|
||||
<form class="form-horizontal" url="{{url('login')}}" method="post" id="myform" name="myform">
|
||||
|
||||
<div class="panel">
|
||||
|
||||
<div class="panel-heading wrapper b-b b-light">
|
||||
<h4 class="font-thin m-t-none m-b-none"><i class="fa fa-lock"></i> 登录</h4>
|
||||
<div class="text-tips">
|
||||
请使用您的帐号密码进行登录
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body" style="padding:20px 30px 0 30px;">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="账号" class="form-control" name="username" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="password" placeholder="密码" class="form-control" name="password" required>
|
||||
</div>
|
||||
|
||||
<div id="show_captcha" style="display:@if($show_captcha) '' @else none @endif">
|
||||
<div class="form-group">
|
||||
<div class="show_captcha">
|
||||
<input type="text" maxlength="4" name="captcha" class="form-control" id="input-code" autocomplete="off" placeholder="验证码">
|
||||
<a id="refresh_captcha" title="点击刷新">
|
||||
<img id="captcha_image" src="{{url('user/auth/captcha')}}" style="vertical-align:middle;height:30px;">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox m-b-md m-t-none">
|
||||
<label class="i-checks i-checks-sm">
|
||||
<input type="checkbox" name="remember">
|
||||
<i></i> 下次自动登录
|
||||
</label>
|
||||
</div>
|
||||
<div class="line line-dashed"></div>
|
||||
<button type="submit" class="btn btn-lg btn-info btn-block"> 登录 </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="line line-dashed"></div>
|
||||
<div class="text-center text-muted">
|
||||
<a class="text-base" href="{{url('qrcode')}}">
|
||||
<i class="fa fa-qrcode"></i> 扫码登录</a>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="footer">
|
||||
<small class="text-muted">© {{date('Y')}} {{$version}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
// ajax 登录
|
||||
$('#myform').on('submit', function () {
|
||||
var url = $(this).attr('action');
|
||||
var data = $(this).serialize();
|
||||
$.post(url, data, function (res) {
|
||||
if (res.show_captcha) {
|
||||
$('#show_captcha').show();
|
||||
}
|
||||
if (res.success) {
|
||||
toastrSuccess(res.msg);
|
||||
app.redirect('/');
|
||||
} else {
|
||||
// 登录错误显示验证码
|
||||
if (res.show_captcha) {
|
||||
refresh_captcha();
|
||||
}
|
||||
toastrError(res.msg);
|
||||
}
|
||||
}, 'json');
|
||||
return false;
|
||||
});
|
||||
// 刷新验证码方法
|
||||
function refresh_captcha() {
|
||||
$('#captcha_image').attr('src', settings.public_url + '/user/auth/captcha?_=' + Math.random());
|
||||
}
|
||||
// 刷新验证码
|
||||
$(document).on('click', '#refresh_captcha', function () {
|
||||
refresh_captcha();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
@@ -0,0 +1,72 @@
|
||||
<style>
|
||||
body {
|
||||
color: #badbe6;
|
||||
text-align: center;
|
||||
background: -webkit-linear-gradient(right, #198fb4, #0b6fab);
|
||||
background: -o-linear-gradient(right, #198fb4, #0b6fab);
|
||||
background: linear-gradient(to left, #198fb4, #0b6fab);
|
||||
background-color: #3586b7;
|
||||
}
|
||||
.text-muted {
|
||||
color: #badbe6;
|
||||
}
|
||||
.text-muted a {
|
||||
color: #fff;
|
||||
}
|
||||
.list-group-item {
|
||||
border-color: #fff;
|
||||
}
|
||||
.login-box {
|
||||
margin: 0 auto;
|
||||
text-align: left;
|
||||
}
|
||||
.login-box .h5 {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="login-box">
|
||||
|
||||
<div class="container w-xxl w-auto-xs" style="padding-top:50px;">
|
||||
|
||||
<div class="wrapper text-center">
|
||||
<h2 class="text-white">{{$setting['title']}}</h2>
|
||||
<small class="text-muted">Different Office</small>
|
||||
</div>
|
||||
|
||||
@if(Session::has('error'))
|
||||
<div class="alert alert-warning alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
{{Session::pull('error')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="text-center">
|
||||
<img src="{{url('index/api/qrcode', ['size' => 5, 'data' => 'qrlogin:'.time().''])}}">
|
||||
</div>
|
||||
|
||||
<div class="line line-dashed"></div>
|
||||
|
||||
<div class="text-center text-muted">
|
||||
<a class="text-base" href="{{url('login')}}"><i class="fa fa-mail-reply"></i> 账号登录</a>
|
||||
</div>
|
||||
|
||||
<div class="line line-dashed"></div>
|
||||
|
||||
<div class="text-center">
|
||||
<small class="text-muted">© {{date('Y')}} {{$version}}</small>
|
||||
</div>
|
||||
|
||||
<div class="line line-dashed"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="h5 m-t-lg text-white help">
|
||||
<p>合作经销商的账号和密码请与客户经理联络。</p>
|
||||
<p>公司员工、供应商的账号和密码请与总经理助理联络。</p>
|
||||
<p>系统异常请与上述岗位联络。</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,106 @@
|
||||
<style>
|
||||
body {
|
||||
background: -webkit-linear-gradient(right, #198fb4, #0b6fab);
|
||||
background: -o-linear-gradient(right, #198fb4, #0b6fab);
|
||||
background: linear-gradient(to left, #198fb4, #0b6fab);
|
||||
background-color: #3586b7;
|
||||
}
|
||||
.text-muted {
|
||||
color: #badbe6;
|
||||
}
|
||||
.text-muted a {
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
<div class="container w-xxl w-auto-xs" style="padding-top:100px;">
|
||||
|
||||
@if(Session::has('error'))
|
||||
<div class="alert alert-warning alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
{{Session::pull('error')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
|
||||
<form class="form-horizontal padder-md" url="{{url()}}" method="post" id="myform" name="myform" role="form">
|
||||
<div class="form-group">
|
||||
<label class="control-label">两步验证</label>
|
||||
<input type="text" class="form-control" maxlength="6" id="code" name="code" value="{{Request::old('code')}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<!--
|
||||
<span id="sms-info"><a onclick="totp.smsCode();" href="javascript:;" class="btn btn-info btn-xs" id="sms-code">点击短信获取验证码</a></span>
|
||||
-->
|
||||
<div class="pull-right">
|
||||
<a href="{{url('logout')}}" class="btn btn-default"> 注销 </a>
|
||||
<button type="submit" class="btn btn-primary"> 验证 </button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="line line-dashed"></div>
|
||||
|
||||
<div class="text-center">
|
||||
<small class="text-muted">© {{date('Y')}} {{$version}}</small>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#myform').submit(function() {
|
||||
var url = $(this).attr('action');
|
||||
var data = $(this).serialize();
|
||||
$.post(url, data, function(res) {
|
||||
if(res.status) {
|
||||
toastrSuccess(res.data);
|
||||
app.redirect('/');
|
||||
} else {
|
||||
toastrError(res.data);
|
||||
}
|
||||
}, 'json');
|
||||
return false;
|
||||
});
|
||||
|
||||
var totp = {
|
||||
second: 0,
|
||||
timeId: undefined,
|
||||
init: function(second)
|
||||
{
|
||||
clearTimeout(this.timeId);
|
||||
this.second = second;
|
||||
this.start();
|
||||
},
|
||||
start: function()
|
||||
{
|
||||
var self = this;
|
||||
if(this.second > 0) {
|
||||
$("#second").html(this.second);
|
||||
this.timeId = setTimeout(function()
|
||||
{
|
||||
self.start();
|
||||
}, 1000);
|
||||
this.second--;
|
||||
|
||||
} else {
|
||||
clearTimeout(this.timeId);
|
||||
$("#sms-info").html('<a class="btn btn-info btn-xs" onclick="getSMSCode();" href="javascript:;" id="sms-code">重新获取验证码</a>');
|
||||
}
|
||||
},
|
||||
smsCode:function()
|
||||
{
|
||||
var self = this;
|
||||
$.get('{{url()}}',{sms:true}, function(res) {
|
||||
if(res.status == true) {
|
||||
self.init(res.data);
|
||||
$("#sms-info").html('<span class="btn btn-info btn-xs disabled">剩余<span id="second">' + res.data + '</span>秒重新获取</span>');
|
||||
} else {
|
||||
toastrError(res.data);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user