陈战涛
2023-03-16 5bfe19fe69faf564751de586f5219501fdf29efc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//底部菜单栏跳转
mui(".g-tabbar").on("tap", ".tabbar a", function() {
    var id = this.getAttribute("id");
    if (id) {
        mui.openWindow({
            url: id + ".html",
            id: id
        })
    } else {
        mui.alert('无权查看此功能!', '提示', ["确定"], function() {}, "div");
    }
});
 
//点击事件
mui(".mui-content").on("tap", ".m-boxb2 ul li a", function() {
    var tag = this.getAttribute("id");
    if(tag == "m01"){
        clearCache();
    }else if(tag == "m02"){
        update();
    }else if(tag == "m03"){
        loginOut();
    }else if(tag == "m04"){
        regards();
    }
});
 
 
//清除缓存
function clearCache() {
    localStorage.removeItem("user");
    localStorage.removeItem("selectDeptId");
    mui.toast("缓存清除成功!");
}
 
//退出登录
function loginOut() {
    plus.runtime.restart();
}
//修改信息
function update() {
    mui.openWindow({
        url: "edit.html",
        id: "edit"
    })
}
 
//关于
function regards() {
    mui.openWindow({
        url: "information.html",
        id: "information"
    })
}