<!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>
|