Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
b04e3328
Commit
b04e3328
authored
Jan 16, 2023
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
c91bf2cc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
36 deletions
+0
-36
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/footer.phtml
+0
-36
No files found.
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/footer.phtml
View file @
b04e3328
...
...
@@ -7,42 +7,11 @@
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'public_footer'
)
->
toHtml
();
?>
<script>
const
imgs
=
document
.
getElementsByTagName
(
"img"
);
const
viewHeight
=
window
.
innerHeight
||
document
.
documentElement
.
clientHeight
;
let
num
=
0
;
function
lazyload
()
{
for
(
let
i
=
num
;
i
<
imgs
.
length
;
i
++
)
{
let
distance
=
viewHeight
-
imgs
[
i
].
getBoundingClientRect
().
top
;
if
(
distance
>=
0
)
{
imgs
[
i
].
src
=
imgs
[
i
].
getAttribute
(
"data-src"
);
num
=
i
+
1
;
}
}
}
function
debounce
(
fn
,
delay
=
500
)
{
let
timer
=
null
;
return
function
(...
args
)
{
if
(
timer
)
clearTimeout
(
timer
);
timer
=
setTimeout
(()
=>
{
fn
.
call
(
this
,
args
);
},
delay
);
};
}
window
.
onload
=
lazyload
;
window
.
addEventListener
(
"scroll"
,
debounce
(
lazyload
,
600
),
false
);
require
([
'jquery'
],
function
(
$
)
{
//footer
$
(
"h4"
).
click
(
function
()
{
console
.
log
(
22222222222222222222222222
)
function
browserRedirect
()
{
var
sUserAgent
=
navigator
.
userAgent
.
toLowerCase
();
var
bIsIpad
=
sUserAgent
.
match
(
/ipad/i
)
==
"ipad"
;
...
...
@@ -55,14 +24,11 @@
var
bIsWM
=
sUserAgent
.
match
(
/windows mobile/i
)
==
"windows mobile"
;
// document.writeln("您的浏览设备为:");
if
(
bIsIpad
||
bIsIphoneOs
||
bIsMidp
||
bIsUc7
||
bIsUc
||
bIsAndroid
||
bIsCE
||
bIsWM
)
{
// alert("手机浏览!");
return
1
;
}
else
{
// alert("PC浏览!");
return
2
;
}
}
// browserRedirect();
if
(
browserRedirect
()
==
1
){
var
dis
=
$
(
this
).
siblings
(
"ul"
).
css
(
"display"
);
...
...
@@ -78,8 +44,6 @@
$
(
this
).
siblings
(
"ul"
).
css
(
"display"
,
"block"
);
$
(
this
).
children
(
"span"
).
html
(
'^'
)
}
});
$
(
".page-header .actions.search-dropdown"
).
click
(
function
()
{
$
(
"#search_mini_form_input"
).
toggle
();
...
...
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