完善注册的流程
This commit is contained in:
@@ -416,21 +416,46 @@ $(function () {
|
|||||||
location.href = '/user/logout';
|
location.href = '/user/logout';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
//根据时间戳决定展示aliyun还是tencent
|
toastr.options = {
|
||||||
function autoChangeTip() {
|
"closeButton": true,
|
||||||
var timestamp=new Date().getTime();
|
"debug": true,
|
||||||
var checkShow = timestamp%2;
|
"positionClass": "toast-bottom-right",
|
||||||
if(checkShow) {
|
"onclick": null,
|
||||||
$(".aliyun").show();
|
"showDuration": "300",
|
||||||
$(".tencent").hide();
|
"hideDuration": "1000",
|
||||||
} else {
|
"timeOut": "10000",
|
||||||
$(".aliyun").hide();
|
"extendedTimeOut": "1000",
|
||||||
$(".tencent").show();
|
"showEasing": "swing",
|
||||||
}
|
"hideEasing": "linear",
|
||||||
|
"showMethod": "fadeIn",
|
||||||
|
"hideMethod": "fadeOut"
|
||||||
|
};
|
||||||
|
|
||||||
|
//消息弹窗
|
||||||
|
var loginName = sessionStorage.getItem("loginName");
|
||||||
|
if(loginName == "jsh") {
|
||||||
|
toastr.info('您当前正在使用测试账号,<br/>如需正式使用请注册 <a href="/register.html"><b>点击注册</b></a>');
|
||||||
}
|
}
|
||||||
setInterval(function () {
|
|
||||||
autoChangeTip();
|
//广告循环
|
||||||
},10*1000);
|
if(loginName == "jsh") {
|
||||||
|
//根据时间戳决定展示aliyun还是tencent
|
||||||
|
function autoChangeTip() {
|
||||||
|
var timestamp=new Date().getTime();
|
||||||
|
var checkShow = timestamp%2;
|
||||||
|
if(checkShow) {
|
||||||
|
$(".aliyun").show();
|
||||||
|
$(".tencent").hide();
|
||||||
|
} else {
|
||||||
|
$(".aliyun").hide();
|
||||||
|
$(".tencent").show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setInterval(function () {
|
||||||
|
autoChangeTip();
|
||||||
|
}, 10 * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -82,6 +82,7 @@ public class UserController {
|
|||||||
//获取用户状态
|
//获取用户状态
|
||||||
int userStatus = -1;
|
int userStatus = -1;
|
||||||
try {
|
try {
|
||||||
|
request.getSession().removeAttribute("tenantId");
|
||||||
userStatus = userService.validateUser(username, password);
|
userStatus = userService.validateUser(username, password);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -149,20 +149,21 @@ public class LogService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void insertLog(String moduleName, String type, HttpServletRequest request)throws Exception{
|
public void insertLog(String moduleName, String type, HttpServletRequest request)throws Exception{
|
||||||
Log log = new Log();
|
|
||||||
log.setUserid(getUserId(request));
|
|
||||||
log.setOperation(moduleName);
|
|
||||||
log.setClientip(getLocalIp(request));
|
|
||||||
log.setCreatetime(new Date());
|
|
||||||
Byte status = 0;
|
|
||||||
log.setStatus(status);
|
|
||||||
log.setContentdetails(type + moduleName);
|
|
||||||
try{
|
try{
|
||||||
logMapper.insertSelective(log);
|
Long userId = getUserId(request);
|
||||||
|
if(userId!=null) {
|
||||||
|
Log log = new Log();
|
||||||
|
log.setUserid(userId);
|
||||||
|
log.setOperation(moduleName);
|
||||||
|
log.setClientip(getLocalIp(request));
|
||||||
|
log.setCreatetime(new Date());
|
||||||
|
Byte status = 0;
|
||||||
|
log.setStatus(status);
|
||||||
|
log.setContentdetails(type + moduleName);
|
||||||
|
logMapper.insertSelective(log);
|
||||||
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user