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
d52b827d
authored
May 08, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
7892dc5f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
35 deletions
src/assets/js/setBarHeight.js
src/main.js
src/views/Bill/index.vue
src/views/OidcCallback.vue
src/assets/js/setBarHeight.js
View file @
d52b827d
const
setBarHeight
=
{
mounted
()
{
try
{
window
.
WebViewJavascriptBridge
.
callHandler
(
"getBarHeight"
,
null
,
function
(
response
)
{
console
.
log
(
"getBarHeight来自 ios/android的回传数据: "
,
response
);
if
(
response
)
{
const
barHeight
=
response
.
statusBarHeight
;
const
conHeight
=
46
+
barHeight
;
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
(
"getBarHeight is error"
);
}
}
}
...
...
src/main.js
View file @
d52b827d
...
...
@@ -54,8 +54,8 @@ Vue.prototype.setPageNavState = function () {
const
VConsole
=
require
(
'vconsole'
)
const
my_console
=
new
VConsole
();
//
const VConsole = require('vconsole')
//
const my_console = new VConsole();
...
...
src/views/Bill/index.vue
View file @
d52b827d
...
...
@@ -167,7 +167,7 @@ export default {
[
Icon
.
name
]:
Icon
,
TabHeader
},
mixins
:
[
setBarHeight
],
data
()
{
return
{
title
:
"人事服务"
,
...
...
@@ -418,6 +418,36 @@ export default {
}
}
},
getBarHeight
()
{
try
{
window
.
WebViewJavascriptBridge
.
callHandler
(
"getBarHeight"
,
null
,
function
(
response
)
{
console
.
log
(
"getBarHeight来自 ios/android的回传数据: "
,
response
);
if
(
response
)
{
const
barHeight
=
response
.
statusBarHeight
;
const
conHeight
=
46
+
barHeight
;
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
(
"getBarHeight is error"
);
}
},
closeWebView
()
{
try
{
window
.
WebViewJavascriptBridge
.
callHandler
(
...
...
@@ -440,6 +470,7 @@ export default {
this
.
globalNavLeftArrowClick
(
this
.
navLeftArrowClick
);
await
this
.
loadPeriodData
();
this
.
payUrl
=
await
this
.
loadPayUrl
();
this
.
getBarHeight
();
}
};
</
script
>
...
...
src/views/OidcCallback.vue
View file @
d52b827d
<
template
>
<div
>
</div>
<div
class=
"callback"
>
{{
errMessage
}}
</div>
</
template
>
<
script
>
...
...
@@ -15,6 +15,11 @@ const oidc_config = JSON.parse(process.env.VUE_APP_OIDC_CONFIG);
export
default
{
name
:
"OidcCallback"
,
data
()
{
return
{
errMessage
:
"应用未授权该用户"
};
},
methods
:
{
...
mapActions
([
"oidcSignInCallback"
,
"getOidcUser"
]),
async
getToken
(
access_token
,
appid
,
redirectPath
)
{
...
...
@@ -42,12 +47,13 @@ export default {
}
},
err
=>
{
console
.
log
(
"err="
,
err
);
console
.
log
(
"123err="
,
err
);
this
.
errMessage
=
err
.
error_description
;
}
)
.
catch
(
err
=>
{
console
.
log
(
"err="
,
err
);
this
.
$router
.
push
(
"/oidc-callback-error"
);
// Handle errors any way you want
//
this.$router.push("/oidc-callback-error"); // Handle errors any way you want
});
}
},
...
...
@@ -61,7 +67,7 @@ export default {
})
.
catch
(
err
=>
{
console
.
error
(
err
);
this
.
$router
.
push
(
"/oidc-callback-error"
);
// Handle errors any way you want
//
this.$router.push("/oidc-callback-error"); // Handle errors any way you want
});
}
};
...
...
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