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 fd123c1b
authored
May 18, 2021
by
amateur
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
5e972467
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
src/api/NativeApis.js
src/api/NativeApis.js
View file @
fd123c1
export
const
NativeMethodNames
=
{
AppInfoApi
:
'nativeAppInfo'
,
AppShare
:
'nativeAppShare'
,
AppBottomMenu
:
'nativeMenu'
AppBottomMenu
:
'nativeMenu'
,
nativeTextZoom
:
'nativeTextZoom'
,
}
export
const
JsMethodNames
=
{
...
...
@@ -12,12 +13,12 @@ export const JsInterfaces = objVal2Array(JsMethodNames)
export
const
NativeMenuApi
=
{
nativeMenuS
tatus
:
(
isShow
)
=>
{
const
param
=
isShow
&&
{
type
:
'1'
}
||
{
type
:
'2
'
}
return
$api
.
call
(
NativeMethodNames
.
AppBottomMenu
,
p
aram
,
false
)
nativeMenuS
how
:
(
param
=
{}
)
=>
{
const
newParam
=
{
...
param
,
type
:
'1
'
}
return
$api
.
call
(
NativeMethodNames
.
AppBottomMenu
,
newP
aram
,
false
)
},
native
ChangeMenu
:
(
param
)
=>
{
const
newParam
=
{
...
param
,
type
:
'
3
'
}
native
MenuHide
:
(
param
=
{}
)
=>
{
const
newParam
=
{
...
param
,
type
:
'
2
'
}
return
$api
.
call
(
NativeMethodNames
.
AppBottomMenu
,
newParam
,
false
)
}
}
...
...
@@ -38,6 +39,22 @@ export const NativeApi = {
nativeAppShare
:
(
param
)
=>
{
return
$api
.
call
(
NativeMethodNames
.
AppShare
,
param
,
true
)
},
// {type: '1'-显示/'2'-隐藏, moduleName: '切换模块名称', routeName: '路由名称', routePath: '路由地址', url:'完整url'}
nativeMenuStatus
:
(
param
)
=>
{
if
(
!
param
.
type
)
{
Object
.
assign
(
param
,
{
type
:
'1'
})
}
return
$api
.
call
(
NativeMethodNames
.
AppBottomMenu
,
param
,
false
)
},
// {value: 100}
nativeTextZoom
:
(
param
)
=>
{
if
(
!
param
.
value
)
{
Object
.
assign
(
param
,
{
value
:
100
})
}
return
$api
.
call
(
NativeMethodNames
.
nativeTextZoom
,
param
,
false
)
}
}
...
...
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