window.showAddMenu = this.addSearch
let data = {
type: 'ICON',
text: 'https://static-image.lexing360.com/vehicle-menu-add.png',
functionName: 'showAddMenu'
}
try {
window.JSBridge.navigationTo('menuText', JSON.stringify(data))
} catch (e) {}
addSearch () {
navigationTo('/searchCar/addSearchCar')
}
import router from '@/router/index'
import vThis from '@/main'
function navigation (route, closeBefore = false) {
if (process.env.NODE_ENV === 'dev') {
router.push(route)
}
if (window.logInfo.mobile === 'iPhone' && window.JSBridge && !closeBefore) {
window.JSBridge.navigationTo('web', window.location.protocol + '//' + window.location.host + '/#' + route)
} else if (window.logInfo.mobile === 'iPhone' && window.JSBridge && closeBefore) {
const version = 0x01040400
if (vThis.GLOBAL.appInfo.version >= version.toString(10)) {
window.JSBridge.navigationTo('singleWeb', `${window.location.protocol}//${window.location.host}/#${route}`)
return
}
window.JSBridge.navigationTo('web', `${window.location.protocol}//${window.location.host}/#${route}`)
} else {
router.push(route)
}
// router.push(route)
}
export default navigation