Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
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
杨凯
YDL-Component-Medical
Commits
e5280bf1
Commit
e5280bf1
authored
Jun 29, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加js方法
parent
af4c062a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
JsMethod.kt
app/src/main/java/com/ydl/component/service/web/JsMethod.kt
+10
-2
ConfidePermissionDialog.kt
m-confide/src/main/java/com/ydl/confide/home/ConfidePermissionDialog.kt
+1
-1
No files found.
app/src/main/java/com/ydl/component/service/web/JsMethod.kt
View file @
e5280bf1
...
...
@@ -52,7 +52,7 @@ class JsMethod(private val webView: WebView?) {
Loading
.
close
()
return
true
}
"open_app_eval_list"
->
{
"open_app_eval_list"
->
{
val
url
=
param
.
getAsJsonPrimitive
(
"url"
).
asString
val
topActivity
=
BaseActivityMgr
.
INST
.
getTopActivity
()
NewH5Activity
.
start
(
topActivity
,
H5Params
(
url
,
""
))
...
...
@@ -104,12 +104,20 @@ class JsMethod(private val webView: WebView?) {
}
return
true
}
"
support_check_audio_permission
"
->
{
"
check_app_support
"
->
{
val
callback
=
param
.
getAsJsonPrimitive
(
"callback"
).
asString
val
type
=
param
.
getAsJsonPrimitive
(
"type"
).
asInt
if
(
callback
.
isNullOrBlank
())
return
true
webView
?.
post
{
when
(
type
)
{
1
->
{
//检查音频权限能力
webView
.
loadUrl
(
"javascript:$callback(1)"
)
}
else
->
{
webView
.
loadUrl
(
"javascript:$callback(0)"
)
}
}
}
return
true
}
else
->
{
...
...
m-confide/src/main/java/com/ydl/confide/home/ConfidePermissionDialog.kt
View file @
e5280bf1
...
...
@@ -69,7 +69,7 @@ class ConfidePermissionDialog : DialogFragment() {
override
fun
onStart
()
{
super
.
onStart
()
isCancelable
=
false
val
width
=
(
resources
.
displayMetrics
.
widthPixels
*
0.8
).
toInt
()
val
width
=
(
resources
.
displayMetrics
.
widthPixels
*
0.8
5
).
toInt
()
dialog
?.
window
?.
setLayout
(
width
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
dialog
?.
window
?.
setBackgroundDrawable
(
ColorDrawable
(
Color
.
TRANSPARENT
))
}
...
...
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