zhouhao
2022-01-10 e4bae24836359ade27a0eee0be77aa30a87c8d7c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
 *  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);
        };
    }
};