Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
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
yaru
fgqyxxlr
Commits
3df553c4
Commit
3df553c4
authored
Mar 18, 2020
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移动端登录不显示左侧菜单
parent
5426ba9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
27 deletions
+42
-27
ruoyi-admin/src/main/resources/static/ruoyi/index.js
+33
-22
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+8
-4
ruoyi-admin/src/main/resources/templates/index.html
+1
-1
No files found.
ruoyi-admin/src/main/resources/static/ruoyi/index.js
View file @
3df553c4
...
...
@@ -7,6 +7,8 @@ layer.config({
skin
:
'layer-ext-moon'
});
var
isMobile
=
$
.
common
.
isMobile
()
||
$
(
window
).
width
()
<
769
;
$
(
function
()
{
// MetsiMenu
$
(
'#side-menu'
).
metisMenu
();
...
...
@@ -22,14 +24,19 @@ $(function() {
// 菜单切换
$
(
'.navbar-minimalize'
).
click
(
function
()
{
$
(
"body"
).
toggleClass
(
"mini-navbar"
);
if
(
isMobile
)
{
$
(
"body"
).
toggleClass
(
"canvas-menu"
);
}
else
{
$
(
"body"
).
toggleClass
(
"mini-navbar"
);
}
SmoothlyMenu
();
});
$
(
'#side-menu>li'
).
click
(
function
()
{
if
(
$
(
'body'
).
hasClass
(
'
mini-navbar'
))
{
if
(
$
(
'body'
).
hasClass
(
'canvas-menu
mini-navbar'
))
{
NavToggle
();
}
});
$
(
'#side-menu>li li a'
).
click
(
function
()
{
if
(
$
(
window
).
width
()
<
769
)
{
...
...
@@ -49,9 +56,8 @@ $(function() {
$
(
window
).
bind
(
"load resize"
,
function
()
{
if
(
$
(
this
).
width
()
<
769
)
{
$
(
'body'
).
addClass
(
'mini-navbar'
);
$
(
'.navbar-static-side'
).
fadeIn
();
$
(
".sidebar-collapse .logo"
).
addClass
(
"hide"
);
$
(
'body'
).
addClass
(
'canvas-menu'
);
$
(
"nav .logo"
).
addClass
(
"hide"
);
$
(
".slimScrollDiv"
).
css
({
"overflow"
:
"hidden"
})
}
});
...
...
@@ -60,21 +66,27 @@ function NavToggle() {
$
(
'.navbar-minimalize'
).
trigger
(
'click'
);
}
function
fixedSidebar
()
{
$
(
'#side-menu'
).
hide
();
$
(
"nav .logo"
).
addClass
(
"hide"
);
setTimeout
(
function
()
{
$
(
'#side-menu'
).
fadeIn
(
500
);
},
100
);
}
function
SmoothlyMenu
()
{
if
(
!
$
(
'body'
).
hasClass
(
'mini-navbar'
))
{
$
(
'#side-menu'
).
hide
();
$
(
".sidebar-collapse .logo"
).
removeClass
(
"hide"
);
setTimeout
(
function
()
{
$
(
'#side-menu'
).
fadeIn
(
500
);
},
100
);
}
else
if
(
$
(
'body'
).
hasClass
(
'fixed-sidebar'
))
{
$
(
'#side-menu'
).
hide
();
$
(
".sidebar-collapse .logo"
).
addClass
(
"hide"
);
setTimeout
(
function
()
{
$
(
'#side-menu'
).
fadeIn
(
500
);
},
300
);
if
(
isMobile
&&
!
$
(
'body'
).
hasClass
(
'canvas-menu'
))
{
$
(
'.navbar-static-side'
).
fadeIn
();
fixedSidebar
();
}
else
if
(
!
isMobile
&&!
$
(
'body'
).
hasClass
(
'mini-navbar'
))
{
fixedSidebar
();
$
(
"nav .logo"
).
removeClass
(
"hide"
);
}
else
if
(
isMobile
&&
$
(
'body'
).
hasClass
(
'fixed-sidebar'
))
{
$
(
'.navbar-static-side'
).
fadeOut
();
fixedSidebar
();
}
else
if
(
!
isMobile
&&
$
(
'body'
).
hasClass
(
'fixed-sidebar'
))
{
fixedSidebar
();
}
else
{
$
(
'#side-menu'
).
removeAttr
(
'style'
);
}
...
...
@@ -591,4 +603,4 @@ $(function() {
},
}
})
});
\ No newline at end of file
});
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
View file @
3df553c4
...
...
@@ -711,7 +711,7 @@ var table = {
// 弹出层指定宽度
open
:
function
(
title
,
url
,
width
,
height
,
callback
)
{
//如果是移动端,就使用自适应大小弹窗
if
(
navigator
.
userAgent
.
match
(
/
(
iPhone|iPod|Android|ios
)
/i
))
{
if
(
$
.
common
.
isMobile
(
))
{
width
=
'auto'
;
height
=
'auto'
;
}
...
...
@@ -783,7 +783,7 @@ var table = {
// 弹出层全屏
openFull
:
function
(
title
,
url
,
width
,
height
)
{
//如果是移动端,就使用自适应大小弹窗
if
(
navigator
.
userAgent
.
match
(
/
(
iPhone|iPod|Android|ios
)
/i
))
{
if
(
$
.
common
.
isMobile
(
))
{
width
=
'auto'
;
height
=
'auto'
;
}
...
...
@@ -896,7 +896,7 @@ var table = {
var
_width
=
$
.
common
.
isEmpty
(
width
)
?
"800"
:
width
;
var
_height
=
$
.
common
.
isEmpty
(
height
)
?
(
$
(
window
).
height
()
-
50
)
:
height
;
//如果是移动端,就使用自适应大小弹窗
if
(
navigator
.
userAgent
.
match
(
/
(
iPhone|iPod|Android|ios
)
/i
))
{
if
(
$
.
common
.
isMobile
(
))
{
_width
=
'auto'
;
_height
=
'auto'
;
}
...
...
@@ -1487,7 +1487,11 @@ var table = {
}
}
return
count
;
}
},
// 判断移动端
isMobile
:
function
()
{
return
navigator
.
userAgent
.
match
(
/
(
Android|iPhone|SymbianOS|Windows Phone|iPad|iPod
)
/i
);
},
}
});
})(
jQuery
);
...
...
ruoyi-admin/src/main/resources/templates/index.html
View file @
3df553c4
...
...
@@ -26,7 +26,7 @@
<i
class=
"fa fa-times-circle"
></i>
</div>
<a
th:href=
"@{/index}"
>
<li
class=
"logo"
>
<li
class=
"logo
hidden-xs
"
>
<span
class=
"logo-lg"
>
RuoYi
</span>
</li>
</a>
...
...
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