someone-oa/mobile/user-info.html
2025-12-11 15:21:16 +08:00

251 lines
7.0 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>个人信息 - OA系统</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: #f5f5f5;
max-width: 414px;
margin: 0 auto;
min-height: 100vh;
padding-bottom: 60px;
}
.header {
background: #1890ff;
color: white;
padding: 12px 16px;
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
top: 0;
z-index: 100;
}
.header-left {
display: flex;
align-items: center;
gap: 12px;
}
.back-btn {
background: none;
border: none;
color: white;
font-size: 18px;
cursor: pointer;
}
.header-title {
font-size: 18px;
font-weight: bold;
}
.content {
padding: 16px;
background: #ffffff;
min-height: calc(100vh - 44px - 60px);
}
.avatar-section {
text-align: center;
padding: 24px 0;
border-bottom: 1px solid #f0f0f5;
margin-bottom: 16px;
}
.avatar {
width: 80px;
height: 80px;
border-radius: 50%;
background: #1890ff;
margin: 0 auto 16px;
display: flex;
align-items: center;
justify-content: center;
font-size: 36px;
color: white;
}
.btn-change-avatar {
color: #1890ff;
font-size: 14px;
background: none;
border: none;
cursor: pointer;
}
.form-item {
margin-bottom: 20px;
}
.form-label {
display: block;
margin-bottom: 8px;
color: #333;
font-size: 14px;
font-weight: 500;
}
.form-input {
width: 100%;
padding: 12px;
border: 1px solid #e5e5e5;
border-radius: 8px;
font-size: 14px;
}
.form-input:focus {
outline: none;
border-color: #1890ff;
}
.form-input:disabled {
background: #f5f5f5;
color: #999;
}
.btn-save {
width: 100%;
padding: 14px;
background: #1890ff;
color: white;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
margin-top: 24px;
}
.bottom-nav {
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 100%;
max-width: 414px;
background: white;
border-top: 1px solid #e5e5e5;
display: flex;
padding: 8px 0;
z-index: 100;
}
.nav-item {
flex: 1;
text-align: center;
padding: 8px;
color: #666;
font-size: 12px;
text-decoration: none;
}
.nav-item.active {
color: #1890ff;
}
.nav-icon {
font-size: 20px;
margin-bottom: 4px;
}
</style>
</head>
<body>
<div class="header">
<div class="header-left">
<button class="back-btn" onclick="history.back()"></button>
<div class="header-title">个人信息</div>
</div>
</div>
<div class="content">
<div class="avatar-section">
<div class="avatar">👤</div>
<button class="btn-change-avatar" onclick="changeAvatar()">更换头像</button>
</div>
<div class="form-item">
<label class="form-label">用户名</label>
<input type="text" class="form-input" value="zhangsan" disabled>
</div>
<div class="form-item">
<label class="form-label">姓名</label>
<input type="text" class="form-input" value="张三" id="realName">
</div>
<div class="form-item">
<label class="form-label">部门</label>
<input type="text" class="form-input" value="经营管理部" disabled>
</div>
<div class="form-item">
<label class="form-label">职位</label>
<input type="text" class="form-input" value="部门负责人" disabled>
</div>
<div class="form-item">
<label class="form-label">手机号</label>
<input type="tel" class="form-input" value="13800138000" id="phone">
</div>
<div class="form-item">
<label class="form-label">邮箱</label>
<input type="email" class="form-input" value="zhangsan@example.com" id="email">
</div>
<button class="btn-save" onclick="saveInfo()">保存</button>
</div>
<div class="bottom-nav">
<a href="todo.html" class="nav-item">
<div class="nav-icon">📋</div>
<div>待办</div>
</a>
<a href="message.html" class="nav-item">
<div class="nav-icon">🔔</div>
<div>消息</div>
</a>
<a href="project.html" class="nav-item">
<div class="nav-icon">📁</div>
<div>项目</div>
</a>
<a href="output.html" class="nav-item">
<div class="nav-icon">📝</div>
<div>成果</div>
</a>
<a href="profile.html" class="nav-item">
<div class="nav-icon">👤</div>
<div>我的</div>
</a>
</div>
<script>
function changeAvatar() {
alert('更换头像功能(需要调用相册或拍照)');
}
function saveInfo() {
const realName = document.getElementById('realName').value;
const phone = document.getElementById('phone').value;
const email = document.getElementById('email').value;
if (!realName.trim()) {
alert('请输入姓名');
return;
}
if (!phone.trim()) {
alert('请输入手机号');
return;
}
if (!email.trim()) {
alert('请输入邮箱');
return;
}
if (confirm('确认保存个人信息?')) {
alert('保存成功!');
setTimeout(() => {
history.back();
}, 1000);
}
}
</script>
</body>
</html>