Don't say much, see code
Pushhistory ();
function Pushhistory () {var state = {title: "title", url: "#"};
Window.history.pushState (state, "title", "#"); } if (typeof Window.addeventlistener!= "undefined") {Window.addeventlistener ("Popstate", function (e) {WEIXINJSBR
Idge.call (' CloseWindow ');
}, False);
else {window.attachevent ("Popstate", function (e) {weixinjsbridge.call (' CloseWindow ');
});
} pushhistory ();
function Pushhistory () {var state = {title: "title", url: "#"};
Window.history.pushState (state, "title", "#"); } $ (function () {wx.config ({debug:false,//Open debug mode, the return value of all invoked APIs is alert to the client, to view incoming parameters, can be opened on the PC side, and parameter information is passed
Log is typed and will print only on the PC side. AppId: ' @ViewBag. AppId ',//required, unique identification of public number timestamp: ' @ViewBag. Timestamp ',//required, generate signature timestamp noncestr: ' @ViewBa G.noncestr ',//must fill, generate signed random string signature: ' @ViewBag. Signature ',//required, signed, see Appendix 1 jsapilist: [' Check
Jsapi ', ' Hideoptionmenu ', ' scanqrcode ', ' closewindow ']//required, need to use the JS interface list, all JS interface list See Appendix 2
});
Wx.ready (function () {wx.hideoptionmenu ();
}); if (typeof Window.addeventlistener!= "undefined") {Window.addeventlistener ("Popstate", function (e) {W
X.closewindow ();
}, False);
else {window.attachevent ("Popstate", function (e) {Wx.closewindow ();
}); }
});
Above is the entire content of this article, I hope the content of this article for everyone's study or work can bring some help, but also hope that a lot of support cloud Habitat community!