Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
hrs_app_h5
/
bill
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
87661af2
authored
May 09, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
del more mixins and setbarHeight function
parent
6981bc8d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
15 deletions
src/assets/js/setBarHeight.js
src/views/Bill/index.vue
src/views/More/index.vue
src/assets/js/setBarHeight.js
View file @
87661af2
const
setBarHeight
=
{
beforeMount
()
{
mounted
()
{
const
barHeight
=
localStorage
.
getItem
(
'barHeight'
);
const
conHeight
=
46
+
barHeight
;
console
.
log
(
'mixins barHeight='
,
barHeight
);
document
.
getElementsByClassName
(
"iosStyle"
)[
0
]
.
setAttribute
(
"style"
,
"padding-top:"
+
barHeight
+
"px !important"
);
const
dom
=
document
.
getElementsByClassName
(
"iosStyle"
)[
0
];
if
(
dom
)
{
dom
.
setAttribute
(
"style"
,
"padding-top:"
+
barHeight
+
"px !important"
);
}
document
.
getElementsByClassName
(
"container"
)[
0
]
.
setAttribute
(
"style"
,
"padding-top:"
+
conHeight
+
"px !important"
);
const
dom2
=
document
.
getElementsByClassName
(
"container"
)[
0
];
if
(
dom
)
{
dom2
.
setAttribute
(
"style"
,
"padding-top:"
+
conHeight
+
"px !important"
);
}
}
}
...
...
src/views/Bill/index.vue
View file @
87661af2
...
...
@@ -434,19 +434,21 @@ export default {
localStorage
.
setItem
(
"barHeight"
,
barHeight
);
const
conHeight
=
46
+
barHeight
;
console
.
log
(
"billindex barHeight="
,
barHeight
);
document
.
getElementsByClassName
(
"iosStyle"
)[
0
]
.
setAttribute
(
const
dom
=
document
.
getElementsByClassName
(
"iosStyle"
)[
0
];
if
(
dom
)
{
dom
.
setAttribute
(
"style"
,
"padding-top:"
+
barHeight
+
"px !important"
);
}
document
.
getElementsByClassName
(
"container"
)[
0
]
.
setAttribute
(
const
dom2
=
document
.
getElementsByClassName
(
"container"
)[
0
];
if
(
dom
)
{
dom2
.
setAttribute
(
"style"
,
"padding-top:"
+
conHeight
+
"px !important"
);
}
}
}
);
...
...
src/views/More/index.vue
View file @
87661af2
...
...
@@ -53,13 +53,13 @@
import
{
NavBar
,
Icon
}
from
"vant"
;
import
{
TabHeader
}
from
"@/components"
;
import
{
mapActions
}
from
"vuex"
;
import
setBarHeight
from
"../../assets/js/setBarHeight.js"
;
//
import setBarHeight from "../../assets/js/setBarHeight.js";
export
default
{
components
:
{
[
Icon
.
name
]:
Icon
,
TabHeader
},
mixins
:
[
setBarHeight
],
//
mixins: [setBarHeight],
data
()
{
return
{
title
:
""
,
...
...
@@ -115,12 +115,30 @@ export default {
}
);
},
setBarHeight
()
{
const
barHeight
=
localStorage
.
getItem
(
"barHeight"
);
const
conHeight
=
46
+
barHeight
;
console
.
log
(
"mixins barHeight="
,
barHeight
);
const
dom
=
document
.
getElementsByClassName
(
"iosStyle"
)[
0
];
if
(
dom
)
{
dom
.
setAttribute
(
"style"
,
"padding-top:"
+
barHeight
+
"px !important"
);
}
const
dom2
=
document
.
getElementsByClassName
(
"container"
)[
0
];
if
(
dom
)
{
dom2
.
setAttribute
(
"style"
,
"padding-top:"
+
conHeight
+
"px !important"
);
}
},
navLeftArrowClick
()
{
this
.
$router
.
go
(
-
1
);
}
},
async
mounted
()
{
this
.
setPageNavState
();
this
.
setBarHeight
();
this
.
globalNavLeftArrowClick
(
this
.
navLeftArrowClick
);
await
this
.
getData
();
//this.payUrl = await this.loadPayUrl();
...
...
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