陈战涛
2023-03-14 84e163957a495fc26f49b62c7fed04432e483e05
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>设置</title>
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <link href="./css/mui.min.css" rel="stylesheet" />
        <style>
            .mui-bar-nav {
                background: #245ca7;
                -webkit-box-shadow: none;
                box-shadow: none;
            }
            
            .mui-title {
               color: #FFFFFF;
            }
            .user{
                background: url(../images/bg_user.png) no-repeat top center #3280e8; 
                background-size:100% 100%;
                text-align: center;
                padding: 35px; 
                box-sizing: border-box;
            }
            .user img{
                width: 70px; 
                height: 70px; 
                border-radius: 100px; 
                display: block;
                margin:0 auto 10px auto; 
                border: 2px #fff solid;
            }
            .user p{
                font-size: 16px; 
                margin: 0px; 
                padding: 0px;
                color: #fff;
            }
            .user_list li {
                padding: 0 5px;
                line-height: 42px;
                display: flex;
                justify-content: space-between;
                box-sizing: border-box;
                border-bottom: 1px #f1f1f1 solid;
            }
            .m01{
                background: url(./images/ico_qchc.png) no-repeat 1px center; 
                background-size: 28px auto;
                margin-left: 10px;
            }
            .m02{
                background: url(./images/ico_xgxx.png) no-repeat 1px center; 
                background-size: 28px auto;
                margin-left: 10px;
            }
            .m03{
                background: url(./images/ico_sp.png) no-repeat 1px center; 
                background-size: 28px auto;
                margin-left: 10px;
            }
            .m04{
                background: url(./images/ico_guany.png) no-repeat 1px center; 
                background-size: 28px auto;
                margin-left: 10px;
            }
            .user_list li span{
                padding-left: 35px;
                font-size: 17px;
            }
        </style>
    </head>
    <body>
        <header class="mui-bar mui-bar-nav">
            <h1 class="mui-title">设置</h1>
        </header>
        <div class="mui-content">
            <!--用户中心-->
            <div class="user">
                <img src="./images/Avatarsample25.png">
                <p id="cname">张三</p>
            </div>
            <!--列表-->
            <div class="user_list">
                <ul class="mui-table-view">
                    <li class="m01" onclick="clearApp()">
                        <span>清除缓存</span>
                    </li>
                    <li class="m02" onclick="update()">
                        <span>修改信息</span>
                    </li>
                    <li class="m03" onclick="loginOut()">
                        <span>退出登录</span>
                    </li>
                    <li class="m04" onclick="regards()">
                        <span>关于</span>
                    </li>
                </ul>
                <div class="clearfix"></div>
            </div>
        </div>
        <script src="./js/mui.js"></script>
        <script src="./js/jquery.min.js"></script>
        <script type="text/javascript" charset="utf-8">
            mui.init();
            mui.plusReady(function() {
                var user = JSON.parse(localStorage.getItem('user'));
                $("#cname").html(user.cname);
            });
            
            //清除缓存
            function clearApp() {
                localStorage.removeItem("user");
                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"
                })
            }
        </script>
    </body>
</html>