Merge branch 'master' of http://192.168.1.136:82/monitor_v3/hg-monitor-web
Showing
5 changed files
with
18 additions
and
8 deletions
@@ -11,7 +11,7 @@ layui.define(['sessions', 'form', 'common'],function (exports) { | @@ -11,7 +11,7 @@ layui.define(['sessions', 'form', 'common'],function (exports) { | ||
11 | , sessions = layui.sessions; | 11 | , sessions = layui.sessions; |
12 | 12 | ||
13 | var uuid = Math.uuid(); | 13 | var uuid = Math.uuid(); |
14 | - var lockNum = 10;//默认十次登录冻结 | 14 | + var lockNum = 5;//默认5次登录冻结,兼容天津 |
15 | //获取默认配置 | 15 | //获取默认配置 |
16 | $.ajax({ | 16 | $.ajax({ |
17 | url: '/config/getConfig', | 17 | url: '/config/getConfig', |
@@ -20,13 +20,15 @@ layui.define(['sessions', 'form', 'common'],function (exports) { | @@ -20,13 +20,15 @@ layui.define(['sessions', 'form', 'common'],function (exports) { | ||
20 | }, | 20 | }, |
21 | async: false, | 21 | async: false, |
22 | success(response) { | 22 | success(response) { |
23 | - lockNum = response.lockNum; | 23 | + if (response && response.lockNum){ //如果配置了锁定次数,则更新 |
24 | + lockNum = response.lockNum; | ||
25 | + } | ||
24 | } | 26 | } |
25 | }); | 27 | }); |
26 | 28 | ||
27 | //如果密码输入错误三次,第四次开启验证码 | 29 | //如果密码输入错误三次,第四次开启验证码 |
28 | if (sessionStorage.getItem("lockNum") && sessionStorage.getItem("lockNum") >= 3) { | 30 | if (sessionStorage.getItem("lockNum") && sessionStorage.getItem("lockNum") >= 3) { |
29 | - if (sessionStorage.getItem("lockNum") && sessionStorage.getItem("lockNum") > 5) { | 31 | + if (sessionStorage.getItem("lockNum") && sessionStorage.getItem("lockNum") > lockNum) { |
30 | layer.alert('账号已被锁定,请联系管理员!'); | 32 | layer.alert('账号已被锁定,请联系管理员!'); |
31 | } | 33 | } |
32 | //图形验证码 | 34 | //图形验证码 |
@@ -119,6 +121,14 @@ layui.define(['sessions', 'form', 'common'],function (exports) { | @@ -119,6 +121,14 @@ layui.define(['sessions', 'form', 'common'],function (exports) { | ||
119 | 121 | ||
120 | var loginErrorNum = sessionStorage.getItem("lockNum") && sessionStorage.getItem("lockNum") != null ? parseInt(sessionStorage.getItem("lockNum")) : 0; | 122 | var loginErrorNum = sessionStorage.getItem("lockNum") && sessionStorage.getItem("lockNum") != null ? parseInt(sessionStorage.getItem("lockNum")) : 0; |
121 | 123 | ||
124 | + //增加4-20位密码验证 joke add 20211214 | ||
125 | + form.verify({ | ||
126 | + password: function (d) { | ||
127 | + if (d.trim() <= 4) { | ||
128 | + return "密码最少4位" | ||
129 | + } | ||
130 | + } | ||
131 | + }); | ||
122 | form.on('submit(LAY-user-login-submit)', function (obj) { | 132 | form.on('submit(LAY-user-login-submit)', function (obj) { |
123 | login(obj); | 133 | login(obj); |
124 | return false; | 134 | return false; |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | </div> | 19 | </div> |
20 | <div class="layui-form-item"> | 20 | <div class="layui-form-item"> |
21 | <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="loginPswd"></label> | 21 | <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="loginPswd"></label> |
22 | - <input type="password" name="password" id="loginPswd" lay-verify="required" placeholder="密码" | 22 | + <input type="password" name="password" id="loginPswd" lay-verify="required|password" minlength="4" placeholder="密码" |
23 | class="layui-input"> | 23 | class="layui-input"> |
24 | </div> | 24 | </div> |
25 | <!--验证码--> | 25 | <!--验证码--> |
@@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
50 | width: 100%; | 50 | width: 100%; |
51 | height: 100%; | 51 | height: 100%; |
52 | position: absolute; | 52 | position: absolute; |
53 | - left: 0; | 53 | + left: 25px; |
54 | } | 54 | } |
55 | .ypt .item .ui_base { | 55 | .ypt .item .ui_base { |
56 | position: relative; | 56 | position: relative; |
@@ -83,7 +83,7 @@ | @@ -83,7 +83,7 @@ | ||
83 | height:100%; | 83 | height:100%; |
84 | text-align: center; | 84 | text-align: center; |
85 | background: url('/vue3/src/assets/images/zjdp/cloud-bg.png') no-repeat; | 85 | background: url('/vue3/src/assets/images/zjdp/cloud-bg.png') no-repeat; |
86 | - left: 100px; | 86 | + left: 125px; |
87 | top: 77px; | 87 | top: 77px; |
88 | } | 88 | } |
89 | .ypt .item .ball_c.HuaWeiCloud{ | 89 | .ypt .item .ball_c.HuaWeiCloud{ |
1 | -<div :style="{'height':'380px','padding':'6px'}"> | 1 | +<div :style="{'height':'350px','padding':'6px'}"> |
2 | <div style="text-align: left;margin-bottom: 10px;padding-left: 10px;font-weight: bold"> | 2 | <div style="text-align: left;margin-bottom: 10px;padding-left: 10px;font-weight: bold"> |
3 | <slot name="title"> | 3 | <slot name="title"> |
4 | 对比分析场景 | 4 | 对比分析场景 |
1 | -<el-dialog v-model="networkMonitorVisible" :title="titleName" width="60%" @close="closeDialog"> | 1 | +<el-dialog v-model="networkMonitorVisible" :title="titleName" width="90%" @close="closeDialog"> |
2 | <el-row v-if="!tableVisible"> | 2 | <el-row v-if="!tableVisible"> |
3 | <el-col :span="6"> | 3 | <el-col :span="6"> |
4 | <div class="grid-content bg-purple network-monitor-popup-left"> | 4 | <div class="grid-content bg-purple network-monitor-popup-left"> |
-
Please register or login to post a comment