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
aa9a537b
authored
May 08, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
getBarHeight
parent
ac466d69
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
18 deletions
src/assets/css/index.css
src/assets/css/index.less
src/assets/js/JsBridge.js
src/main.js
src/views/Bill/index.vue
src/assets/css/index.css
View file @
aa9a537b
...
@@ -6,11 +6,8 @@
...
@@ -6,11 +6,8 @@
i
{
i
{
font-style
:
normal
;
font-style
:
normal
;
}
}
.iosStyle
{
padding-top
:
44px
;
}
.container
{
.container
{
padding-top
:
90
px
;
padding-top
:
46
px
;
}
}
/*未扣费*/
/*未扣费*/
.no_bill
{
.no_bill
{
...
...
src/assets/css/index.less
View file @
aa9a537b
@top:44px;
* {
* {
padding
: 0;
padding: 0;
margin
: 0;
margin: 0;
list-style: none;
list-style: none;
}
}
...
@@ -10,11 +8,9 @@ i {
...
@@ -10,11 +8,9 @@ i {
font-style: normal;
font-style: normal;
}
}
.iosStyle {
padding-top: @top;
}
.container {
.container {
padding-top: 46px
+@top
;
padding-top: 46px;
}
}
/*未扣费*/
/*未扣费*/
...
...
src/assets/js/JsBridge.js
View file @
aa9a537b
...
@@ -45,14 +45,11 @@ function initJsBridge(readyCallback) {
...
@@ -45,14 +45,11 @@ function initJsBridge(readyCallback) {
// 调用注册方法 原生调用JS
// 调用注册方法 原生调用JS
connectWebViewJavascriptBridge
(
function
(
bridge
)
{
connectWebViewJavascriptBridge
(
function
(
bridge
)
{
if
(
isAndroid
)
{
if
(
isAndroid
)
{
bridge
.
init
(
'
reloadTXLContac
t'
,
function
(
data
,
responseCallback
)
{
bridge
.
init
(
'
getbarheigh
t'
,
function
(
data
,
responseCallback
)
{
responseCallback
(
'received from native data:'
,
data
);
responseCallback
(
'received from native data:'
,
data
);
});
});
}
}
bridge
.
registerHandler
(
'reloadTXLContact'
,
function
(
data
,
responseCallback
)
{
responseCallback
(
'received from native data:'
+
data
);
});
readyCallback
();
readyCallback
();
});
});
}
}
...
...
src/main.js
View file @
aa9a537b
...
@@ -52,9 +52,14 @@ Vue.prototype.setPageNavState = function () {
...
@@ -52,9 +52,14 @@ Vue.prototype.setPageNavState = function () {
}
}
};
};
const
VConsole
=
require
(
'vconsole'
)
const
VConsole
=
require
(
'vconsole'
)
const
my_console
=
new
VConsole
();
const
my_console
=
new
VConsole
();
new
Vue
({
new
Vue
({
store
,
store
,
router
,
router
,
...
...
src/views/Bill/index.vue
View file @
aa9a537b
...
@@ -416,6 +416,36 @@ export default {
...
@@ -416,6 +416,36 @@ export default {
}
}
}
}
},
},
getBarHeight
()
{
try
{
initJsBridge
(()
=>
{
window
.
WebViewJavascriptBridge
.
callHandler
(
"getBarHeight"
,
{},
function
(
response
)
{
console
.
log
(
"来自 ios/android的回传数据: "
,
response
);
const
barHeight
=
response
;
const
conHeight
=
46
+
response
;
document
.
getElementsByClassName
(
"iosStyle"
)[
0
]
.
setAttribute
(
"style"
,
"padding-top:"
+
barHeight
+
"px !important"
);
document
.
getElementsByClassName
(
"container"
)[
0
]
.
setAttribute
(
"style"
,
"padding-top:"
+
conHeight
+
"px !important"
);
}
);
});
}
catch
(
err
)
{
console
.
log
(
"setPageNavState is error"
);
}
},
closeWebView
()
{
closeWebView
()
{
try
{
try
{
window
.
WebViewJavascriptBridge
.
callHandler
(
window
.
WebViewJavascriptBridge
.
callHandler
(
...
@@ -438,6 +468,7 @@ export default {
...
@@ -438,6 +468,7 @@ export default {
this
.
globalNavLeftArrowClick
(
this
.
navLeftArrowClick
);
this
.
globalNavLeftArrowClick
(
this
.
navLeftArrowClick
);
await
this
.
loadPeriodData
();
await
this
.
loadPeriodData
();
this
.
payUrl
=
await
this
.
loadPayUrl
();
this
.
payUrl
=
await
this
.
loadPayUrl
();
this
.
getBarHeight
();
}
}
};
};
</
script
>
</
script
>
...
@@ -487,8 +518,6 @@ export default {
...
@@ -487,8 +518,6 @@ export default {
.header_content
{
.header_content
{
height
:
122px
;
height
:
122px
;
.fund
{
.fund
{
margin-top
:
30px
;
width
:
50%
;
width
:
50%
;
float
:
left
;
float
:
left
;
}
}
...
...
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