feat(pages): 添加文章和商品详情页及API代理配置

- 添加了.dockerignore、.env.example和.gitignore配置文件
- 实现了文件服务器、模块API和服务器API的代理功能
- 创建了动态路由页面用于展示文章列表和详情
- 实现了商品详情页面包括图片展示和价格信息
- 添加了静态页面展示功能支持富文本内容渲染
- 配置了SEO元数据和面包屑导航组件
This commit is contained in:
2026-02-12 13:52:55 +08:00
commit 91e9a8c20f
322 changed files with 48203 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OperationRecord, OperationRecordParam } from './model';
import { SERVER_API_URL } from '@/config/setting';
/**
* 分页查询操作日志
*/
export async function pageOperationRecords(params: OperationRecordParam) {
const res = await request.get<ApiResult<PageResult<OperationRecord>>>(
SERVER_API_URL + '/system/operation-record/page',
{ params }
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询操作日志列表
*/
export async function listOperationRecords(params?: OperationRecordParam) {
const res = await request.get<ApiResult<OperationRecord[]>>(
SERVER_API_URL + '/system/operation-record',
{ params }
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,56 @@
import { PageParam } from '@/api';
/**
* 操作日志
*/
export interface OperationRecord {
// 操作日志id
id?: number;
// 用户id
userId?: number;
// 操作模块
module: string;
// 操作功能
description: string;
// 请求地址
url: string;
// 请求方式
requestMethod: string;
// 调用方法
method: string;
// 请求参数
params: string;
// 返回结果
result: string;
// 异常信息
error: string;
// 消耗时间, 单位毫秒
spendTime: number;
// 操作系统
os: string;
// 设备名称
device: string;
// 浏览器类型
browser: string;
// ip地址
ip: string;
// 状态, 0成功, 1异常
status: number;
// 操作时间
createTime: string;
// 用户昵称
nickname: string;
// 用户账号
username: string;
}
/**
* 操作日志搜索条件
*/
export interface OperationRecordParam extends PageParam {
username?: string;
module?: string;
createTimeStart?: string;
createTimeEnd?: string;
status?: number;
}