Commit cda3b19c by java-lixy

页面初始化去掉小红圈

接口的IP地址改存前端传来的
parent cbbc0fc0
...@@ -85,16 +85,16 @@ public class FrontReportService extends CrudService<FrontReportDao,FrontReportEn ...@@ -85,16 +85,16 @@ public class FrontReportService extends CrudService<FrontReportDao,FrontReportEn
bean.setCreateDate(d); bean.setCreateDate(d);
bean.setUpdateDate(d); bean.setUpdateDate(d);
String ip = StringUtils.getRemoteAddr(Servlets.getRequest()); // String ip = StringUtils.getRemoteAddr(Servlets.getRequest());
/** 根据ip获得城市 */ // /** 根据ip获得城市 */
String url = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=" + ip; // String url = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=" + ip;
String ipResult = IpUtils.getURLContent(url).replace(";", ""); // String ipResult = IpUtils.getURLContent(url).replace(";", "");
if (ipResult != "-2") { // if (ipResult != "-2") {
IP2Regions json = JSON.parseObject(ipResult.split("=")[1], IP2Regions.class); // IP2Regions json = JSON.parseObject(ipResult.split("=")[1], IP2Regions.class);
String city = json.getCity(); // String city = json.getCity();
bean.setIpCity(city); // bean.setIpCity(city);
} // }
bean.setReportIp(ip); // bean.setReportIp(ip);
// //
// bean.setExchangeBeforeUser(""); // bean.setExchangeBeforeUser("");
......
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
success: function(result) { //登录成功后返回的数据 success: function(result) { //登录成功后返回的数据
if (result != "") { if (result != "") {
$("#prompt").text(result); $("#prompt").text(result);
$("#message").show();
}else { }else {
$("#message").hide(); $("#message").hide();
} }
...@@ -210,7 +211,7 @@ ...@@ -210,7 +211,7 @@
<c:if test="${empty menu.href}"> <c:if test="${empty menu.href}">
<a class="menu" href="javascript:" data-href="${ctx}/sys/menu/tree?parentId=${menu.id}" data-id="${menu.id}"><div style="position:relative;"><div><span>${menu.name}</span></div> <a class="menu" href="javascript:" data-href="${ctx}/sys/menu/tree?parentId=${menu.id}" data-id="${menu.id}"><div style="position:relative;"><div><span>${menu.name}</span></div>
<c:if test="${menu.name eq '工作台'}"> <c:if test="${menu.name eq '工作台'}">
<div id="message" style="position:absolute;right:-10px;top:-10px;width:15px; height:15px; background-color:#F00; border-radius:25px;"> <div id="message" style="position:absolute;right:-10px;top:-10px;width:15px; height:15px; background-color:#F00; border-radius:25px;display:none;">
<span id="prompt" style="height:15px; line-height:15px; display:block; color:#FFF; text-align:center"></span> <span id="prompt" style="height:15px; line-height:15px; display:block; color:#FFF; text-align:center"></span>
</div> </div>
</c:if></div></a> </c:if></div></a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment