PageSourceSearch

https://lingyuzhao.top/js/logout.js

js lingyuzhao.top collected 2026-10-06 13:15:59 UTC 1,011 bytes, 35 lines download raw bytes

1/**
2 * 退出登录函数
3 * @param returnIndex 如果再退出登录之后希望返回主页 则将此设置为 true
4 * @param showMassage 需要显示的提示信息
5 * @param userConf 用户信息 json 对象
6 */
7function logout(returnIndex = true, showMassage = "您已退出登录!!!", userConf = my) {
8    const p = {
9        id: parseInt(userConf.id),
10        userName: userConf.name
11    }
12    if (p.id !== undefined && p.userName !== undefined) {
13        deleteCookie(WEB_CONF.COOKIE_ID, showMassage);
14        updateLogoutStatus(p);
15        if (returnIndex) {
16            setTimeout(() => window.location.href = 'index.html', 3000);
17        }
18    }
19}
20
21/**
22 * 更新当前账号状态
23 * @param json {{id, userName}}
24 */
25function updateLogoutStatus(json) {
26    axios({
27        url: backEnd_host_href() + '/' + WEB_CONF.CONTROLLER_USER + WEB_CONF.CONTROLLER_USER_LOG_OUT,
28        params: json
29    }).then(
30        () => {
31            my = undefined;
32        }
33    );
34}
35

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.