feat: 短信日志
Some checks failed
coverage CI / build (push) Has been cancelled

This commit is contained in:
2025-09-23 15:34:48 +08:00
parent 0da43ca229
commit 67b9a74212
2 changed files with 42 additions and 16 deletions

View File

@@ -13,9 +13,9 @@ export default {
// 如果需要自定义本地开发服务器 请取消注释按需调整
dev: {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
"/admin-api/": {
'/admin-api/': {
// 要代理的地址
target: "http://192.168.1.114:48080",
target: 'http://114.132.60.20:48080',
// 配置了这个可以从 http 代理到 https
// 依赖 origin 的功能可能需要这个,比如 cookie
changeOrigin: true,
@@ -27,17 +27,17 @@ export default {
*/
test: {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
"/api/": {
target: "https://proapi.azurewebsites.net",
'/api/': {
target: 'https://proapi.azurewebsites.net',
changeOrigin: true,
pathRewrite: { "^": "" },
pathRewrite: { '^': '' },
},
},
pre: {
"/api/": {
target: "your pre url",
'/api/': {
target: 'your pre url',
changeOrigin: true,
pathRewrite: { "^": "" },
pathRewrite: { '^': '' },
},
},
};

View File

@@ -2,6 +2,7 @@ import type {
ProColumns,
ProDescriptionsItemProps,
} from '@ant-design/pro-components';
import { Space, Tag } from 'antd';
import dayjs from 'dayjs';
import type { SmsLogVO } from '@/services/system/message/sms/log';
export const baseTenantColumns: ProColumns<SmsLogVO>[] = [
@@ -11,6 +12,26 @@ export const baseTenantColumns: ProColumns<SmsLogVO>[] = [
width: 100,
hideInSearch: true, // 在搜索表单中隐藏
},
{
title: '创建时间',
dataIndex: 'createTime',
valueType: 'dateRange',
hideInSearch: true,
search: {
transform: (value) => {
return {
[`createTime[0]`]: dayjs(value[0])
.startOf('day')
.format('YYYY-MM-DD HH:mm:ss'),
[`createTime[1]`]: dayjs(value[1])
.endOf('day')
.format('YYYY-MM-DD HH:mm:ss'),
};
},
},
render: (_, record: SmsLogVO) =>
dayjs(record.createTime).format('YYYY-MM-DD HH:mm:ss'),
},
{
title: '手机号',
dataIndex: 'mobile',
@@ -24,11 +45,6 @@ export const baseTenantColumns: ProColumns<SmsLogVO>[] = [
title: '发送状态',
dataIndex: 'sendStatus',
},
{
title: '发送人名称',
dataIndex: 'templateNickname',
hideInSearch: true, // 在搜索表单中隐藏
},
{
title: '接收状态',
@@ -48,10 +64,10 @@ export const baseTenantColumns: ProColumns<SmsLogVO>[] = [
hideInSearch: true,
},
{
title: '创建时间',
dataIndex: 'createTime',
title: '发送时间',
dataIndex: 'sendTime',
valueType: 'dateRange',
hideInSearch: true,
hideInTable: true,
search: {
transform: (value) => {
return {
@@ -117,6 +133,16 @@ export const descriptionsColumns = (): ProDescriptionsItemProps<
title: '用户信息',
key: 'mobile',
dataIndex: 'mobile',
render(dom, record) {
return (
<>
<Space>
<Tag>{record.mobile}</Tag>
{record.userId && <Tag>{record.userId}</Tag>}
</Space>
</>
);
},
},
{
title: '短信内容',