| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401 |
- <?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:79:"D:\phpstudy_pro\WWW\minongyun\public/../application/admin\view\index\login.html";i:1709714141;s:69:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\meta.html";i:1709714141;s:71:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\script.html";i:1711415624;}*/ ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <meta name="renderer" content="webkit">
- <meta name="referrer" content="never">
- <meta name="robots" content="noindex, nofollow">
- <link rel="shortcut icon" href="/assets/img/favicon.ico" />
- <!-- Loading Bootstrap -->
- <link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
- <?php if(\think\Config::get('fastadmin.adminskin')): ?>
- <link href="/assets/css/skins/<?php echo \think\Config::get('fastadmin.adminskin'); ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
- <?php endif; ?>
- <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
- <!--[if lt IE 9]>
- <script src="/assets/js/html5shiv.js"></script>
- <script src="/assets/js/respond.min.js"></script>
- <![endif]-->
- <script type="text/javascript">
- var require = {
- config: <?php echo json_encode($config); ?>
- };
- </script>
- <style type="text/css">
- body {
- color: #999;
- background-color: #f1f4fd;
- background-size: cover;
- }
- a {
- color: #444;
- }
- .login-screen {
- max-width: 400px;
- padding: 0;
- margin: 100px auto 0 auto;
- }
- .login-screen .well {
- border-radius: 3px;
- -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
- background: rgba(255,255,255, 0.2);
- }
- @media (max-width: 767px) {
- .login-screen {
- padding: 0 20px;
- }
- }
- .profile-img-card {
- width: 100px;
- height: 100px;
- display: block;
- -moz-border-radius: 50%;
- -webkit-border-radius: 50%;
- border-radius: 50%;
- margin: 10px auto;
- /*border: 5px solid #fff;*/
- }
- .profile-name-card {
- text-align: center;
- }
- .login-head {
- background: #899fe1;
- }
- /* .login-form {
- padding: 40px 30px;
- position: relative;
- z-index: 99;
- }*/
- #login-form {
- margin-top: 20px;
- }
- #login-form .input-group {
- margin-bottom: 15px;
- }
- #login-form .form-control {
- font-size: 13px;
- }
- #sms{
- display: none;
- }
- .change_login{
- margin: 0 auto;
- text-align: center;
- /*padding-top: 20px;*/
- font-size: 20px;
- }
- #pass_login{
- color: #fff;
- text-decoration: underline;
- cursor:pointer
- }
- #sms_login{
- cursor:pointer;
- color:#333;
- }
- #sms_login:hover,#pass_login:hover{
- color: #fff;
- text-decoration: underline;
- }
- #captcha{
- margin-top: 20px;
- }
- #captcha .input-group {
- margin-bottom: 15px;
- }
- </style>
- <!--@formatter:off-->
- <?php if($background): ?>
- <style type="text/css">
- body{
- background-image: url('<?php echo $background; ?>');
- }
- </style>
- <?php endif; ?>
- <!--@formatter:on-->
- <script src="/assets/js/jquery.js"></script>
- </head>
- <body>
- <div class="container">
- <div class="login-wrapper">
- <div class="login-screen">
- <div class="well">
- <!-- <div class="login-head">-->
- <div class="change_login"><span id="pass_login">密码登录</span> | <span id="sms_login">验证码登录</span></div>
- <!-- <img src="/assets/img/login-head.png" style="width:100%;"/>-->
- <!-- </div>-->
- <div class="login-form" id="pass">
- <img id="profile-img" class="profile-img-card" src="/assets/img/avatar.png"/>
- <p id="profile-name" class="profile-name-card"></p>
- <form action="" method="post" id="login-form">
- <!--@AdminLoginFormBegin-->
- <div id="errtips" class="hide"></div>
- <?php echo token(); ?>
- <div class="input-group">
- <div class="input-group-addon"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></div>
- <input type="text" class="form-control" id="pd-form-username" placeholder="<?php echo __('Username'); ?>" name="username" autocomplete="off" value="" data-rule="<?php echo __('Username'); ?>:required;username"/>
- </div>
- <div class="input-group">
- <div class="input-group-addon"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span></div>
- <input type="password" class="form-control" id="pd-form-password" placeholder="<?php echo __('Password'); ?>" name="password" autocomplete="off" value="" data-rule="<?php echo __('Password'); ?>:required;password"/>
- </div>
- <!--@CaptchaBegin-->
- <?php if(\think\Config::get('fastadmin.login_captcha')): ?>
- <div class="input-group">
- <div class="input-group-addon"><span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></div>
- <input type="text" name="captcha" class="form-control" placeholder="<?php echo __('Captcha'); ?>" data-rule="<?php echo __('Captcha'); ?>:required;length(<?php echo \think\Config::get('captcha.length'); ?>)" autocomplete="off"/>
- <span class="input-group-addon" style="padding:0;border:none;cursor:pointer;">
- <img src="<?php echo rtrim('/', '/'); ?>/index.php?s=/captcha" width="100" height="30" onclick="this.src = '<?php echo rtrim('/', '/'); ?>/index.php?s=/captcha&r=' + Math.random();"/>
- </span>
- </div>
- <?php endif; ?>
- <!--@CaptchaEnd-->
- <div class="form-group checkbox">
- <label class="inline" for="keeplogin">
- <input type="checkbox" name="keeplogin" id="keeplogin" value="1"/>
- <?php echo __('Keep login'); ?>
- </label>
- </div>
- <div class="form-group">
- <button type="submit" class="btn btn-success btn-lg btn-block"><?php echo __('Sign in'); ?></button>
- </div>
- <!--@AdminLoginFormEnd-->
- </form>
- </div>
- <!-- 验证码登录 -->
- <div class="login-form" id="sms">
- <img id="profile-img" class="profile-img-card" src="/assets/img/avatar.png" />
- <p id="profile-name" class="profile-name-card"></p>
- <form action="" method="post" id="captcha">
- <div id="errtips" class="hide"></div>
- <?php echo token(); ?>
- <div class="input-group">
- <div class="input-group-addon"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></div>
- <input type="text" class="form-control" id="pd-form-mobile" placeholder="<?php echo __('Mobile'); ?>" name="mobile" autocomplete="off" value="" />
- <div class="input-group-addon" id="getcaptcha" style="cursor:pointer;"><span id="get-captcha"><?php echo __('Get captcha'); ?></span></div>
- </div>
- <div class="input-group">
- <div class="input-group-addon"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span></div>
- <input type="password" class="form-control" id="pd-form-Captcha" placeholder="<?php echo __('Captcha'); ?>" name="captcha" autocomplete="off" value="" />
- </div>
- <div class="form-group checkbox">
- <label class="inline" for="keeplogin">
- <input type="checkbox" name="keeplogin" id="keeplogin" value="1"/>
- <?php echo __('Keep login'); ?>
- </label>
- </div>
- <div class="form-group">
- <button type="submit" class="btn btn-success btn-lg btn-block"><?php echo __('Sign in'); ?></button>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- // 切换选项卡
- $("#sms_login").click(function(){
- $(this).css('display','inline-block').css('text-decoration','underline').css('color','#fff');
- $("#pass_login").css('text-decoration','none').css('color','#333');
- $("#sms").css('display','block');
- $("#pass").css('display','none');
- })
- $("#pass_login").click(function(){
- $(this).css('display','inline-block').css('text-decoration','underline').css('color','#fff');
- $("#sms_login").css('text-decoration','none').css('color','#333');
- $("#sms").css('display','none');
- $("#pass").css('display','block');
- })
- //手机号失焦
- $("#pd-form-mobile").blur(()=>{
- let mobile = $("#pd-form-mobile").val()
- localStorage.setItem("mobile", mobile);
- })
- var sec=60;
- var countdown
- //获取验证码
- $("#getcaptcha").click(()=>{
- if(sec !== 60){
- return false;
- }
- let mobile = $("#pd-form-mobile").val()
- let regExp = new RegExp("^1[3578]\\d{9}$");
- if(regExp.test(mobile)){
- $.post('index/getCaptcha',{mobile:mobile},(res)=>{
- console.log(res);
- })
- //立马触发,,防止暴力点击
- setTimeout(()=>{
- $("#get-captcha").html('60秒后重新获取');
- sec--;
- },0)
- }else{
- layer.confirm('请输入正确的手机号');
- }
- countdown = setInterval(()=>{
- $("#get-captcha").html(sec+'秒后重新获取');
- sec--;
- // console.log(sec);
- if(sec < 0){
- clearInterval(countdown);
- sec=60;
- $("#get-captcha").html("<?php echo __('Get captcha'); ?>");
- }
- },1000)
- })
- //如果有缓存,读缓存,,,方便用户密码错误后不用重新输入电话号
- $(function(){
- let mobile = localStorage.getItem("mobile");
- if(mobile){
- $("#pd-form-mobile").val(mobile)
- }
- });
- </script>
- <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
- <input type="hidden" value="<?php echo \think\Session::get('admin.username'); ?>" name="" id="username">
- <input type="hidden" value="<?php echo \think\Session::get('admin.company'); ?>" name="" id="company">
- <script>
- function watermark(element, config) {
- // 获取元素的坐标
- function getOffset(el) {
- if (el.offsetParent) {
- return {
- x: el.offsetLeft + getOffset(el.offsetParent).x,
- y: el.offsetTop + getOffset(el.offsetParent).y,
- };
- }
- return {
- x: el.offsetLeft,
- y: el.offsetTop,
- };
- }
- if (!element) return;
- // 默认配置
- const _config = {
- text1: '张三', //文本1
- text2: '13868686868', // 文本2
- start_x: 0, // x轴起始位置
- start_y: 0, // y轴起始位置
- space_x: 100, // x轴间距
- space_y: 50, // y轴间距
- width: 210, // 宽度
- height: 80, // 长度
- fontSize: 14, // 字体
- color: '#aaa', // 字色
- alpha: 0.4, // 透明度
- rotate: 15, // 倾斜度
- };
- // 替换默认配置
- if (arguments.length === 2 && typeof arguments[1] === "object") {
- const src = arguments[1] || {};
- for (let key in src) {
- if (src[key] && _config[key] && src[key] === _config[key]) {
- continue;
- } else if (src[key]) {
- _config[key] = src[key];
- }
- }
- }
- // 节点的总宽度
- const total_width = element.scrollWidth;
- // 节点的总高度
- const total_height = element.scrollHeight;
- // 创建文本碎片,用于包含所有的插入节点
- const mark = document.createDocumentFragment();
- // 水印节点的起始坐标
- const position = getOffset(element);
- let x = position.x + _config.start_x, y = position.y + _config.start_y;
- // 先循环y轴插入水印
- do {
- // 再循环x轴插入水印
- do {
- // 创建单个水印节点
- const item = document.createElement('div');
- item.className = 'watermark-item';
- // 设置节点的样式
- item.style.position = "absolute";
- item.style.zIndex = 99999;
- item.style.left = `${x}px`;
- item.style.top = `${y}px`;
- item.style.width = `${_config.width}px`;
- item.style.height = `${_config.height}px`;
- item.style.fontSize = `${_config.fontSize}px`;
- item.style.color = _config.color;
- item.style.textAlign = 'center';
- item.style.opacity = _config.alpha;
- item.style.filter = `alpha(opacity=${_config.alpha * 100})`;
- // item.style.filter = `opacity(${_config.alpha * 100}%)`;
- item.style.webkitTransform = `rotate(-${_config.rotate}deg)`;
- item.style.MozTransform = `rotate(-${_config.rotate}deg)`;
- item.style.msTransform = `rotate(-${_config.rotate}deg)`;
- item.style.OTransform = `rotate(-${_config.rotate}deg)`;
- item.style.transform = `rotate(-${_config.rotate}deg)`;
- item.style.pointerEvents = 'none'; //让水印不遮挡页面的点击事件
- // 创建text1水印节点
- const text1 = document.createElement('div');
- text1.appendChild(document.createTextNode(_config.text1));
- item.append(text1);
- // 创建text2水印节点
- const text2 = document.createElement('div');
- text2.appendChild(document.createTextNode(_config.text2));
- item.append(text2);
- // 添加水印节点到文本碎片
- mark.append(item);
- // x坐标递增
- x = x + _config.width + _config.space_x;
- // 超出文本右侧坐标停止插入
- } while (total_width + position.x > x + _config.width);
- // 重置x初始坐标
- x = position.x + _config.start_x;
- // y坐标递增
- y = y + _config.height + _config.space_y;
- // 超出文本底部坐标停止插入
- } while (total_height + position.y > y + _config.height);
- // 插入文档碎片
- element.append(mark);
- }
- var username = document.getElementById('username');
- var company = document.getElementById('company');
- //找到存放水印的盒子
- const element = document.getElementsByTagName('body')[0];
- watermark(element,{text1:username.value,text2:company.value});
- </script>
- </body>
- </html>
|