码农笔录博客源码
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

103 wiersze
3.9 KiB

6 lat temu
{{template "header" .}}
<title>我的资料 - 云悦</title>
<link type="text/css" rel="styleSheet" href="/static/css/me.css"/>
6 lat temu
<script type="text/javascript" src="/static/js/upload.js"></script>
</head>
<body style="background-color: #f9f9f9">
<div class="root-container">
{{template "nav" .}}
{{template "memenu" .}}
<div class="me-blog-root">
<div class="me-blog-list">
6 lat temu
<ol class="breadcrumb">
<li>个人中心</li>
<li>我的资料</li>
<li class="active">个人信息</li>
</ol>
<div style="display: flex">
<div style="width: 128px">
6 lat temu
<img src="{{.HeadImg}}" alt="头像" class="img-circle img-circle-large">
<div id="drop_area" style="margin-top: 15px"></div>
6 lat temu
</div>
<div class="info-header">
<div style="display: flex">
<p style="flex: 1;color: #888">ID: {{.User.UserName}}</p>
6 lat temu
<p><a href="/u/{{.User.Id}}" style="text-decoration: none">个人主页 ></a></p>
6 lat temu
</div>
<div>
<span>博客 {{.User.BlogCount}}</span>
<span>浏览量 {{.User.BlogBrowes}}</span>
<span>博客 {{.User.BlogCount}}</span>
<span>博客 {{.User.BlogCount}}</span>
</div>
6 lat temu
<hr style="height:1px;border:none;border-top:1px solid #EEE;margin: 10px 0 5px 0;"/>
<div>
<div style="display: flex">
<p style="flex: 1">昵称 :{{.User.NickName}}</p>
<p><a href="javascript:void(0)" style="text-decoration: none" id="editBtn">修改资料</a></p>
</div>
<p>生日 :{{.User.Birthday.Format "2006-01-02"}}</p>
<p>邮箱 :{{.User.Email}}</p>
<p>手机 :{{.User.Mobile}}</p>
<p>Q Q :{{.User.QQ}}</p>
{{if eq 0 .User.Sex}}
<p>性别 :女</p>
{{else}}
<p>性别 :男</p>
{{end}}
<p>简介 :{{.User.DescInfo}}</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
6 lat temu
<script>
6 lat temu
var dragImgUpload = new DragImgUpload("#drop_area",{
callback:function (files) {
//回调函数,可以传递给后台等等
var file = files[0];
console.log(file.name);
debugger
var formData = new FormData();
formData.append("imgfile",file );
if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(file.name))
{
return false;
}else{
$.ajax({
url: '/himg/upload',
type:'POST',
contentType: false,
processData: false,
data: formData,
success:function(data,textstatus){
if (data.Status == 0){
layer.msg("上传成功", {icon: 6});
}else{
layer.msg("上传失败", {icon: 5});
}
}
});
}
}
})
6 lat temu
function refresh() {
window.location.href = window.location.href
}
$(function () {
$("#editBtn").click(function () {
layer.open({
type: 2,
title: '修改个人资料',
shadeClose: true,
shade: 0.5,
area: ['450px', '415px'],
content: '/iframe/user.html' //iframe的url
});
})
})
</script>
</html>