1234567891011121314151617181920212223242526 |
- $(function () {
- /*fetchJSON("/api/user/info", {}, "get", function (data) {
- if (data.code !== 0) {
- window.location.href = "/admin/login.html";
- } else {
- $("#username").html(data.data.realName);
- }
- });
- */
- $("#logout").on("click", function () {
- fetchJSON("api/common/logout", {}, "post", function (data) {
- sessionStorage.setItem("userId", -1);
- window.login = "logout";
- window.location.href = "../index.html";
- });
- });
- $("#nav a").click(function () {
- $(this)
- .addClass("active")
- .siblings()
- .removeClass("active");
- });
- });
|