info.html
3.5 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>个人中心</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/login.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/person.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/mask.css">
</head>
<body ondragstart="window.event.returnValue=false" oncontextmenu="window.event.returnValue=false" onselectstart="event.returnValue=false">
<!--头部 -->
<include file="public@header" />
<main>
<!--彈出框-->
<div class="mask">
</div>
<div class="info_boxs">
<div class="personal_center">
<!--頭像-->
<div class="personal_center_avatar">
<notempty name="user.avatar">
<img src="{:cmf_get_image_url($user.avatar)}" alt="">
<else/>
<img src="__TMPL__/public/assets/starImg/aicon_82.png" alt="">
</notempty>
</div>
<!--編輯頭像-->
<div class="Editor_avatar clearfix">
<div class="Editor_avatar_icon">
<img src="__TMPL__/public/assets/starImg/aicon_84.png" alt="">
</div>
<span><input type="file" id="personal-photo" name="avatar">编辑头像</span>
</div>
<!--修改資料-->
<div class="Modifying clearfix" id="editInfo">
<div class="Modifying_icon">
<img src="__TMPL__/public/assets/starImg/aicon_85.png" alt="">
</div>
<span>修改资料</span>
</div>
<!--我的收藏-->
<div class="Collection clearfix" id="myCollection">
<div class="Collection_icon">
<img src="__TMPL__/public/assets/starImg/aicon_86.png" alt="">
</div>
<span>我的收藏</span>
</div>
</div>
<div class="Keep">
Copyright © 2004-2019 独角星球 版权所有
</div>
</div>
</main>
</body>
</html>
<script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script>
<script src="__TMPL__/public/assets/js/public.js"></script>
<script src="__TMPL__/public/assets/js/uploadfile.js"></script>
<script>
$(function() {
$("#personal-photo").on("change", function() {
var img_size = $("input[type=file]").get(0).files[0].size;
if (img_size > 1024000) {
mask("上传图片过大,请上传小于1M的图片");
} else {
$.ajaxFileUpload({
url: '/portal/login/updateAvatar', //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议,一般设置为false
fileElementId: 'personal-photo', //文件上传域的ID
dataType: 'json', //返回值类型 一般设置为json
success: function(data) { //服务器成功响应处理函数
mask(data.msg);
window.location.href = '/';
}
});
}
});
});
</script>