Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
polysoft-nafmii
/
polysoft-h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 068c202f
authored
May 17, 2021
by
amateur
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
c14133b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
src/api/NativeApis.js
src/api/NativeApis.js
View file @
068c202
export
const
NativeMethodNames
=
{
export
const
NativeMethodNames
=
{
AppInfoApi
:
'nativeAppInfo'
,
AppInfoApi
:
'nativeAppInfo'
,
AppShare
:
'nativeAppShare'
,
AppShare
:
'nativeAppShare'
,
AppBottomMenu
:
'nativeMenu'
}
}
export
const
JsMethodNames
=
{
export
const
JsMethodNames
=
{
...
@@ -10,6 +11,18 @@ export const JsMethodNames = {
...
@@ -10,6 +11,18 @@ export const JsMethodNames = {
export
const
JsInterfaces
=
objVal2Array
(
JsMethodNames
)
export
const
JsInterfaces
=
objVal2Array
(
JsMethodNames
)
export
const
NativeMenuApi
=
{
nativeMenuStatus
:
(
isShow
)
=>
{
const
param
=
isShow
&&
{
type
:
'1'
}
||
{
type
:
'2'
}
return
$api
.
call
(
NativeMethodNames
.
AppBottomMenu
,
param
,
false
)
},
nativeChangeMenu
:
(
param
)
=>
{
const
newParam
=
{
...
param
,
type
:
'3'
}
return
$api
.
call
(
NativeMethodNames
.
AppBottomMenu
,
newParam
,
false
)
}
}
export
const
NativeApi
=
{
export
const
NativeApi
=
{
on
:
(
jsMethodName
,
callback
)
=>
{
on
:
(
jsMethodName
,
callback
)
=>
{
$api
.
on
(
jsMethodName
,
callback
)
$api
.
on
(
jsMethodName
,
callback
)
...
@@ -30,7 +43,7 @@ export const NativeApi = {
...
@@ -30,7 +43,7 @@ export const NativeApi = {
function
objVal2Array
(
obj
)
{
function
objVal2Array
(
obj
)
{
const
arrays
=
[]
const
arrays
=
[]
for
(
const
key
in
obj
)
{
for
(
const
key
in
obj
)
{
arrays
.
push
(
obj
[
key
])
arrays
.
push
(
obj
[
key
])
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment