Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
a79f6e6d
Commit
a79f6e6d
authored
Nov 24, 2019
by
季圣华
Browse files
完善注册的流程
parent
ff07d9d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
erp_web/js/modules/sys/sysIndex.js
View file @
a79f6e6d
...
...
@@ -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>
'
);
}
//广告循环
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
);
}
setInterval
(
function
()
{
autoChangeTip
();
},
10
*
1000
);
});
\ No newline at end of file
src/main/java/com/jsh/erp/controller/UserController.java
View file @
a79f6e6d
...
...
@@ -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
();
...
...
src/main/java/com/jsh/erp/service/log/LogService.java
View file @
a79f6e6d
...
...
@@ -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
);
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment