Commit fd123c1b by amateur

1

1 parent 5e972467
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 = {
nativeMenuStatus: (isShow) => {
const param = isShow && { type: '1' } || { type: '2' }
return $api.call(NativeMethodNames.AppBottomMenu, param, false)
nativeMenuShow: (param = {}) => {
const newParam = { ...param, type: '1' }
return $api.call(NativeMethodNames.AppBottomMenu, newParam, false)
},
nativeChangeMenu: (param) => {
const newParam = { ...param, type: '3' }
nativeMenuHide: (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)
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!