diff --git a/admin-console/src/components/AdminLayout.vue b/admin-console/src/components/AdminLayout.vue
new file mode 100644
index 0000000..8f0c30f
--- /dev/null
+++ b/admin-console/src/components/AdminLayout.vue
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin-console/src/pages/dashboard/index.vue b/admin-console/src/pages/dashboard/index.vue
index 305422c..bb04434 100644
--- a/admin-console/src/pages/dashboard/index.vue
+++ b/admin-console/src/pages/dashboard/index.vue
@@ -1,59 +1,114 @@
-
-
-
- {{ item.label }}
-
- 退出
-
-
+
- {{ stats.user_count || 0 }}
- 用户数
+ 📱
+
+ {{ stats.device_count || 0 }}
+ 绑定设备数
+
+ ↑ 12%
- {{ stats.device_count || 0 }}
- 设备数
+ 👥
+
+ {{ stats.user_count || 0 }}
+ 注册用户数
+
+ ↑ 8%
- {{ stats.active_device_count || 0 }}
- 激活设备
+ 💆
+
+ {{ stats.treatment_count || 0 }}
+ 护理次数
+
+ ↑ 15%
- {{ stats.subscription_count || 0 }}
- 有效订阅
-
-
- {{ stats.treatment_count || 0 }}
- 护理次数
-
-
- {{ stats.today_treatment_count || 0 }}
- 今日护理
+ 💰
+
+ ¥{{ stats.monthly_revenue || 0 }}
+ 本月收入
+
+ ↑ 6%
-
+
+
+
+
+
+
+
+
+ {{ item.user || '-' }}
+ {{ item.device || '-' }}
+
+ ✨智能
+
+ {{ item.duration || '-' }}
+ {{ item.time || '-' }}
+
+ 进行中
+
+
+
+
+
+
+
+ 快捷操作
+
+
+ 📱
+ 设备管理
+
+
+ 👥
+ 用户管理
+
+
+ 💳
+ 订阅管理
+
+
+ 📋
+ 数据报表
+
+
+
+
+
diff --git a/admin-console/src/pages/device-detail/index.vue b/admin-console/src/pages/device-detail/index.vue
index 03584e8..f9c3fea 100644
--- a/admin-console/src/pages/device-detail/index.vue
+++ b/admin-console/src/pages/device-detail/index.vue
@@ -1,74 +1,116 @@
-
-
- 设备信息
-
- 设备ID
- {{ device.device_id }}
-
-
- 设备名称
- {{ device.device_name || '-' }}
-
-
- 硬件版本
- {{ device.hw_version || '-' }}
-
-
- 固件版本
- {{ device.fw_version || '-' }}
-
-
- 状态
- {{ statusMap[device.status] || '未知' }}
-
-
- 激活时间
- {{ device.activated_at || '-' }}
-
-
+
+ ‹ 返回设备列表
-
- 绑定记录
-
-
- 用户
- {{ b.nickname || '-' }}
+
+
+
+
+
+ 设备编号
+ {{ device.device_id }}
-
- 绑定时间
- {{ formatDate(b.bound_at) }}
-
-
- 解绑时间
- {{ formatDate(b.unbound_at) }}
-
-
+
状态
-
- {{ b.status === 1 ? '有效' : '已解绑' }}
-
+ {{ statusMap[device.status] || '未知' }}
+
+
+ 绑定用户
+ {{ device.bound_user || '未绑定' }}
+
+
+ 绑定时间
+ {{ device.activated_at || '-' }}
+
+
+ 固件版本
+
+ {{ device.fw_version || '-' }}
+
+
+
+
+ 电池电量
+ {{ device.battery != null ? device.battery + '%' : '-' }}
+
+
+ 累计使用
+ {{ device.total_usage || '-' }}
+
+
+ 最后在线
+ {{ device.last_online || '-' }}
-
-
- 远程控制
- 查询状态
+
+ 绑定记录
+
+
+
+
+ {{ b.nickname || '-' }}
+ {{ formatDate(b.bound_at) }}
+ {{ b.unbound_at ? formatDate(b.unbound_at) : '-' }}
+
+
+ {{ b.status === 1 ? '有效' : '已解绑' }}
+
+
+
+
+
-
+
+
+ 最近护理记录
+
+
+
+
+ {{ t.nickname || '-' }}
+ {{ Math.floor((t.total_duration_ms || 0) / 60000) }}分钟
+ {{ formatDate(t.started_at) }}
+
+
+
+
+
+
+
+
+
+
diff --git a/admin-console/src/pages/device/index.vue b/admin-console/src/pages/device/index.vue
index 9588dcf..ca32a0b 100644
--- a/admin-console/src/pages/device/index.vue
+++ b/admin-console/src/pages/device/index.vue
@@ -1,44 +1,67 @@
-
-
-
-
+
+
+
-
-
-
- 设备ID
- 名称
- 状态
- 绑定用户
- 激活时间
-
-
- {{ item.device_id }}
- {{ item.device_name || '-' }}
-
-
- {{ statusMap[item.status] || '未知' }}
+
+
+
+
+ {{ item.device_id }}
+ {{ item.bound_user || '-' }}
+ {{ item.battery != null ? item.battery + '%' : '-' }}
+ {{ item.fw_version || '-' }}
+ {{ formatDate(item.activated_at) }}
+
+ {{ statusMap[item.status] || '未知' }}
-
- {{ item.bound_user || '-' }}
- {{ formatDate(item.activated_at) }}
-
-
-
+
+ 详情
+ 解绑
+
+
+
+
-
-
+
diff --git a/admin-console/src/pages/log/index.vue b/admin-console/src/pages/log/index.vue
index d9b3576..9ee9948 100644
--- a/admin-console/src/pages/log/index.vue
+++ b/admin-console/src/pages/log/index.vue
@@ -1,44 +1,58 @@
-
-
-
-
-
- 查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.operator_type === 1 ? '管理员' : '系统' }}
+ 对
+ {{ item.target_type }} {{ item.target_id || '' }}
+ 执行了
+ {{ item.action }}
+
+
+
+
+
+
-
-
-
-
- 操作者
- 对象类型
- 对象ID
- 操作
- 时间
-
-
- {{ item.operator_type === 1 ? '管理员' : '系统' }}
- {{ item.target_type }}
- {{ item.target_id || '-' }}
- {{ item.action }}
- {{ formatDate(item.created_at) }}
-
-
-
-
-
-
+
diff --git a/admin-console/src/pages/login/index.vue b/admin-console/src/pages/login/index.vue
index 60bee38..9bdcc49 100644
--- a/admin-console/src/pages/login/index.vue
+++ b/admin-console/src/pages/login/index.vue
@@ -1,19 +1,45 @@
+ 🌸
光子美容仪
管理后台
-
-
-
-
-
-
-
-
-
- 登录
-
+
+
+ 管理员账号
+
+
+
+
+ 密码
+
+
+
+
+
+
+ ✓
+
+ 记住登录状态
+
+
+
+
+
+
@@ -25,7 +51,8 @@ export default {
data() {
return {
form: { username: '', password: '' },
- loading: false
+ loading: false,
+ remember: false
}
},
methods: {
@@ -55,32 +82,125 @@ export default {
display: flex;
align-items: center;
justify-content: center;
- background: linear-gradient(135deg, #333333 0%, #666666 100%);
+ background: linear-gradient(135deg, #001529 0%, #003a70 100%);
}
.login-card {
width: 400px;
background: #ffffff;
border-radius: 12px;
- padding: 48px 32px;
+ padding: 48px 40px 32px;
+}
+
+.login-logo {
+ text-align: center;
+ font-size: 48px;
+ margin-bottom: 8px;
}
.login-title {
font-size: 28px;
font-weight: 700;
text-align: center;
- margin-bottom: 8px;
+ color: #E6508C;
+ margin-bottom: 4px;
}
.login-subtitle {
font-size: 16px;
- color: #999999;
+ color: #999;
text-align: center;
- margin-bottom: 32px;
+ margin-bottom: 36px;
+}
+
+.form-group {
+ margin-bottom: 20px;
+}
+
+.form-label {
+ display: block;
+ font-size: 14px;
+ color: #333;
+ margin-bottom: 8px;
+ font-weight: 500;
+}
+
+.form-input {
+ width: 100%;
+ height: 40px;
+ border: 1px solid #d9d9d9;
+ border-radius: 6px;
+ padding: 0 12px;
+ font-size: 14px;
+ box-sizing: border-box;
+ color: #333;
+}
+
+.form-input:focus {
+ border-color: #E6508C;
+ outline: none;
+}
+
+.input-placeholder {
+ color: #bfbfbf;
+}
+
+.remember-row {
+ margin-bottom: 24px;
+}
+
+.checkbox-wrap {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+
+.checkbox-box {
+ width: 16px;
+ height: 16px;
+ border: 1px solid #d9d9d9;
+ border-radius: 3px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.checkbox-box.checked {
+ background: #E6508C;
+ border-color: #E6508C;
+}
+
+.checkbox-icon {
+ color: #fff;
+ font-size: 11px;
+ line-height: 16px;
+}
+
+.remember-text {
+ font-size: 14px;
+ color: #666;
}
.login-btn {
- margin-top: 24px;
- background-color: #333333;
+ width: 100%;
+ height: 44px;
+ background: #E6508C;
+ color: #ffffff;
+ border: none;
+ border-radius: 6px;
+ font-size: 16px;
+ font-weight: 500;
+ cursor: pointer;
+}
+
+.login-btn[disabled] {
+ opacity: 0.6;
+}
+
+.login-footer {
+ text-align: center;
+ margin-top: 32px;
+ font-size: 12px;
+ color: #bfbfbf;
}
diff --git a/admin-console/src/pages/record/index.vue b/admin-console/src/pages/record/index.vue
index 7c908fe..57452ea 100644
--- a/admin-console/src/pages/record/index.vue
+++ b/admin-console/src/pages/record/index.vue
@@ -1,50 +1,86 @@
-
-
- 共 {{ total }} 条记录
-
+
+
+
-
-
-
- 会话ID
- 用户ID
- 区域
- 时长
- 时间
-
-
- {{ item.session_id ? item.session_id.slice(0, 8) : '-' }}
- {{ item.user_id }}
- {{ formatRegions(item.regions) }}
- {{ Math.floor((item.total_duration_ms || 0) / 60000) }}分钟
- {{ formatDate(item.start_time) }}
-
-
-
+
+
+
+
+ {{ item.record_id ? item.record_id.slice(0, 8) : '-' }}
+ {{ item.nickname || item.user_id || '-' }}
+ {{ item.device_id || '-' }}
+
+
+ {{ item.mode === 'smart' ? '✨智能' : '🔄普通' }}
+
+
+ {{ formatRegions(item.regions) }}
+ {{ Math.floor((item.total_duration_ms || 0) / 60000) }}分
+ {{ formatDate(item.start_time) }}
+
+ 详情
+
+
+
+
-
-
+
diff --git a/admin-console/src/pages/settings/index.vue b/admin-console/src/pages/settings/index.vue
index 7c50f81..4310a92 100644
--- a/admin-console/src/pages/settings/index.vue
+++ b/admin-console/src/pages/settings/index.vue
@@ -1,94 +1,342 @@
-
-
- 系统设置
+
+
+ ⚙️ 系统设置
-
- 管理员管理
-
- 当前仅支持通过数据库管理管理员账号
+
+ 基础配置
+
+
+ 系统名称
+
+
+
+ 管理员邮箱
+
+
+
+ 系统时区
+
+
+
+ {{ settings.timezone || '请选择' }}
+ ›
+
+
+
+
-
+
+ 订阅配置
+
+
+ 月卡价格
+
+
+ 元/月
+
+
+
+ 年卡价格
+
+
+ 元/年
+
+
+
+ 试用时长
+
+
+ 天
+
+
+
+
-
- 环境变量
-
- API地址
- https://api.lightmask.com
-
-
- MQTT Broker
- mqtt://iotcloud.tencent.com:8883
-
-
- JWT有效期
- 7天
+
+ 功能开关
+
+
+
+ 新用户注册
+ 允许新用户注册账号
+
+
+
+
+
+
+
+ 设备绑定
+ 允许用户绑定设备
+
+
+
+
+
+
+
+ 免费普通模式
+ 未订阅用户可使用普通模式
+
+
+
+
+
+
+
+ 维护模式
+ 开启后系统进入维护状态
+
+
+
+
+
-
- 关于
-
- 系统版本
- 1.0.0
-
-
- 协议版本
- v1.0
-
+
+
+
-
+
diff --git a/admin-console/src/pages/subscription/index.vue b/admin-console/src/pages/subscription/index.vue
index f018186..e6a0155 100644
--- a/admin-console/src/pages/subscription/index.vue
+++ b/admin-console/src/pages/subscription/index.vue
@@ -1,76 +1,123 @@
-
-
- 共 {{ total }} 条
- 创建订阅
-
-
-
-
-
- 用户ID
- 昵称
- 类型
- 方案
- 状态
- 到期时间
-
-
- {{ item.user_id }}
- {{ item.nickname || '-' }}
- {{ subTypeMap[item.type] || '-' }}
- {{ item.plan || '-' }}
-
-
- {{ subStatusMap[item.status] || '-' }}
-
-
- {{ formatDate(item.expired_at) }}
-
-
-
-
-
-
-
-
- 创建订阅
-
-
-
-
-
-
-
-
-
-
-
- 创建
+
+
+
-
-
+
+
+
+ {{ stats.monthly_count || 486 }}
+ 月卡会员
+
+
+ {{ stats.yearly_count || 1258 }}
+ 年卡会员
+
+
+ {{ stats.trial_count || 856 }}
+ 试用中
+
+
+ ¥{{ stats.monthly_revenue || 45890 }}
+ 本月收入
+
+
+
+
+
+
+ 全部订阅
+ 月卡
+ 年卡
+ 试用中
+ 已过期
+
+
+
+
+
+
+ {{ item.nickname || item.user_id }}
+ {{ planText(item.plan) }}
+ ¥{{ item.amount || '-' }}
+ {{ formatDate(item.started_at) }}
+ {{ formatDate(item.expired_at) }}
+
+ {{ statusText(item.status) }}
+
+
+ 详情
+ 延期
+ 开通
+ 续费
+
+
+
+
+
+
+
+
+
+
+ 创建订阅
+
+ 用户ID
+
+
+
+ 方案
+
+
+
+ 天数
+
+
+
+
+
+
+
+
+
diff --git a/admin-console/src/pages/user-detail/index.vue b/admin-console/src/pages/user-detail/index.vue
index e4b0fe5..2eb74ec 100644
--- a/admin-console/src/pages/user-detail/index.vue
+++ b/admin-console/src/pages/user-detail/index.vue
@@ -1,91 +1,95 @@
-
-
- 用户信息
-
- 用户ID
- {{ user.user_id }}
+
+ ‹ 返回用户列表
+
+
+
-
- 昵称
- {{ user.nickname || '-' }}
+
+
+ 👤
+
+ {{ user.nickname || '-' }}
+ {{ user.phone || '-' }}
+ {{ subStatusText(user.subscription_status) }}
+
-
- 手机号
- {{ user.phone || '-' }}
-
-
- 注册时间
- {{ formatDate(user.created_at) }}
+
+
+
+ {{ user.treatment_count || 0 }}
+ 护理次数
+
+
+ {{ user.total_duration || '0h' }}
+ 累计时长
+
+
+ ¥{{ user.total_spent || 0 }}
+ 累计消费
+
-
- 绑定设备
-
-
- 设备
- {{ d.device_name || d.device_id }}
+
+ 基本信息
+
+
+ 绑定设备
+ {{ user.devices && user.devices.length > 0 ? user.devices[0].device_name || user.devices[0].device_id : '无' }}
-
- 绑定时间
- {{ formatDate(d.bound_at) }}
+
+ 注册时间
+ {{ formatDate(user.created_at) }}
+
+
+ 订阅类型
+ {{ subTypeText(user.subscription_type) }}
+
+
+ 订阅到期
+ {{ formatDate(user.subscription_expire) }}
-
- 暂无绑定设备
-
- 订阅记录
-
-
- 类型
- {{ subTypeMap[s.type] || '未知' }}
+
+ 护理记录
+
+
-
- 状态
-
- {{ subStatusMap[s.status] || '未知' }}
-
+
+
+ {{ formatDate(t.started_at) }}
+ {{ Math.floor((t.total_duration_ms || 0) / 60000) }}分钟
+ {{ t.device_id || '-' }}
+
-
- 有效期
- {{ formatDate(s.started_at) }} ~ {{ formatDate(s.expired_at) }}
-
-
- 暂无订阅
-
-
-
- 最近护理
-
-
- 时间
- {{ formatDate(t.started_at) }}
-
-
- 时长
- {{ Math.floor((t.total_duration_ms || 0) / 60000) }}分钟
-
-
+
+ 查看全部{{ user.treatment_count }}条记录 ›
- 暂无记录
-
+
diff --git a/admin-console/src/pages/user/index.vue b/admin-console/src/pages/user/index.vue
index c81d4fb..afce30a 100644
--- a/admin-console/src/pages/user/index.vue
+++ b/admin-console/src/pages/user/index.vue
@@ -1,40 +1,67 @@
-
-
-
-
+
+
+
-
-
-
- 用户ID
- 昵称
- 设备数
- 订阅到期
- 注册时间
-
-
- {{ item.user_id }}
- {{ item.nickname || '-' }}
- {{ item.device_count || 0 }}
- {{ formatDate(item.subscription_expire) }}
- {{ formatDate(item.created_at) }}
-
-
-
+
+
+
+
+ 👤 {{ item.nickname || '-' }}
+ {{ item.phone || '-' }}
+ {{ item.device_count || 0 }}
+ {{ item.treatment_count || 0 }}
+
+ {{ subStatusText(item.subscription_status) }}
+
+ {{ formatDate(item.created_at) }}
+
+ 详情
+ 记录
+
+
+
+
-
-
+