🎨 新增用户登录日志功能

This commit is contained in:
2025-09-08 01:48:17 +08:00
parent 568575d8da
commit 773f13104b
3 changed files with 98 additions and 6 deletions

View File

@@ -75,3 +75,13 @@ export const setVip = (data) => {
data
})
}
// GetLoginInfo
export const getLoginInfo = (params) => {
return service({
url: '/app_user/login/log',
method: 'get',
params
})
}

View File

@@ -291,6 +291,86 @@ export const ORDER_TABLE_CONFIG = {
}
]
}
// 用户登录日志搜索配置
export const LOGIN_LOG_SEARCH_CONFIG = [
{
type: 'input',
prop: 'user_id',
label: '用户ID',
placeholder: '请输入用户ID',
},
{
type: 'input',
prop: 'user_name',
label: '用户名称',
placeholder: '请输入用户名称',
}
]
// 用户登录日志表格配置
export const LOGIN_LOG_TABLE_CONFIG = {
index: true,
schemes: [
{
attrs: {
label: '用户ID',
prop: 'user_id',
align: 'center'
}
},
{
attrs: {
label: '用户名称',
prop: 'user_name',
align: 'center'
}
},
{
attrs: {
label: '手机号',
prop: 'phone',
align: 'center'
}
},
{
attrs: {
label: '登录IP',
prop: 'ip',
align: 'center'
}
},
{
attrs: {
label: '登录地址',
prop: 'address',
align: 'center'
}
},
{
attrs: {
label: '设备信息',
prop: 'device',
align: 'center'
}
},
{
attrs: {
label: '登录方式',
prop: 'mode',
align: 'center'
}
},
{
attrs: {
label: '登录时间',
prop: 'login_time',
align: 'center'
},
slot: 'login_time'
}
]
}
// 用户列表
export const USER_TABLE_CONFIG = {
index: true,
@@ -365,6 +445,7 @@ export const USER_TABLE_CONFIG = {
}
]
}
// 文章列表
export const ARTICLE_TABLE_CONFIG = {
index: true,

View File

@@ -66,7 +66,8 @@
<el-table-column type="index" label="序号" width="60" align="center" />
<el-table-column prop="order_no" label="订单号" align="center" min-width="180" />
<el-table-column prop="title" label="商品名称" align="center" min-width="150" />
<el-table-column prop="name" label="用户姓名" align="center" width="100" />
<el-table-column prop="name" label="用户姓名" align="center" width="100" />
<el-table-column prop="user_id" label="用户ID" align="center" width="100" />
<el-table-column label="价格" align="center" width="100">
<template #default="{ row }">
<span class="text-green-600 font-bold">{{ formatPrice(row.price) }}</span>