Authored by 高磊

Merge branch 'wangfeng-500-dev' into 'master-500-dev'

涉及未处理的漏洞进行提示



See merge request !1244
@@ -57,9 +57,12 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions @@ -57,9 +57,12 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
57 , type: "get" 57 , type: "get"
58 , async: false 58 , async: false
59 , done: function (res) { 59 , done: function (res) {
  60 + // 如果有未读的漏洞则弹出未读漏洞信息
60 if(res.data && res.data.length > 0){ 61 if(res.data && res.data.length > 0){
61 list = res.data; 62 list = res.data;
62 vulnerabilityDialog(res.data) 63 vulnerabilityDialog(res.data)
  64 + }else{ // 提示有涉及但未处理的漏洞
  65 + countRelatedUnSolvevulnerability();
63 } 66 }
64 } 67 }
65 }); 68 });
@@ -83,7 +86,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions @@ -83,7 +86,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
83 ` 86 `
84 if (list.length>0){ 87 if (list.length>0){
85 layer.open({ 88 layer.open({
86 - title: ['漏洞咨询', 'font-size:20px;background-color: #d0ddec;display:flex;align-items: center; justify-content: flex-start;'], 89 + title: ['漏洞资讯', 'font-size:20px;background-color: #d0ddec;display:flex;align-items: center; justify-content: flex-start;'],
87 type: 1, 90 type: 1,
88 area: ['40%', '60%'], 91 area: ['40%', '60%'],
89 closeBtn:0, 92 closeBtn:0,
@@ -188,6 +191,18 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions @@ -188,6 +191,18 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
188 } 191 }
189 } 192 }
190 193
  194 + // 涉及但未处理的漏洞
  195 + function countRelatedUnSolvevulnerability() {
  196 + admin.req({
  197 + url: common.domainName + '/api-web/vulnerabilities/unsolve'
  198 + , type: "get"
  199 + , done: function (res) {
  200 + if(res.count > 0){
  201 + layer.msg('您有 '+res.count+" 条涉及漏洞未处理,请前往【漏洞管理】进行处理!", {icon: 7, time: 5000});
  202 + }
  203 + }
  204 + });
  205 + }
191 function checkPassword(pattern, oldPwd) { 206 function checkPassword(pattern, oldPwd) {
192 var msg = "密码安全等级过低,请修改密码"; 207 var msg = "密码安全等级过低,请修改密码";
193 var password = localStorage.getItem("password"); 208 var password = localStorage.getItem("password");