You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
585 B
31 lines
585 B
import {
|
|
INVOKE_API
|
|
} from '../../constants'
|
|
|
|
function invokeApi (method, args = {}) {
|
|
UniViewJSBridge.publishHandler(INVOKE_API, {
|
|
data: {
|
|
method,
|
|
args
|
|
},
|
|
options: {
|
|
timestamp: Date.now()
|
|
}
|
|
})
|
|
}
|
|
|
|
export function navigateTo (args) {
|
|
invokeApi('navigateTo', args)
|
|
}
|
|
export function navigateBack (args) {
|
|
invokeApi('navigateBack', args)
|
|
}
|
|
export function reLaunch (args) {
|
|
invokeApi('reLaunch', args)
|
|
}
|
|
export function redirectTo (args) {
|
|
invokeApi('redirectTo', args)
|
|
}
|
|
export function switchTab (args) {
|
|
invokeApi('switchTab', args)
|
|
}
|
|
|