2022-06-29——Uncaught ReferenceError: mui is not defined at __uniappview.html

解决 web-view 跳转到mui开发的h5项目 返回被拦截报错的问题

        onReady() {
            this.clearMuiBack()
        },

        methods: {
            // 关闭mui返回
            clearMuiBack() {
                // #ifdef APP-PLUS
                let currentWebview = this.$scope.$getAppWebview().children()[0]
                //监听注入的js
                currentWebview.addEventListener("loaded", function() {
                    currentWebview.evalJS("mui.init({keyEventBind: {backbutton: false }});");
                });
                // #endif
            },
        },

你可能感兴趣的:(2022-06-29——Uncaught ReferenceError: mui is not defined at __uniappview.html)