完善注册的流程

This commit is contained in:
季圣华
2019-11-24 22:00:45 +08:00
parent ff07d9d580
commit a79f6e6d21
3 changed files with 53 additions and 26 deletions

View File

@@ -416,21 +416,46 @@ $(function () {
location.href = '/user/logout';
}
});
})
});
//根据时间戳决定展示aliyun还是tencent
function autoChangeTip() {
var timestamp=new Date().getTime();
var checkShow = timestamp%2;
if(checkShow) {
$(".aliyun").show();
$(".tencent").hide();
} else {
$(".aliyun").hide();
$(".tencent").show();
}
toastr.options = {
"closeButton": true,
"debug": true,
"positionClass": "toast-bottom-right",
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "10000",
"extendedTimeOut": "1000",
"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);
}
});

View File

@@ -82,6 +82,7 @@ public class UserController {
//获取用户状态
int userStatus = -1;
try {
request.getSession().removeAttribute("tenantId");
userStatus = userService.validateUser(username, password);
} catch (Exception e) {
e.printStackTrace();

View File

@@ -149,20 +149,21 @@ public class LogService {
}
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{
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){
JshException.writeFail(logger, e);
}
}
}