//监听微信返回
pushHistory(); function pushHistory() { var state = { title: "title", url: "#" }; window.history.pushState(state, "title", "#"); }
window.addEventListener("popstate", function (e) {
$.confirm("是否退出该页面,退出后内容将会清空!", "", function () { wx.closeWindow(); }, function () { }); }, false);