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
f76b1f14
authored
May 08, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
tj
parent
ad53c917
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
39 deletions
src/main.js
src/views/Bill/index.vue
src/main.js
View file @
f76b1f14
...
@@ -32,20 +32,36 @@ FastClick.prototype.focus = function (targetElement) {
...
@@ -32,20 +32,36 @@ FastClick.prototype.focus = function (targetElement) {
Vue
.
prototype
.
setPageNavState
=
function
()
{
Vue
.
prototype
.
setPageNavState
=
function
()
{
try
{
try
{
initJsBridge
(()
=>
{
initJsBridge
(()
=>
{
// window.WebViewJavascriptBridge.callHandler(
window
.
WebViewJavascriptBridge
.
callHandler
(
// "setPageNavState",
"setPageNavState"
,
// {
{
// isShowClose: false,
isShowClose
:
false
,
// isShowBack: false,
isShowBack
:
false
,
// isCloseLeft: false,
isCloseLeft
:
false
,
// isShowTitle: false,
isShowTitle
:
false
,
// isShowNav: false,
isShowNav
:
false
,
// isCloseWebView: false
isCloseWebView
:
false
// },
},
// function (response) {
function
(
response
)
{
// console.log("setPageNavState来自 ios/android的回传数据: ", response);
console
.
log
(
"setPageNavState来自 ios/android的回传数据: "
,
response
);
// }
}
// );
);
window
.
WebViewJavascriptBridge
.
callHandler
(
"getBarHeight"
,
null
,
function
(
response
)
{
console
.
log
(
"main getBarHeight来自 ios/android的回传数据: "
,
response
);
if
(
response
)
{
response
=
JSON
.
parse
(
response
);
const
barHeight
=
response
.
statusBarHeight
;
console
.
log
(
'barHeight='
,
barHeight
);
localStorage
.
setItem
(
'barHeight'
,
barHeight
);
}
}
);
});
});
}
catch
(
err
)
{
}
catch
(
err
)
{
...
...
src/views/Bill/index.vue
View file @
f76b1f14
...
@@ -420,36 +420,15 @@ export default {
...
@@ -420,36 +420,15 @@ export default {
}
}
},
},
getBarHeight
()
{
getBarHeight
()
{
try
{
const
barHeight
=
localStorage
.
get
(
'barHeight'
);
window
.
WebViewJavascriptBridge
.
callHandler
(
"getBarHeight"
,
null
,
function
(
response
)
{
console
.
log
(
"getBarHeight来自 ios/android的回传数据: "
,
response
);
if
(
response
)
{
response
=
JSON
.
parse
(
response
);
console
.
log
(
"response="
,
response
);
const
barHeight
=
response
.
statusBarHeight
;
const
conHeight
=
46
+
barHeight
;
const
conHeight
=
46
+
barHeight
;
document
document
.
getElementsByClassName
(
"iosStyle"
)[
0
]
.
getElementsByClassName
(
"iosStyle"
)[
0
]
.
setAttribute
(
.
setAttribute
(
"style"
,
"padding-top:"
+
barHeight
+
"px !important"
);
"style"
,
"padding-top:"
+
barHeight
+
"px !important"
);
document
document
.
getElementsByClassName
(
"container"
)[
0
]
.
getElementsByClassName
(
"container"
)[
0
]
.
setAttribute
(
.
setAttribute
(
"style"
,
"padding-top:"
+
conHeight
+
"px !important"
);
"style"
,
"padding-top:"
+
conHeight
+
"px !important"
);
}
}
);
}
catch
(
err
)
{
console
.
log
(
"getBarHeight is error,err="
,
err
);
}
},
},
closeWebView
()
{
closeWebView
()
{
try
{
try
{
...
@@ -470,7 +449,7 @@ export default {
...
@@ -470,7 +449,7 @@ export default {
},
},
async
mounted
()
{
async
mounted
()
{
this
.
setPageNavState
();
this
.
setPageNavState
();
this
.
getBarHeight
();
//
this.getBarHeight();
this
.
globalNavLeftArrowClick
(
this
.
navLeftArrowClick
);
this
.
globalNavLeftArrowClick
(
this
.
navLeftArrowClick
);
await
this
.
loadPeriodData
();
await
this
.
loadPeriodData
();
this
.
payUrl
=
await
this
.
loadPayUrl
();
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