Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
syzy_se
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
管理员
syzy_se
Commits
dc76be73
Commit
dc76be73
authored
May 21, 2024
by
luoxin1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
82f3ae43
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
463 additions
and
6 deletions
+463
-6
pom.xml
pom.xml
+29
-2
MainApplication.java
src/main/java/com/spk/zyse/MainApplication.java
+1
-3
IndexController.java
src/main/java/com/spk/zyse/admin/IndexController.java
+210
-0
application.properties
src/main/resources/application.properties
+1
-1
error.html
src/main/resources/static/error.html
+111
-0
repeat.html
src/main/resources/static/repeat.html
+111
-0
No files found.
pom.xml
View file @
dc76be73
...
...
@@ -31,13 +31,40 @@
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-mail
</artifactId>
<version>
2.0.1.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
<version>
2.0.0.M8
</version>
</dependency>
<!-- axis -->
<dependency>
<groupId>
org.apache.axis
</groupId>
<artifactId>
axis
</artifactId>
<version>
1.4
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
<dependency>
<groupId>
wsdl4j
</groupId>
<artifactId>
wsdl4j
</artifactId>
<version>
1.6.2
</version>
</dependency>
<dependency>
<groupId>
javax.xml
</groupId>
<artifactId>
jaxrpc-api
</artifactId>
<version>
1.1
</version>
</dependency>
<dependency>
<groupId>
commons-discovery
</groupId>
<artifactId>
commons-discovery
</artifactId>
<version>
0.2
</version>
</dependency>
<dependency>
<groupId>
commons-logging
</groupId>
<artifactId>
commons-logging
</artifactId>
<version>
1.2
</version>
</dependency>
<!-- 重新覆盖mysql的版本,原因:虽然admin-core更新过mysql版本,但由于parent是admin-cloud,导致更新的版本失效 -->
<dependency>
<groupId>
mysql
</groupId>
...
...
src/main/java/com/spk/zyse/MainApplication.java
View file @
dc76be73
...
...
@@ -2,8 +2,6 @@ package com.spk.zyse;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration
;
import
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.context.annotation.ComponentScan
;
...
...
@@ -20,7 +18,7 @@ import org.springframework.web.WebApplicationInitializer;
public
class
MainApplication
extends
SpringBootServletInitializer
implements
WebApplicationInitializer
{
public
static
void
main
(
String
[]
args
)
{
System
.
setProperty
(
"spring.devtools.restart.enabled"
,
"false"
);
SpringApplication
.
run
(
MainApplication
.
class
,
args
);
}
...
...
src/main/java/com/spk/zyse/admin/IndexController.java
View file @
dc76be73
package
com
.
spk
.
zyse
.
admin
;
import
java.io.ByteArrayInputStream
;
import
java.io.StringReader
;
import
java.io.UnsupportedEncodingException
;
import
java.rmi.RemoteException
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.xml.namespace.QName
;
import
javax.xml.parsers.DocumentBuilder
;
import
javax.xml.parsers.DocumentBuilderFactory
;
import
javax.xml.rpc.ParameterMode
;
import
javax.xml.rpc.ServiceException
;
import
org.apache.axis.client.Call
;
import
org.apache.axis.client.Service
;
import
org.apache.axis.encoding.XMLType
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -12,6 +24,10 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.w3c.dom.Document
;
import
org.w3c.dom.Element
;
import
org.w3c.dom.Node
;
import
org.w3c.dom.NodeList
;
import
com.spk.admin.core.annotation.Function
;
import
com.spk.admin.core.entity.CoreOrg
;
...
...
@@ -203,4 +219,198 @@ private static final String MODEL = "/zy";
}
return
new
ModelAndView
(
"/loginV3.html"
);
}
//单点登录测试-20240517
//@RequestMapping(MODEL+"/singLogin1.json")
//@ResponseBody
public
String
singLogin
(
String
sessionId
)
{
String
result
=
""
;
try
{
//String endpoint = "http://192.168.51.24/soap/JHIPLIB.SOAP.BS.HL7V3Service.cls?CfgItem=JH0001新增患者信息服务";
String
endpoint
=
"http://192.168.51.24/soap/JHIPLIB.SOAP.BS.HL7V3Service.cls?CfgItem=JH1105单点登录对接服务"
;
String
[]
subStrs
=
endpoint
.
split
(
"="
);
String
url
=
""
;
String
subStr
=
""
;
url
=
subStrs
[
0
];
if
(
subStrs
.
length
>
1
){
subStr
=
getURLEncoderString
(
subStrs
[
1
]);
}
endpoint
=
url
+
"="
+
subStr
;
Service
service
=
new
Service
();
Call
call
=
null
;
try
{
call
=
(
Call
)
service
.
createCall
();
}
catch
(
ServiceException
e
)
{
}
call
.
setTargetEndpointAddress
(
endpoint
);
call
.
setOperationName
(
new
QName
(
"http://goodwillcis.com"
,
"HIPMessageServer"
));
call
.
addParameter
(
"Message"
,
XMLType
.
XSD_STRING
,
ParameterMode
.
IN
);
//接口的参数
call
.
setReturnType
(
XMLType
.
XSD_STRING
);
//设置返回类型
try
{
result
=
(
String
)
call
.
invoke
(
new
Object
[]{
"<REQUEST>\r\n"
+
"<SESSION_ID>"
+
sessionId
+
"</SESSION_ID>\r\n"
+
"<SYSTEM_CODE>kygl</SYSTEM_CODE>\r\n"
+
"</REQUEST>"
});
System
.
err
.
println
(
result
);
}
catch
(
RemoteException
e
)
{
e
.
printStackTrace
();
result
=
e
.
getMessage
();
System
.
err
.
println
(
result
);
}
}
catch
(
Exception
e
)
{
System
.
err
.
println
(
e
.
toString
());
}
return
result
;
}
public
static
String
getURLEncoderString
(
String
str
)
{
String
result
=
""
;
if
(
null
==
str
)
{
return
""
;
}
try
{
result
=
java
.
net
.
URLEncoder
.
encode
(
str
,
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
return
result
;
}
//单点登录处理
@RequestMapping
(
MODEL
+
"/singloginAjax.do"
)
@ResponseBody
public
ModelAndView
singloginAjax
(
boolean
forceLogin
,
HttpServletRequest
request
,
String
token
)
{
String
[]
code
=
null
;
//String username = null;
String
password
=
null
;
String
loginType
=
null
;
int
serverPort
=
request
.
getServerPort
();
//获取集成平台信息
String
xmlcontent
=
singLogin
(
token
);
// String username="";
String
username
=
parseXml
(
xmlcontent
,
"USER_CODE"
);
//-----------------------------------------
try
{
//将ca加密值分解,
/* if(KEYDATA!=null) {
code = KEYDATA.split(",");
username = code[0];
password = code[1];
loginType = code[2];
}*/
CoreUser
coreUser
=
null
;
UserLoginInfo
info
=
null
;
//ca登录,检验ca加密值随机数
/*if("1".equals(loginType)) {
String strClientCert = code[3];
String strRandom = code[4];
String UserSignedData = code[5];
String strCertEntityID;
SecurityEngineDeal sed = SecurityEngineDeal.getInstance("SVSDefault");
//校验不通过则整数验证错误
if(sed.validateCert(strClientCert) == 1 && sed.verifySignedData(strClientCert, strRandom.getBytes(), sed.base64Decode(UserSignedData))){
strCertEntityID = code[6];
}else {
loginRecordService.loginFailed(request,username,true);
return JsonResult.failMessage("证书验证错误");
}
//根据证书序列号获取用户
coreUser = userService.getUsersByKeyNum(strCertEntityID);
if(null == coreUser) {
loginRecordService.loginFailed(request,username,true);
return JsonResult.failMessage("证书对应用户不存在");
}
username = coreUser.getCode();
//证书登录
info = userService.loginByKey(coreUser);
}else {}*/
//登录记录检查
String
loginCheckResult
=
loginRecordService
.
checkUserLoginRecord
(
username
);
/*if(StringUtils.isNotEmpty(loginCheckResult)&&loginCheckResult.indexOf("重新登录")!=-1) {
return JsonResult.failMessage(loginCheckResult);
}*/
CoreUser
user1
=
userService
.
getUserByCode
(
username
);
//info = userService.login(username, password);
info
=
userService
.
login
(
user1
.
getCode
(),
user1
.
getPassword
());
/*if(!info.isLoginPassed()&&StringUtils.isNotEmpty(info.getErrorMsg())) {
//loginRecordService.loginFailed(request,username,true);
return JsonResult.failMessage(info.getErrorMsg());
}*/
/*if(!info.isLoginPassed()&&StringUtils.isEmpty(info.getErrorMsg())){
return JsonResult.failMessage(loginRecordService.loginFailed(request,username,false));
}*/
CoreUser
user
=
info
.
getUser
();
CoreOrg
currentOrg
=
info
.
getOrgs
().
get
(
0
);
for
(
CoreOrg
org
:
info
.
getOrgs
())
{
if
(
org
.
getId
()
==
user
.
getOrgId
())
{
currentOrg
=
org
;
break
;
}
}
info
.
setCurrentOrg
(
currentOrg
);
//补充一些额外信息
user
.
set
(
"currentOrg"
,
currentOrg
.
getName
());
user
.
set
(
"loginIp"
,
httpRequestLocal
.
getIpAddr
(
request
));
user
.
set
(
"loginTime"
,
DateUtil
.
now
(
"yyyy-MM-dd HH:mm:ss"
));
user
.
set
(
"sessionId"
,
request
.
getSession
().
getId
());
// 记录登录信息到session
//强制登录
if
(
httpSessionManager
.
addLoginUser
(
info
.
getUser
(),
request
.
getSession
(),
forceLogin
))
{
this
.
platformService
.
setLoginUser
(
info
.
getUser
(),
info
.
getCurrentOrg
(),
info
.
getOrgs
());
loginRecordService
.
loginSucceed
(
request
,
username
);
/*JsonResult ret = new JsonResult();
ret.setCode("0");
ret.setMsg("登录成功!");
return ret;*/
return
new
ModelAndView
(
"redirect:/index.do"
);
}
else
{
/*JsonResult ret = new JsonResult();
ret.setCode("1000");
ret.setMsg("该用户已经在别处登录,您无法重复登录!");
//loginRecordService.loginFailed(request,username);
return ret;*/
return
new
ModelAndView
(
"redirect:/repeat.html"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
loginRecordService
.
loginFailed
(
request
,
username
,
true
);
return
new
ModelAndView
(
"redirect:/error.html"
);
}
}
//解析xml
@RequestMapping
(
MODEL
+
"/singLogin.json"
)
@ResponseBody
public
String
parseXml
(
String
xmlContent
,
String
USER_CODE
)
{
/*String xmlContent = "<RESPONSE><RESULT_CODE>true</RESULT_CODE><RESULT_CONTENT>成功</RESULT_CONTENT><RESULT_INFO><USER_CODE>BSSA</USER_CODE><USER_NAME>管理员</USER_NAME><USER_LOGIN_NAME>BSSA</USER_LOGIN_NAME><USER_SEX>其他</USER_SEX><USER_BIRTH/><USER_IDCARD/><USER_DEPT_CODE/><USER_DEPT_NAME/><USER_FUNCTION/><USER_PROPERTY/><USER_PHONE/><USER_LOGIN_TIME>2024-05-21 10:52:45.0</USER_LOGIN_TIME><START_TIME>2023-05-31 00:00:00.0</START_TIME><STOP_TIME>2025-05-31 00:00:00.0</STOP_TIME></RESULT_INFO></RESPONSE>";
String USER_CODE="USER_CODE";*/
try
{
DocumentBuilderFactory
factory
=
DocumentBuilderFactory
.
newInstance
();
DocumentBuilder
builder
=
factory
.
newDocumentBuilder
();
Document
document
=
builder
.
parse
(
new
ByteArrayInputStream
(
xmlContent
.
getBytes
(
"UTF-8"
)));
Element
rootElement
=
document
.
getDocumentElement
();
NodeList
resultInfoList
=
rootElement
.
getElementsByTagName
(
"RESULT_INFO"
);
for
(
int
i
=
0
;
i
<
resultInfoList
.
getLength
();
i
++)
{
Node
resultInfoNode
=
resultInfoList
.
item
(
i
);
if
(
resultInfoNode
.
getNodeType
()
==
Node
.
ELEMENT_NODE
)
{
Element
resultInfoElement
=
(
Element
)
resultInfoNode
;
System
.
out
.
println
(
"USER_CODE: "
+
resultInfoElement
.
getElementsByTagName
(
"USER_CODE"
).
item
(
0
).
getTextContent
());
USER_CODE
=
resultInfoElement
.
getElementsByTagName
(
USER_CODE
).
item
(
0
).
getTextContent
();
/*System.out.println("USER_NAME: " + resultInfoElement.getElementsByTagName("USER_NAME").item(0).getTextContent());
System.out.println("USER_LOGIN_NAME: " + resultInfoElement.getElementsByTagName("USER_LOGIN_NAME").item(0).getTextContent());
System.out.println("USER_SEX: " + resultInfoElement.getElementsByTagName("USER_SEX").item(0).getTextContent());
System.out.println("USER_LOGIN_TIME: " + resultInfoElement.getElementsByTagName("USER_LOGIN_TIME").item(0).getTextContent());
System.out.println("START_TIME: " + resultInfoElement.getElementsByTagName("START_TIME").item(0).getTextContent());
System.out.println("STOP_TIME: " + resultInfoElement.getElementsByTagName("STOP_TIME").item(0).getTextContent());*/
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
//}
//}
return
USER_CODE
;
}
}
src/main/resources/application.properties
View file @
dc76be73
...
...
@@ -62,7 +62,7 @@ server.session.cookie.http-only=false
#是否开启session超时检测
session.checkLoginEnable
=
true
#session拦截器会忽略这些地址
session.ExcludePathPatterns
=
/,/login.do,/logout.do,/getRandom.do,/zy/loginAjax.do,/reLogin.do,/remind,/checkUserOnline,/loginRegister.do,/loginPassword.do,/loginPasswords.do,/register.json
session.ExcludePathPatterns
=
/,/login.do,/logout.do,/getRandom.do,/zy/loginAjax.do,/reLogin.do,/remind,/checkUserOnline,/loginRegister.do,/loginPassword.do,/loginPasswords.do,/register.json
,/zy/singLogin.json,/zy/singloginAjax.do,/error.html,/repeat.html
#session拦截器只检测这些请求后缀
session.PathPatterns
=
.json,.do,.html
...
...
src/main/resources/static/error.html
0 → 100644
View file @
dc76be73
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
404
</title>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
http-equiv=
"Access-Control-Allow-Origin"
content=
"*"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"format-detection"
content=
"telephone=no"
>
<link
rel=
"stylesheet"
href=
"../lib/layui-v2.6.3/css/layui.css"
media=
"all"
>
<style>
.error
.clip
.shadow
{
height
:
180px
;}
.error
.clip
:nth-of-type
(
2
)
.shadow
{
width
:
130px
;}
.error
.clip
:nth-of-type
(
1
)
.shadow
,
.error
.clip
:nth-of-type
(
3
)
.shadow
{
width
:
250px
;}
.error
.digit
{
width
:
150px
;
height
:
150px
;
line-height
:
150px
;
font-size
:
120px
;
font-weight
:
bold
;}
.error
h2
{
font-size
:
32px
;}
.error
.msg
{
top
:
-190px
;
left
:
30%
;
width
:
80px
;
height
:
80px
;
line-height
:
80px
;
font-size
:
32px
;}
.error
span
.triangle
{
top
:
70%
;
right
:
0%
;
border-left
:
20px
solid
#535353
;
border-top
:
15px
solid
transparent
;
border-bottom
:
15px
solid
transparent
;}
.error
.container-error-404
{
top
:
50%
;
margin-top
:
250px
;
position
:
relative
;
height
:
250px
;
padding-top
:
40px
;}
.error
.container-error-404
.clip
{
display
:
inline-block
;
transform
:
skew
(
-45deg
);}
.error
.clip
.shadow
{
overflow
:
hidden
;}
.error
.clip
:nth-of-type
(
2
)
.shadow
{
overflow
:
hidden
;
position
:
relative
;
box-shadow
:
inset
20px
0px
20px
-15px
rgba
(
150
,
150
,
150
,
0.8
),
20px
0px
20px
-15px
rgba
(
150
,
150
,
150
,
0.8
);}
.error
.clip
:nth-of-type
(
3
)
.shadow
:after
,
.error
.clip
:nth-of-type
(
1
)
.shadow
:after
{
content
:
""
;
position
:
absolute
;
right
:
-8px
;
bottom
:
0px
;
z-index
:
9999
;
height
:
100%
;
width
:
10px
;
background
:
linear-gradient
(
90deg
,
transparent
,
rgba
(
173
,
173
,
173
,
0.8
),
transparent
);
border-radius
:
50%
;}
.error
.clip
:nth-of-type
(
3
)
.shadow
:after
{
left
:
-8px
;}
.error
.digit
{
position
:
relative
;
top
:
8%
;
color
:
white
;
background
:
#1E9FFF
;
border-radius
:
50%
;
display
:
inline-block
;
transform
:
skew
(
45deg
);}
.error
.clip
:nth-of-type
(
2
)
.digit
{
left
:
-10%
;}
.error
.clip
:nth-of-type
(
1
)
.digit
{
right
:
-20%
;}
.error
.clip
:nth-of-type
(
3
)
.digit
{
left
:
-20%
;}
.error
h2
{
font-size
:
24px
;
color
:
#A2A2A2
;
font-weight
:
bold
;
padding-bottom
:
20px
;}
.error
.tohome
{
font-size
:
16px
;
color
:
#07B3F9
;}
.error
.msg
{
position
:
relative
;
z-index
:
9999
;
display
:
block
;
background
:
#535353
;
color
:
#A2A2A2
;
border-radius
:
50%
;
font-style
:
italic
;}
.error
.triangle
{
position
:
absolute
;
z-index
:
999
;
transform
:
rotate
(
45deg
);
content
:
""
;
width
:
0
;
height
:
0
;}
@media
(
max-width
:
767px
)
{
.error
.clip
.shadow
{
height
:
100px
;}
.error
.clip
:nth-of-type
(
2
)
.shadow
{
width
:
80px
;}
.error
.clip
:nth-of-type
(
1
)
.shadow
,
.error
.clip
:nth-of-type
(
3
)
.shadow
{
width
:
100px
;}
.error
.digit
{
width
:
80px
;
height
:
80px
;
line-height
:
80px
;
font-size
:
52px
;}
.error
h2
{
font-size
:
18px
;}
.error
.msg
{
top
:
-110px
;
left
:
15%
;
width
:
40px
;
height
:
40px
;
line-height
:
40px
;
font-size
:
18px
;}
.error
span
.triangle
{
top
:
70%
;
right
:
-3%
;
border-left
:
10px
solid
#535353
;
border-top
:
8px
solid
transparent
;
border-bottom
:
8px
solid
transparent
;}
.error
.container-error-404
{
height
:
150px
;}
}
</style>
</head>
<body>
<div
class=
"error"
>
<div
class=
"container-floud"
>
<div
style=
"text-align: center"
>
<!-- <div class="container-error-404">
<div class="clip">
<div class="shadow">
<span class="digit thirdDigit"></span>
</div>
</div>
<div class="clip">
<div class="shadow">
<span class="digit secondDigit"></span>
</div>
</div>
<div class="clip">
<div class="shadow">
<span class="digit firstDigit"></span>
</div>
</div>
<div class="msg">OH!
<span class="triangle"></span>
</div>
</div> -->
<h2
class=
"h1"
>
服务器内部错误,请稍后重新登录!
</h2>
</div>
</div>
</div>
<script
src=
"../lib/layui-v2.6.3/layui.js"
charset=
"utf-8"
></script>
<script>
function
randomNum
()
{
return
Math
.
floor
(
Math
.
random
()
*
9
)
+
1
;
}
var
loop1
,
loop2
,
loop3
,
time
=
30
,
i
=
0
,
number
;
loop3
=
setInterval
(
function
()
{
if
(
i
>
40
)
{
clearInterval
(
loop3
);
document
.
querySelector
(
'.thirdDigit'
).
textContent
=
4
;
}
else
{
document
.
querySelector
(
'.thirdDigit'
).
textContent
=
randomNum
();
i
++
;
}
},
time
);
loop2
=
setInterval
(
function
()
{
if
(
i
>
80
)
{
clearInterval
(
loop2
);
document
.
querySelector
(
'.secondDigit'
).
textContent
=
0
;
}
else
{
document
.
querySelector
(
'.secondDigit'
).
textContent
=
randomNum
();
i
++
;
}
},
time
);
loop1
=
setInterval
(
function
()
{
if
(
i
>
100
)
{
clearInterval
(
loop1
);
document
.
querySelector
(
'.firstDigit'
).
textContent
=
4
;
}
else
{
document
.
querySelector
(
'.firstDigit'
).
textContent
=
randomNum
();
i
++
;
}
},
time
);
</script>
</body>
</html>
\ No newline at end of file
src/main/resources/static/repeat.html
0 → 100644
View file @
dc76be73
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
404
</title>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
http-equiv=
"Access-Control-Allow-Origin"
content=
"*"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"format-detection"
content=
"telephone=no"
>
<link
rel=
"stylesheet"
href=
"../lib/layui-v2.6.3/css/layui.css"
media=
"all"
>
<style>
.error
.clip
.shadow
{
height
:
180px
;}
.error
.clip
:nth-of-type
(
2
)
.shadow
{
width
:
130px
;}
.error
.clip
:nth-of-type
(
1
)
.shadow
,
.error
.clip
:nth-of-type
(
3
)
.shadow
{
width
:
250px
;}
.error
.digit
{
width
:
150px
;
height
:
150px
;
line-height
:
150px
;
font-size
:
120px
;
font-weight
:
bold
;}
.error
h2
{
font-size
:
32px
;}
.error
.msg
{
top
:
-190px
;
left
:
30%
;
width
:
80px
;
height
:
80px
;
line-height
:
80px
;
font-size
:
32px
;}
.error
span
.triangle
{
top
:
70%
;
right
:
0%
;
border-left
:
20px
solid
#535353
;
border-top
:
15px
solid
transparent
;
border-bottom
:
15px
solid
transparent
;}
.error
.container-error-404
{
top
:
50%
;
margin-top
:
250px
;
position
:
relative
;
height
:
250px
;
padding-top
:
40px
;}
.error
.container-error-404
.clip
{
display
:
inline-block
;
transform
:
skew
(
-45deg
);}
.error
.clip
.shadow
{
overflow
:
hidden
;}
.error
.clip
:nth-of-type
(
2
)
.shadow
{
overflow
:
hidden
;
position
:
relative
;
box-shadow
:
inset
20px
0px
20px
-15px
rgba
(
150
,
150
,
150
,
0.8
),
20px
0px
20px
-15px
rgba
(
150
,
150
,
150
,
0.8
);}
.error
.clip
:nth-of-type
(
3
)
.shadow
:after
,
.error
.clip
:nth-of-type
(
1
)
.shadow
:after
{
content
:
""
;
position
:
absolute
;
right
:
-8px
;
bottom
:
0px
;
z-index
:
9999
;
height
:
100%
;
width
:
10px
;
background
:
linear-gradient
(
90deg
,
transparent
,
rgba
(
173
,
173
,
173
,
0.8
),
transparent
);
border-radius
:
50%
;}
.error
.clip
:nth-of-type
(
3
)
.shadow
:after
{
left
:
-8px
;}
.error
.digit
{
position
:
relative
;
top
:
8%
;
color
:
white
;
background
:
#1E9FFF
;
border-radius
:
50%
;
display
:
inline-block
;
transform
:
skew
(
45deg
);}
.error
.clip
:nth-of-type
(
2
)
.digit
{
left
:
-10%
;}
.error
.clip
:nth-of-type
(
1
)
.digit
{
right
:
-20%
;}
.error
.clip
:nth-of-type
(
3
)
.digit
{
left
:
-20%
;}
.error
h2
{
font-size
:
24px
;
color
:
#A2A2A2
;
font-weight
:
bold
;
padding-bottom
:
20px
;}
.error
.tohome
{
font-size
:
16px
;
color
:
#07B3F9
;}
.error
.msg
{
position
:
relative
;
z-index
:
9999
;
display
:
block
;
background
:
#535353
;
color
:
#A2A2A2
;
border-radius
:
50%
;
font-style
:
italic
;}
.error
.triangle
{
position
:
absolute
;
z-index
:
999
;
transform
:
rotate
(
45deg
);
content
:
""
;
width
:
0
;
height
:
0
;}
@media
(
max-width
:
767px
)
{
.error
.clip
.shadow
{
height
:
100px
;}
.error
.clip
:nth-of-type
(
2
)
.shadow
{
width
:
80px
;}
.error
.clip
:nth-of-type
(
1
)
.shadow
,
.error
.clip
:nth-of-type
(
3
)
.shadow
{
width
:
100px
;}
.error
.digit
{
width
:
80px
;
height
:
80px
;
line-height
:
80px
;
font-size
:
52px
;}
.error
h2
{
font-size
:
18px
;}
.error
.msg
{
top
:
-110px
;
left
:
15%
;
width
:
40px
;
height
:
40px
;
line-height
:
40px
;
font-size
:
18px
;}
.error
span
.triangle
{
top
:
70%
;
right
:
-3%
;
border-left
:
10px
solid
#535353
;
border-top
:
8px
solid
transparent
;
border-bottom
:
8px
solid
transparent
;}
.error
.container-error-404
{
height
:
150px
;}
}
</style>
</head>
<body>
<div
class=
"error"
>
<div
class=
"container-floud"
>
<div
style=
"text-align: center"
>
<!-- <div class="container-error-404">
<div class="clip">
<div class="shadow">
<span class="digit thirdDigit"></span>
</div>
</div>
<div class="clip">
<div class="shadow">
<span class="digit secondDigit"></span>
</div>
</div>
<div class="clip">
<div class="shadow">
<span class="digit firstDigit"></span>
</div>
</div>
<div class="msg">OH!
<span class="triangle"></span>
</div>
</div> -->
<h2
class=
"h1"
>
该用户已经在别处登录,您无法重复登录!
</h2>
</div>
</div>
</div>
<script
src=
"../lib/layui-v2.6.3/layui.js"
charset=
"utf-8"
></script>
<script>
function
randomNum
()
{
return
Math
.
floor
(
Math
.
random
()
*
9
)
+
1
;
}
var
loop1
,
loop2
,
loop3
,
time
=
30
,
i
=
0
,
number
;
loop3
=
setInterval
(
function
()
{
if
(
i
>
40
)
{
clearInterval
(
loop3
);
document
.
querySelector
(
'.thirdDigit'
).
textContent
=
4
;
}
else
{
document
.
querySelector
(
'.thirdDigit'
).
textContent
=
randomNum
();
i
++
;
}
},
time
);
loop2
=
setInterval
(
function
()
{
if
(
i
>
80
)
{
clearInterval
(
loop2
);
document
.
querySelector
(
'.secondDigit'
).
textContent
=
0
;
}
else
{
document
.
querySelector
(
'.secondDigit'
).
textContent
=
randomNum
();
i
++
;
}
},
time
);
loop1
=
setInterval
(
function
()
{
if
(
i
>
100
)
{
clearInterval
(
loop1
);
document
.
querySelector
(
'.firstDigit'
).
textContent
=
4
;
}
else
{
document
.
querySelector
(
'.firstDigit'
).
textContent
=
randomNum
();
i
++
;
}
},
time
);
</script>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
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