-
Notifications
You must be signed in to change notification settings - Fork 0
/
me.html
129 lines (126 loc) · 4.89 KB
/
me.html
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
<!doctype html>
<html>
<head>
<title>个人中心</title>
<link rel="stylesheet" href="/css/mdui.min.css" />
<meta charset="UTF-8">
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<body class="mdui-theme-primary-indigo mdui-theme-accent-blue mdui-bottom-nav-fixed">
<div class="mdui-toolbar">
<body class="mdui-drawer-body-right">
<a mdui-drawer="{target: '#left-drawer'}" class="mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">menu</i></a>
<div class="mdui-drawer" id="left-drawer">
<div class="mdui-card">
<div class="mdui-card-media">
<img src="https://api.sunweihu.com/api/sjbz/api.php?lx=dongman"/>
<div class="mdui-card-media-covered">
<div class="mdui-card-primary">
<div class="mdui-card-primary-title">你好</div>
<div class="mdui-card-primary-subtitle">世界!</div>
</div>
</div>
</div>
</div>
<ul class="mdui-list">
<li class="mdui-menu-item mdui-list-item-active">
<a href="home.html" class="mdui-ripple">
<i class="mdui-menu-item-icon mdui-icon material-icons">home</i>主页
</a>
</li>
<li class="mdui-divider"></li>
<li class="mdui-menu-item">
<a href="tool.html" class="mdui-ripple">
<i class="mdui-menu-item-icon mdui-icon material-icons">business_center</i>工具
</a>
</li>
<li class="mdui-divider"></li>
<li class="mdui-menu-item">
<a href="function/getwz.php" class="mdui-ripple">
<i class="mdui-menu-item-icon mdui-icon material-icons">book</i>论坛
</a>
</li>
<li class="mdui-divider"></li>
<li class="mdui-menu-item">
<a href="bj.html" class="mdui-ripple">
<i class="mdui-menu-item-icon mdui-icon material-icons">file_upload</i>上传
</a>
</li>
<li class="mdui-divider"></li>
</ul>
</div>
</body>
<span class="mdui-typo-title">个人中心</span>
<div class="mdui-toolbar-spacer"></div>
<a onclick="window.location.reload()" class="mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">refresh</i></a>
</div>
<style>
#b
{
width:90%;
margin-bottom: 10px;
margin-top: 10px;
border-radius:5px;
height: 100px;
}
</style>
<script>
var xhr = new XMLHttpRequest();
xhr.onload = function (){
// 输出接收到的文字数据
if (xhr.responseText=="请重新登录"){
mdui.alert(xhr.responseText);
setTimeout(function (){
window.location="index.php"}
,1000)}
else{
var r=xhr.responseText;
document.getElementById("id").innerHTML=r;
}
}
xhr.onerror = function (){
mdui.alert("未知行为");
}
xhr.open("post", "home.php", true);
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xhr.send();
var rr=new XMLHttpRequest();
rr.open("get","function/get.php",true);
rr.send();
//debug
rr.onload=function (){
r=rr.responseText
r=r.split(":")
var ch=document.getElementById("ch")
ch.innerHTML=r[0]
ch.style.background=r[1]
var png=document.getElementById("png")
png.src=r[2]
var qm=document.getElementById("title")
qm.innerHTML=r[3]
var rmb=document.getElementById("rmb")
rmb.innerHTML="软妹币:"+r[4]
}
</script>
<div class="mdui-card"> <!-- 卡片头部,包含头像、标题、副标题 -->
<div class="mdui-card-header">
<img style="width: 90px;height: 90px;" id="png" onclick="window.location=this.src" class="mdui-card-header-avatar" src="/png/avatar.jpg" >
<div style="font-size:25px;margin-top:15px" id="id" class="mdui-card-header-title">
</div>
<div style="color:white;margin-left: 90px;width: 70px;text-align: center;" id="ch">
暂无称号
</div>
</div>
<div style="margin-top: 10px;" id="title" class="mdui-card-header-subtitle"></div> <!--垃圾--> <!-- 卡片的媒体内容,可以包含图片、视频等媒体内容,以及标题、副标题 -->
</div>
<center>
<button style="width:90%;margin-bottom: 10px;margin-top: 10px;border-radius:5px;height: 100px;" id="rmb" onclick="#" class="mdui-btn mdui-btn-block mdui-btn-raised mdui-ripple">软妹币</button>
<button id="b" onclick="window.location='tx.html'" class="mdui-btn mdui-btn-block mdui-btn-raised mdui-ripple">头像修改</button>
<button id="b" onclick="window.location='qm.html'" class="mdui-btn mdui-btn-block mdui-btn-raised mdui-ripple">签名修改</button>
<button id="b" onclick="window.location='mc.html'" class="mdui-btn mdui-btn-block mdui-btn-raised mdui-ripple">名称修改</button>
<button id="b" onclick="window.location='mm.html'" class="mdui-btn mdui-btn-block mdui-btn-raised">密码修改</button>
</center>
<script src="js/mdui.min.js"></script>
</body>
</html>