!78 增加功能:增加一个科技动感登录界面
* db: 增加 MongoDB 科技动感界面脚本 * refactor: 增加科技动感登录界面 * feat: 增加绿色登录界面 * test: 增加登录界面单元测试 * db: 增加蓝色登录首页 * feat: 增加蓝色登录界面 * refactor: 修正路径问题
|
@ -366,12 +366,24 @@
|
|||
"Code": "Login-Gitee",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "蓝色清新",
|
||||
"Code": "Login-Blue",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "系统默认",
|
||||
"Code": "Login",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "科技动感",
|
||||
"Code": "Login-Tec",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "登录界面",
|
||||
|
|
|
@ -79,7 +79,9 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '后台
|
|||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '高仿码云', 'Login-Gitee', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '蓝色清新', 'Login-Blue', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '系统默认', 'Login', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '科技动感', 'Login-Tec', 1);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '登录界面', 'Login', 1);
|
||||
|
||||
|
|
|
@ -78,7 +78,9 @@ INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVA
|
|||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '高仿码云', 'Login-Gitee', 1);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '蓝色清新', 'Login-Blue', 1);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '系统默认', 'Login', 1);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '科技动感', 'Login-Tec', 1);
|
||||
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '网站设置', '登录界面', 'Login', 1);
|
||||
|
||||
|
|
|
@ -83,7 +83,9 @@ INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置
|
|||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统首页', '高仿码云', 'Login-Gitee', 1);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统首页', '蓝色清新', 'Login-Blue', 1);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统首页', '系统默认', 'Login', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '科技动感', 'Login-Tec', 1);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '登录界面', 'Login', 1);
|
||||
|
||||
|
|
|
@ -83,7 +83,9 @@ INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设
|
|||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'高仿码云', N'Login-Gitee', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'蓝色清新', N'Login-Blue', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'系统默认', N'Login', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'科技动感', N'Login-Tec', 1);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'网站设置', N'登录界面', N'Login', 1);
|
||||
|
||||
|
|
|
@ -0,0 +1,274 @@
|
|||
@model LoginModel
|
||||
@{
|
||||
ViewBag.Title = Model.Title;
|
||||
Layout = "_Layout";
|
||||
}
|
||||
@section css {
|
||||
<environment include="Development">
|
||||
<link href="~/lib/twitter-bootstrap/css/bootstrap.css" rel="stylesheet" />
|
||||
<link href="~/lib/font-awesome/css/font-awesome.css" rel="stylesheet" />
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<link href="~/lib/twitter-bootstrap/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="~/lib/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
|
||||
</environment>
|
||||
<link href="~/lib/captcha/slidercaptcha.css" rel="stylesheet" />
|
||||
<link href="~/css/theme.css" rel="stylesheet" asp-append-version="true" />
|
||||
<link href="~/css/login-footer.css" rel="stylesheet" asp-append-version="true" />
|
||||
<link href="~/css/login-blue.css" rel="stylesheet" asp-append-version="true" />
|
||||
}
|
||||
@section javascript {
|
||||
<environment include="Development">
|
||||
<script src="~/lib/twitter-bootstrap/js/bootstrap.bundle.js"></script>
|
||||
<script src="~/lib/validate/jquery.validate.js"></script>
|
||||
<script src="~/lib/validate/localization/messages_zh.js"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="~/lib/twitter-bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/lib/validate/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/validate/localization/messages_zh.min.js"></script>
|
||||
</environment>
|
||||
<script src="~/lib/captcha/longbow.slidercaptcha.js"></script>
|
||||
<script src="~/lib/longbow/longbow.common.js"></script>
|
||||
<script src="~/lib/longbow/longbow.validate.js"></script>
|
||||
<script src="~/js/login.js" asp-append-version="true"></script>
|
||||
}
|
||||
<div class="container-fluid">
|
||||
<div class="login-container">
|
||||
<section class="login-form">
|
||||
<div class="login-form-header">
|
||||
<h2>登录</h2>
|
||||
<span class="flex-self-end">
|
||||
没有帐号?
|
||||
<a href="#">点此注册</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="login-form-body">
|
||||
<form id="login" method="post" class="form-signin">
|
||||
<div class="login-wrap" data-toggle="LgbValidate" data-valid-button="button[type='submit']">
|
||||
<div id="loginUser" class="form-group">
|
||||
<input type="text" name="userName" class="form-control" data-toggle="tooltip" placeholder="用户名"
|
||||
maxlength="16" data-required-msg="请输入用户名" value="" autofocus data-valid="true" />
|
||||
</div>
|
||||
<div id="loginPwd" class="form-group">
|
||||
<input type="password" name="password" class="form-control" value="" data-toggle="tooltip"
|
||||
placeholder="密码" maxlength="16" autocomplete="off" data-required-msg="请输入密码" data-valid="true" />
|
||||
</div>
|
||||
<div>
|
||||
<div id="loginMobile" class="form-group d-none">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-user"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="tel" id="phone" name="phone" class="form-control digits" data-toggle="tooltip"
|
||||
placeholder="手机号码" minlength="11" maxlength="11" data-required-msg="请输入手机号码" value=""
|
||||
data-valid="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="loginSMS" class="form-group d-none">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="number" id="code" name="code" class="form-control digits" data-toggle="tooltip"
|
||||
disabled value="" placeholder="验证码" maxlength="4" data-required-msg="请输入验证码"
|
||||
data-valid="true" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" id="btnSendCode" class="btn btn-sms" data-toggle="tooltip"
|
||||
title="点击发送验证码">发送验证码</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="form-group rememberPwd" onselectstart="return false">
|
||||
<i class="fa fa-square-o"></i>
|
||||
<span>记住密码自动登录</span>
|
||||
<input id="remember" name="remember" type="hidden" value="false" />
|
||||
</div>
|
||||
<div asp-condition="@Model.AllowMobile">
|
||||
<a id="loginType" data-value="username" href="#" class="">短信验证登陆</a>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-lg btn-login btn-block" data-oauth="@Model.AllowOAuth" data-toggle="tooltip"
|
||||
title="不填写密码默认使用 Gitee 认证" type="submit">登 录</button>
|
||||
<div class="d-flex justify-content-center">
|
||||
<a class="forget-password" href="#">已有帐号,忘记密码?</a>
|
||||
</div>
|
||||
<div asp-condition="@Model.AllowOAuth">
|
||||
<div class="login-other">
|
||||
<span class="text-white">
|
||||
其他方式登录
|
||||
</span>
|
||||
</div>
|
||||
<div class="login-list">
|
||||
<div class="item">
|
||||
<a href="~/Account/Gitee" data-toggle="tooltip" title="使用 Gitee 帐号登录">
|
||||
<img class="item" src="~/images/gitee.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="~/Account/GitHub" data-toggle="tooltip" title="使用 GitHub 帐号登录">
|
||||
<img class="item" src="~/images/git.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="#" data-toggle="tooltip" title="微信-暂未实现">
|
||||
<img class="item" src="~/images/weixin-2.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="~/Account/Tencent" data-toggle="tooltip" title="使用 QQ 账号登录">
|
||||
<img class="item" src="~/images/qq-3.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="~/Account/Alipay" data-toggle="tooltip" title="使用支付宝账号登录">
|
||||
<img class="item" src="~/images/zhifubao-3.svg" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@await Html.PartialAsync("LoginFooter", Model)
|
||||
</div>
|
||||
<div class="modal fade" id="dialogNew" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
<div class="modal-content" data-toggle="LgbValidate" data-valid-button="#btnSubmit" data-valid-modal="#dialogNew">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel">新用户注册</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="userName">登录名称:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-user-plus"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="userName" autocomplete="off" class="form-control" placeholder="登录账号不可为空" userName="true" minlength="4" maxlength="16" remote="api/Register" data-remote-msg="此用户已存在" data-valid="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="displayName">显示名称:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-user-circle-o"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="displayName" class="form-control" value="" placeholder="显示名称不可为空" maxlength="20" data-valid="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">密码:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="password" id="password" class="form-control" value="" placeholder="密码不可为空" maxlength="16" data-valid="true" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="assurePassword">确认密码:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="password" id="assurePassword" class="form-control" value="" placeholder="确认密码" maxlength="16" equalTo="#password" data-valid="true" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description">申请理由:</label>
|
||||
<textarea id="description" class="form-control" placeholder="申请理由,500字以内" rows="3" maxlength="500" data-valid="true"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fa fa-times"></i>
|
||||
<span>关闭</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="btnSubmit">
|
||||
<i class="fa fa-save"></i>
|
||||
<span>提交</span>
|
||||
</button>
|
||||
<div class="slidercaptcha forgot reg card">
|
||||
<div class="card-header">
|
||||
<span>请完成安全验证</span>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="card-body"><div id="regcap"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="dialogForgot" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
<div class="modal-content" data-toggle="LgbValidate" data-valid-button="#btnForgot" data-valid-modal="#dialogForgot">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabelForgot">忘记密码</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="f_userName">登录账号:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-user-plus"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="f_userName" autocomplete="off" class="form-control" placeholder="登录账号不可为空" minlength="4" maxlength="16" data-valid="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="f_displayName">显示名称:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-user-circle-o"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="f_displayName" class="form-control" value="" placeholder="显示名称不可为空" maxlength="20" data-valid="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="f_desc">申请理由:</label>
|
||||
<textarea id="f_desc" class="form-control" placeholder="申请理由,500字以内" rows="3" maxlength="500" data-valid="true">我是用户XXX,我的手机号是XXXXXX,由于密码忘记,请将密码重置为123,登录后我自行更改,谢谢管理员</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fa fa-times"></i>
|
||||
<span>关闭</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger" id="btnForgot">
|
||||
<i class="fa fa-send-o"></i>
|
||||
<span>提交</span>
|
||||
</button>
|
||||
<div class="slidercaptcha forgot card">
|
||||
<div class="card-header">
|
||||
<span>请完成安全验证</span>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="card-body"><div id="forgotcap"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -133,27 +133,27 @@
|
|||
<div class="login-list">
|
||||
<div class="item">
|
||||
<a href="~/Account/Gitee" data-toggle="tooltip" title="使用 Gitee 帐号登录">
|
||||
<img class="item" src="../images/gitee.svg" />
|
||||
<img class="item" src="~/images/gitee.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="~/Account/GitHub" data-toggle="tooltip" title="使用 GitHub 帐号登录">
|
||||
<img class="item" src="../images/git.svg" />
|
||||
<img class="item" src="~/images/git.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="#" data-toggle="tooltip" title="微信-暂未实现">
|
||||
<img class="item" src="../images/weixin-2.svg" />
|
||||
<img class="item" src="~/images/weixin-2.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="~/Account/Tencent" data-toggle="tooltip" title="使用 QQ 账号登录">
|
||||
<img class="item" src="../images/qq.svg" />
|
||||
<img class="item" src="~/images/qq.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="~/Account/Alipay" data-toggle="tooltip" title="使用支付宝账号登录">
|
||||
<img class="item" src="../images/zhifubao.svg" />
|
||||
<img class="item" src="~/images/zhifubao.svg" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,275 @@
|
|||
@model LoginModel
|
||||
@{
|
||||
ViewBag.Title = Model.Title;
|
||||
Layout = "_Layout";
|
||||
}
|
||||
@section css {
|
||||
<environment include="Development">
|
||||
<link href="~/lib/twitter-bootstrap/css/bootstrap.css" rel="stylesheet" />
|
||||
<link href="~/lib/font-awesome/css/font-awesome.css" rel="stylesheet" />
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<link href="~/lib/twitter-bootstrap/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="~/lib/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
|
||||
</environment>
|
||||
<link href="~/lib/captcha/slidercaptcha.css" rel="stylesheet" />
|
||||
<link href="~/css/theme.css" rel="stylesheet" asp-append-version="true" />
|
||||
<link href="~/css/login-footer.css" rel="stylesheet" asp-append-version="true" />
|
||||
<link href="~/css/login-blue.css" rel="stylesheet" asp-append-version="true" />
|
||||
<link href="~/css/login-tec.css" rel="stylesheet" asp-append-version="true" />
|
||||
}
|
||||
@section javascript {
|
||||
<environment include="Development">
|
||||
<script src="~/lib/twitter-bootstrap/js/bootstrap.bundle.js"></script>
|
||||
<script src="~/lib/validate/jquery.validate.js"></script>
|
||||
<script src="~/lib/validate/localization/messages_zh.js"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="~/lib/twitter-bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/lib/validate/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/validate/localization/messages_zh.min.js"></script>
|
||||
</environment>
|
||||
<script src="~/lib/captcha/longbow.slidercaptcha.js"></script>
|
||||
<script src="~/lib/longbow/longbow.common.js"></script>
|
||||
<script src="~/lib/longbow/longbow.validate.js"></script>
|
||||
<script src="~/js/login.js" asp-append-version="true"></script>
|
||||
}
|
||||
<div class="container-fluid">
|
||||
<div class="login-container">
|
||||
<section class="login-form">
|
||||
<div class="login-form-header">
|
||||
<h2>登录</h2>
|
||||
<span class="flex-self-end">
|
||||
没有帐号?
|
||||
<a href="#">点此注册</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="login-form-body">
|
||||
<form id="login" method="post" class="form-signin">
|
||||
<div class="login-wrap" data-toggle="LgbValidate" data-valid-button="button[type='submit']">
|
||||
<div id="loginUser" class="form-group">
|
||||
<input type="text" name="userName" class="form-control" data-toggle="tooltip" placeholder="用户名"
|
||||
maxlength="16" data-required-msg="请输入用户名" value="" autofocus data-valid="true" />
|
||||
</div>
|
||||
<div id="loginPwd" class="form-group">
|
||||
<input type="password" name="password" class="form-control" value="" data-toggle="tooltip"
|
||||
placeholder="密码" maxlength="16" autocomplete="off" data-required-msg="请输入密码" data-valid="true" />
|
||||
</div>
|
||||
<div>
|
||||
<div id="loginMobile" class="form-group d-none">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-user"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="tel" id="phone" name="phone" class="form-control digits" data-toggle="tooltip"
|
||||
placeholder="手机号码" minlength="11" maxlength="11" data-required-msg="请输入手机号码" value=""
|
||||
data-valid="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="loginSMS" class="form-group d-none">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="number" id="code" name="code" class="form-control digits" data-toggle="tooltip"
|
||||
disabled value="" placeholder="验证码" maxlength="4" data-required-msg="请输入验证码"
|
||||
data-valid="true" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" id="btnSendCode" class="btn btn-sms" data-toggle="tooltip"
|
||||
title="点击发送验证码">发送验证码</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="form-group rememberPwd" onselectstart="return false">
|
||||
<i class="fa fa-square-o"></i>
|
||||
<span>记住密码自动登录</span>
|
||||
<input id="remember" name="remember" type="hidden" value="false" />
|
||||
</div>
|
||||
<div asp-condition="@Model.AllowMobile">
|
||||
<a id="loginType" data-value="username" href="#" class="">短信验证登陆</a>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-lg btn-login btn-block" data-oauth="@Model.AllowOAuth" data-toggle="tooltip"
|
||||
title="不填写密码默认使用 Gitee 认证" type="submit">登 录</button>
|
||||
<div class="d-flex justify-content-center">
|
||||
<a class="forget-password" href="#">已有帐号,忘记密码?</a>
|
||||
</div>
|
||||
<div asp-condition="@Model.AllowOAuth">
|
||||
<div class="login-other">
|
||||
<span class="text-white">
|
||||
其他方式登录
|
||||
</span>
|
||||
</div>
|
||||
<div class="login-list">
|
||||
<div class="item">
|
||||
<a href="~/Account/Gitee" data-toggle="tooltip" title="使用 Gitee 帐号登录">
|
||||
<img class="item" src="~/images/gitee.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="~/Account/GitHub" data-toggle="tooltip" title="使用 GitHub 帐号登录">
|
||||
<img class="item" src="~/images/git.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="#" data-toggle="tooltip" title="微信-暂未实现">
|
||||
<img class="item" src="~/images/weixin-2.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="~/Account/Tencent" data-toggle="tooltip" title="使用 QQ 账号登录">
|
||||
<img class="item" src="~/images/qq-3.svg" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="~/Account/Alipay" data-toggle="tooltip" title="使用支付宝账号登录">
|
||||
<img class="item" src="~/images/zhifubao-3.svg" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@await Html.PartialAsync("LoginFooter", Model)
|
||||
</div>
|
||||
<div class="modal fade" id="dialogNew" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
<div class="modal-content" data-toggle="LgbValidate" data-valid-button="#btnSubmit" data-valid-modal="#dialogNew">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel">新用户注册</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="userName">登录名称:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-user-plus"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="userName" autocomplete="off" class="form-control" placeholder="登录账号不可为空" userName="true" minlength="4" maxlength="16" remote="api/Register" data-remote-msg="此用户已存在" data-valid="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="displayName">显示名称:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-user-circle-o"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="displayName" class="form-control" value="" placeholder="显示名称不可为空" maxlength="20" data-valid="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">密码:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="password" id="password" class="form-control" value="" placeholder="密码不可为空" maxlength="16" data-valid="true" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="assurePassword">确认密码:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="password" id="assurePassword" class="form-control" value="" placeholder="确认密码" maxlength="16" equalTo="#password" data-valid="true" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description">申请理由:</label>
|
||||
<textarea id="description" class="form-control" placeholder="申请理由,500字以内" rows="3" maxlength="500" data-valid="true"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fa fa-times"></i>
|
||||
<span>关闭</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="btnSubmit">
|
||||
<i class="fa fa-save"></i>
|
||||
<span>提交</span>
|
||||
</button>
|
||||
<div class="slidercaptcha forgot reg card">
|
||||
<div class="card-header">
|
||||
<span>请完成安全验证</span>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="card-body"><div id="regcap"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="dialogForgot" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
<div class="modal-content" data-toggle="LgbValidate" data-valid-button="#btnForgot" data-valid-modal="#dialogForgot">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabelForgot">忘记密码</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="f_userName">登录账号:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-user-plus"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="f_userName" autocomplete="off" class="form-control" placeholder="登录账号不可为空" minlength="4" maxlength="16" data-valid="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="f_displayName">显示名称:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-user-circle-o"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="f_displayName" class="form-control" value="" placeholder="显示名称不可为空" maxlength="20" data-valid="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="f_desc">申请理由:</label>
|
||||
<textarea id="f_desc" class="form-control" placeholder="申请理由,500字以内" rows="3" maxlength="500" data-valid="true">我是用户XXX,我的手机号是XXXXXX,由于密码忘记,请将密码重置为123,登录后我自行更改,谢谢管理员</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fa fa-times"></i>
|
||||
<span>关闭</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger" id="btnForgot">
|
||||
<i class="fa fa-send-o"></i>
|
||||
<span>提交</span>
|
||||
</button>
|
||||
<div class="slidercaptcha forgot card">
|
||||
<div class="card-header">
|
||||
<span>请完成安全验证</span>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="card-body"><div id="forgotcap"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -3,7 +3,9 @@
|
|||
<ui class="login-footer-body">
|
||||
<li><a href="https://ba.sdgxgz.com"><i class="fa fa-copyright"></i> Bootstrap Admin</a></li>
|
||||
<li><a href="https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis" target="_blank">帮助文档</a></li>
|
||||
<li><a href="./Login?View=Login">系统默认</a></li>
|
||||
<li><a href="./Login?View=Login-Gitee">高仿码云</a></li>
|
||||
<li><a href="~/Account/Login?View=Login">系统默认</a></li>
|
||||
<li><a href="~/Account/Login?View=Login-Gitee">高仿码云</a></li>
|
||||
<li><a href="~/Account/Login?View=Login-Blue">蓝色简约</a></li>
|
||||
<li><a href="~/Account/Login?View=Login-Tec">科技动感</a></li>
|
||||
</ui>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,114 @@
|
|||
body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
border-color: #66afe9;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
|
||||
}
|
||||
|
||||
.login-wrap .rememberPwd i {
|
||||
width: 13px;
|
||||
}
|
||||
|
||||
.login-wrap .rememberPwd {
|
||||
cursor: pointer;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.container-fluid {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: url('../images/cover-bg.jpg');
|
||||
background-size: cover;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
box-shadow: 0px 20px 80px 0px rgba(0,0,0,0.3);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
padding: 44px 44px;
|
||||
font-size: 0.875rem;
|
||||
border: solid 1px #4f9fde;
|
||||
border-radius: 6px;
|
||||
width: 412px;
|
||||
}
|
||||
|
||||
.login-form-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.login-form-header h2 {
|
||||
margin-bottom: 0;
|
||||
font-size: 1.714rem;
|
||||
}
|
||||
|
||||
.login-other {
|
||||
display: table;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
margin: 0.25rem 0 0.825rem 0;
|
||||
}
|
||||
|
||||
.login-other:before, .login-other:after {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABaAAAAACCAYAAACuTHuKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1OThBRDY4OUNDMTYxMUU0OUE3NUVGOEJDMzMzMjE2NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1OThBRDY4QUNDMTYxMUU0OUE3NUVGOEJDMzMzMjE2NyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU5OEFENjg3Q0MxNjExRTQ5QTc1RUY4QkMzMzMyMTY3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU5OEFENjg4Q0MxNjExRTQ5QTc1RUY4QkMzMzMyMTY3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+VU513gAAADVJREFUeNrs0DENACAQBDBIWLGBJQby/mUcJn5sJXQmOQMAAAAAAJqt+2prAAAAAACg2xdgANk6BEVuJgyMAAAAAElFTkSuQmCC");
|
||||
content: '';
|
||||
display: table-cell;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
width: 50%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.login-other:before {
|
||||
background-position: right 1em top 50%;
|
||||
}
|
||||
|
||||
.login-other:after {
|
||||
background-position: left 1em top 50%;
|
||||
}
|
||||
|
||||
.login-list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.login-list .item {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.btn-login {
|
||||
color: #fff;
|
||||
background: #fe7300;
|
||||
}
|
||||
|
||||
.btn-login:hover {
|
||||
background: #f38d30;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.forget-password {
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
.login-footer .login-footer-body li a {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #fff;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
.container-fluid {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: url('../images/login-background.jpg');
|
||||
background-size: cover;
|
||||
color: #ffffff;
|
||||
}
|
After Width: | Height: | Size: 217 KiB |
After Width: | Height: | Size: 152 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 314 KiB |
After Width: | Height: | Size: 193 KiB |
After Width: | Height: | Size: 203 KiB |
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1584192865091" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4384" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M255.329734 650.325415c-21.48636-15.890922-19.573801-56.298214-5.658883-94.998631 14.027481-38.987966 49.364291-76.556607 49.762357-84.845387 1.402953-30.827099-3.044336-35.960003 0-44.056402 6.79066-18.155499 15.046694-11.189853 15.046694-20.594037 0-118.637004 88.145549-214.799134 196.883089-214.799134s196.915835 96.16213 196.915835 214.799134c0 4.542456 11.794627 0 17.46886 20.594037 1.14815 4.25593 1.944282 20.673855 0.575098 44.056402-0.669242 11.236925 29.965475 24.913413 45.777603 84.845387 15.827477 59.948347 0 88.207971-7.922437 94.998631-9.80225 8.400321-21.135366-6.16849-30.300097-20.769023-8.527211-13.643742-15.190981-27.288506-16.895809-22.092158-8.638751 26.140357-12.687974 43.626613-38.159088 72.110341-1.339508 1.51347 29.455869 12.655228 38.159088 36.373419 8.352225 22.7614 24.594141 58.823734-81.705883 70.1415-33.472346 3.538593-61.909002-6.28003-81.8164-16.066931-17.231453-8.487302-28.053939-16.983813-30.125111-16.807804-8.335852 0.732687-4.638647 0-13.580297 0-7.315616 0-7.794523 0.541329-14.6957 0-1.89721-0.127913-22.633486 32.874735-115.353215 32.874735-71.839165 0-90.472548-45.24446-75.998905-70.1415 14.440897-24.865317 38.573527-32.118512 35.161824-36.054147-16.736173-19.398816-28.275997-40.10337-35.161824-58.863642-1.722224-4.670369-3.155876-9.213849-4.272303-13.564947-1.258667-4.830005-6.551206 8.671497-14.121626 22.12388-6.471388 11.57257-14.632255 23.144116-23.335475 23.144116C259.808746 652.732232 257.560542 651.999544 255.329734 650.325415M63.865051 513.214664c0 247.156076 200.358237 447.506127 447.498964 447.506127 247.156076 0 447.498964-200.350051 447.498964-447.506127 0-247.140727-200.341864-447.498964-447.498964-447.498964C264.223289 65.715701 63.865051 266.073938 63.865051 513.214664" p-id="4385" fill="#137e0a"></path></svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1584192671861" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2809" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M230.4 576.512c-12.288 9.728-25.088 24.064-28.672 41.984-5.12 24.576-1.024 55.296 22.528 79.872 28.672 29.184 72.704 37.376 91.648 38.912 51.2 3.584 105.984-22.016 147.456-50.688 16.384-11.264 44.032-34.304 70.144-69.632-59.392-30.72-133.632-64.512-212.48-61.44-40.448 1.536-69.632 9.728-90.624 20.992z m752.64 135.68c26.112-61.44 40.96-129.024 40.96-200.192C1024 229.888 794.112 0 512 0S0 229.888 0 512s229.888 512 512 512c170.496 0 321.536-83.968 414.72-211.968-88.064-43.52-232.96-115.712-322.56-159.232-42.496 48.64-105.472 97.28-176.64 118.272-44.544 13.312-84.992 18.432-126.976 9.728-41.984-8.704-72.704-28.16-90.624-47.616-9.216-10.24-19.456-22.528-27.136-37.888 0.512 1.024 1.024 2.048 1.024 3.072 0 0-4.608-7.68-7.68-19.456-1.536-6.144-3.072-11.776-3.584-17.92-0.512-4.096-0.512-8.704 0-12.8-0.512-7.68 0-15.872 1.536-24.064 4.096-20.48 12.8-44.032 35.328-65.536 49.152-48.128 114.688-50.688 148.992-50.176 50.176 0.512 138.24 22.528 211.968 48.64 20.48-43.52 33.792-90.112 41.984-121.344h-307.2v-33.28h157.696v-66.56H272.384V302.08h190.464V235.52c0-9.216 2.048-16.384 16.384-16.384h74.752V302.08h207.36v33.28h-207.36v66.56h165.888s-16.896 92.672-68.608 184.32c115.2 40.96 278.016 104.448 331.776 125.952z" fill="#13227a" p-id="2810"></path></svg>
|
After Width: | Height: | Size: 1.6 KiB |
|
@ -21,6 +21,22 @@ namespace Bootstrap.Admin.Controllers
|
|||
client = factory.CreateClient(baseAddress);
|
||||
}
|
||||
|
||||
[InlineData("Login")]
|
||||
[InlineData("Login-Gitee")]
|
||||
[InlineData("Login-Blue")]
|
||||
[InlineData("Login-Green")]
|
||||
public async void Login_UI_Ok(string view)
|
||||
{
|
||||
var r = await client.GetAsync("/Account/Logout");
|
||||
Assert.True(r.IsSuccessStatusCode);
|
||||
var content = await r.Content.ReadAsStringAsync();
|
||||
Assert.Contains("登 录", content);
|
||||
|
||||
r = await client.GetAsync($"/Account/Login?AppId=BA&View={view}");
|
||||
content = await r.Content.ReadAsStringAsync();
|
||||
Assert.Contains("登 录", content);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async void Login_Empty()
|
||||
{
|
||||
|
|