Commit cda3b19c by java-lixy

页面初始化去掉小红圈

接口的IP地址改存前端传来的
parent cbbc0fc0
......@@ -85,16 +85,16 @@ public class FrontReportService extends CrudService<FrontReportDao,FrontReportEn
bean.setCreateDate(d);
bean.setUpdateDate(d);
String ip = StringUtils.getRemoteAddr(Servlets.getRequest());
/** 根据ip获得城市 */
String url = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=" + ip;
String ipResult = IpUtils.getURLContent(url).replace(";", "");
if (ipResult != "-2") {
IP2Regions json = JSON.parseObject(ipResult.split("=")[1], IP2Regions.class);
String city = json.getCity();
bean.setIpCity(city);
}
bean.setReportIp(ip);
// String ip = StringUtils.getRemoteAddr(Servlets.getRequest());
// /** 根据ip获得城市 */
// String url = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=" + ip;
// String ipResult = IpUtils.getURLContent(url).replace(";", "");
// if (ipResult != "-2") {
// IP2Regions json = JSON.parseObject(ipResult.split("=")[1], IP2Regions.class);
// String city = json.getCity();
// bean.setIpCity(city);
// }
// bean.setReportIp(ip);
//
// bean.setExchangeBeforeUser("");
......
......@@ -133,6 +133,7 @@
success: function(result) { //登录成功后返回的数据
if (result != "") {
$("#prompt").text(result);
$("#message").show();
}else {
$("#message").hide();
}
......@@ -210,7 +211,7 @@
<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>
<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>
</div>
</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