Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hnxtbaboot
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
杨亮
hnxtbaboot
Commits
674ef258
Commit
674ef258
authored
Jul 14, 2022
by
yangliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化水印方法
parent
4efe85bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
23 deletions
+27
-23
hnxtba-core/src/main/resources/static/js/watermark.js
+27
-23
No files found.
hnxtba-core/src/main/resources/static/js/watermark.js
View file @
674ef258
...
...
@@ -111,14 +111,27 @@ function watermark(settings) {
};
document
.
body
.
appendChild
(
oTemp
);
}
function
getSy
(
ips
){
debugger
var
sfzh
=
$
(
'#sfzh'
).
html
();
if
(
sfzh
.
length
>=
18
){
sfzh
=
sfzh
.
substring
(
0
,
6
)
+
"****"
+
sfzh
.
substring
(
14
,
18
)
function
getSy
(){
debugger
if
(
!
getIP_flag
){
setTimeout
(
function
(){
var
sfzh
=
$
(
'#sfzh'
).
html
();
if
(
sfzh
.
length
>=
18
){
sfzh
=
sfzh
.
substring
(
0
,
6
)
+
"****"
+
sfzh
.
substring
(
14
,
18
)
}
var
thisDate
=
getNowFormatDate
();
var
sy
=
sfzh
+
" "
+
$
(
'#yhm'
).
html
()
+
" "
+
thisDate
+
" "
+
iptemp
+
" 协同办案"
+
" "
+
$
(
'#yhdw'
).
html
();
watermark
({
watermark_txt
:
sy
});
},
1000
);
}
else
{
var
sfzh
=
$
(
'#sfzh'
).
html
();
if
(
sfzh
.
length
>=
18
){
sfzh
=
sfzh
.
substring
(
0
,
6
)
+
"****"
+
sfzh
.
substring
(
14
,
18
)
}
var
thisDate
=
getNowFormatDate
();
var
sy
=
sfzh
+
" "
+
$
(
'#yhm'
).
html
()
+
" "
+
thisDate
+
" "
+
iptemp
+
" 协同办案"
+
" "
+
$
(
'#yhdw'
).
html
();
watermark
({
watermark_txt
:
sy
});
}
var
thisDate
=
getNowFormatDate
();
var
sy
=
sfzh
+
" "
+
$
(
'#yhm'
).
html
()
+
" "
+
thisDate
+
" "
+
ips
+
" 协同办案"
+
" "
+
$
(
'#yhdw'
).
html
();
watermark
({
watermark_txt
:
sy
});
}
function
getNowFormatDate
()
{
...
...
@@ -141,10 +154,8 @@ function getNowFormatDate() {
}
var
getIP_flag
=
false
;
var
iptemp
=
""
;
function
getIPs
(
callback
){
try
{
var
ip_dups
=
{};
//compatibility for firefox and chrome
var
RTCPeerConnection
=
window
.
RTCPeerConnection
...
...
@@ -218,25 +229,18 @@ function getIPs(callback){
handleCandidate
(
line
);
});
},
500
);
}
catch
(
e
)
{
//getSy("");
}
finally
{
setTimeout
(
function
(){
if
(
!
getIP_flag
){
getSy
(
iptemp
);
}
},
1000
);
}
}
//insert IP addresses into the page
var
iptemp
=
""
;
getIPs
(
function
(
ip
){
debugger
;
if
(
ip
!=
null
&&
ip
!=
""
&&
ip
!=
undefined
&&
ip
!=
"undefined"
){
iptemp
=
ip
;
}
getIP_flag
=
true
;
getSy
(
iptemp
);
getIP_flag
=
true
;
//var iptmp = $("#ipflag").html();
//if(iptmp==1||iptmp==2){
// getSy();
// }
});
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