/** * android 返回按钮统一调度的方法, * 项目中有两个地方需要修改一个是这个地方,还有有个地方是 index.html 文件 */ import jsBri from './jsBridge'; import store from '@/store/index'; export default { androidBackBtn() { window.backPageByAndroid = function(obj) { let hash = window.sessionStorage.getItem("gotoPagetemp"); let footerList = store.state.footerNav || []; if(footerList && footerList.length){ let result = footerList.find(val => { return val.path === hash; }); if (result) { jsBri.closeApp(); } else { window.history.back(); } }else{ if(hash==='/login'||hash==='/'){ jsBri.closeApp(); }else { window.history.go(-1); } } }; window.showOrgIdAndOrgType = function(obj) { window.sessionStorage.setItem('scene_regInfos', obj); }; } };