Listen to the return event of WeChat's built-in browser

pushHistory();
        window.addEventListener("popstate", function(e) {
            e.preventDefault();
            WeixinJSBridge.call('closeWindow');
            pushHistory();
        }, false);
        function pushHistory() {
            var state = {
                title: "title",
                url: "#"
            };
            window.history.pushState(state, "title", "#");
        }

Guess you like

Origin blog.csdn.net/qq_17211063/article/details/130721024