Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
pingan-charity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a4108654
authored
Feb 24, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
52a3f4b3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
Public/static/js/common.js
+19
-18
No files found.
Public/static/js/common.js
View file @
a4108654
...
@@ -120,9 +120,10 @@ var EventUtil = {
...
@@ -120,9 +120,10 @@ var EventUtil = {
showCount
++
;
showCount
++
;
alert
(
"Show has been fired "
+
showCount
+
" times."
);
alert
(
"Show has been fired "
+
showCount
+
" times."
);
});
});
})();
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
for
(
let
i
=
0
;
i
<
21
;
i
++
)
{
for
(
let
i
=
0
;
i
<
21
;
i
++
)
{
$
(
'.read'
+
i
).
hide
();
$
(
'.read'
+
i
).
hide
();
}
}
...
@@ -266,9 +267,9 @@ var EventUtil = {
...
@@ -266,9 +267,9 @@ var EventUtil = {
link
:
linkAddress
.
link20
,
link
:
linkAddress
.
link20
,
index
:
20
index
:
20
},
jumpTolink
);
},
jumpTolink
);
});
});
function
jumpTolink
(
event
)
{
function
jumpTolink
(
event
)
{
const
link
=
event
.
data
.
link
;
const
link
=
event
.
data
.
link
;
if
(
event
.
data
.
index
||
event
.
data
.
index
==
0
)
{
if
(
event
.
data
.
index
||
event
.
data
.
index
==
0
)
{
const
index
=
event
.
data
.
index
;
const
index
=
event
.
data
.
index
;
...
@@ -280,10 +281,10 @@ var EventUtil = {
...
@@ -280,10 +281,10 @@ var EventUtil = {
window
.
location
.
href
=
link
;
window
.
location
.
href
=
link
;
},
100
);
},
100
);
}
}
function
getTranslateDistance
(
cardinal
=
0
,
abs
=
false
)
{
function
getTranslateDistance
(
cardinal
=
0
,
abs
=
false
)
{
var
wrapInnerTransform
=
$
(
'.wrap-inner'
).
css
(
'transform'
);
var
wrapInnerTransform
=
$
(
'.wrap-inner'
).
css
(
'transform'
);
var
wrapInnertop
=
parseFloat
(
$
(
'.wrap-inner'
).
css
(
'top'
));
var
wrapInnertop
=
parseFloat
(
$
(
'.wrap-inner'
).
css
(
'top'
));
wrapInnerTransform
=
wrapInnerTransform
.
match
(
/^matrix
\(
1,
\s
0,
\s
0,
\s
1,
\s
0,
\s\-?(\d
+
)
/
);
wrapInnerTransform
=
wrapInnerTransform
.
match
(
/^matrix
\(
1,
\s
0,
\s
0,
\s
1,
\s
0,
\s\-?(\d
+
)
/
);
...
@@ -295,29 +296,29 @@ var EventUtil = {
...
@@ -295,29 +296,29 @@ var EventUtil = {
}
}
return
wrapInnerjl
+
cardinal
+
'px'
;
return
wrapInnerjl
+
cardinal
+
'px'
;
}
}
//获取随机数方法
//获取随机数方法
//min 最小值
//min 最小值
//max 最大值
//max 最大值
function
RandomNumBoth
(
Min
,
Max
)
{
function
RandomNumBoth
(
Min
,
Max
)
{
var
Range
=
Max
-
Min
;
var
Range
=
Max
-
Min
;
var
Rand
=
Math
.
random
();
var
Rand
=
Math
.
random
();
var
num
=
Min
+
Math
.
round
(
Rand
*
Range
);
//四舍五入
var
num
=
Min
+
Math
.
round
(
Rand
*
Range
);
//四舍五入
return
num
;
return
num
;
}
}
//写cookies
//写cookies
function
setCookie
(
name
,
value
)
{
function
setCookie
(
name
,
value
)
{
var
Days
=
30
;
var
Days
=
30
;
var
exp
=
new
Date
();
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
+
Days
*
24
*
60
*
60
*
1000
);
exp
.
setTime
(
exp
.
getTime
()
+
Days
*
24
*
60
*
60
*
1000
);
document
.
cookie
=
name
+
"="
+
escape
(
value
)
+
";expires="
+
exp
.
toGMTString
();
document
.
cookie
=
name
+
"="
+
escape
(
value
)
+
";expires="
+
exp
.
toGMTString
();
}
}
//读取cookies
//读取cookies
function
getCookie
(
name
)
{
function
getCookie
(
name
)
{
var
arr
,
reg
=
new
RegExp
(
"(^| )"
+
name
+
"=([^;]*)(;|$)"
);
var
arr
,
reg
=
new
RegExp
(
"(^| )"
+
name
+
"=([^;]*)(;|$)"
);
if
(
arr
=
document
.
cookie
.
match
(
reg
))
if
(
arr
=
document
.
cookie
.
match
(
reg
))
...
@@ -325,4 +326,4 @@ var EventUtil = {
...
@@ -325,4 +326,4 @@ var EventUtil = {
return
unescape
(
arr
[
2
]);
return
unescape
(
arr
[
2
]);
else
else
return
null
;
return
null
;
}
}
\ No newline at end of file
\ 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