<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<title>title</title>
<link rel="stylesheet" type="text/css" href="../css/api.css"/>
<style>
html,body{
width:100%;
}
header{
width:100%;
height:200px;
background-color: rgb(218, 1, 107);
position: relative;
}
header .left{
position: absolute;
left: 8px;
top: 8px;
width:22px;
height:40px;
background: url('../image/back.png');
background-position: center 8px;
background-repeat: no-repeat;
background-size: 11px 20px;
}
header .photo{
width:70px;
height:70px;
/*虾面六行让头像水平竖直居中*/
position: absolute;
left:0;
top:0;
bottom: 0;
right: 0;
margin: auto;
background: url('../image/user.png');
background-position: center center;
background-repeat: no-repeat;
background-size: 70px 70px;
border-radius: 50%;
}
.un{
position: absolute;
width:100%;
text-align: center;
bottom: 40px;
color: #fff;
}
.info{
position: absolute;
width:100%;
text-align: center;
bottom:10px;
color:#fff;
}
section{
width:100%;
height: 36px;
position:absolute;;
left:0;
bottom: 0;
text-align: center;
font-size: 16px;
}
section .set{
position: absolute;
left:8px;
top: 0;
padding-left: 20px;
line-height: 36px;
width: auto;
height: 100%;
background: url('../image/user_setting.png');
background-repeat: no-repeat;
background-position: left center;
background-size: 18px 18px;
}
section .message{
}
section .tel{
}
</style>
</head>
<body>
<header>
<div class="left" tapmode οnclick="api.closeWin();"></div>
<div class="photo" tapmode οnclick="chosePhoto();"></div>
<div class="un" id="un"></div>
<div class="info">
积分:<span>20</span> |余额 ¥ <span>200</span>
</div>
</header>
<section>
<div class="set" tapmode οnclick="toSet()">设置</div>
<div class="message">消息</div>
<div class="tel">客服</div>
</section>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
apiready = function(){
/* 获取用户元素*/
var userDiv = $api.byId('un');
/*从缓存去除用户名并赋值*/
$api.html(userDiv, $api.getStorage('logSuccess'));
};
//更换头像
function chosePhoto(){
}
/*进入设置*/
function toSet(){
}
</script>
</html>