版本更新
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled

This commit is contained in:
hahwu 2025-05-16 16:46:19 +08:00
parent 771ee22d41
commit 2ec5d0a104
4 changed files with 57 additions and 17 deletions

View File

@ -1,4 +1,3 @@
import { requestClient } from '#/api/request';
export interface MailData {
@ -8,8 +7,10 @@ export interface MailData {
CurrentPage?: number;
mail_id?: number;
title: string;
subtitle?: string;
content: string;
title_en: string;
subtitle_en?: string;
content_en: string;
items : string;
start_time: number;

View File

@ -25,6 +25,11 @@ const [Form, FormApi] = useVbenForm({
label: '邮件标题',
rules: "required",
},
{
component: 'Input',
fieldName: 'Subtitle',
label: '邮件副标题',
},
{
component: 'Textarea',
fieldName: 'Content',
@ -41,6 +46,11 @@ const [Form, FormApi] = useVbenForm({
label: '英文邮件标题',
rules: "required",
},
{
component: 'Input',
fieldName: 'SubtitleEN',
label: '英文邮件副标题',
},
{
component: 'Textarea',
fieldName: 'ContentEN',
@ -53,10 +63,10 @@ const [Form, FormApi] = useVbenForm({
},
{
component: 'Textarea',
fieldName: 'Items',
fieldName: 'items',
label: '邮件道具',
componentProps: {
placeholder: '[{Id:1,Num:1},{Id:2,Num:2}]',
placeholder: '{}',
type: 'textarea',
rows: 3,
},
@ -141,10 +151,12 @@ const [Modal, modalApi] = useVbenModal({
const modalData = modalApi.getData();
FormApi.setValues({
Title: modalData.title,
Subtitle: modalData.subtitle,
Content: modalData.content,
TitleEN: modalData.title_en,
SubtitleEN: modalData.subtitle_en,
ContentEN: modalData.content_en,
Items: modalData.items,
items: modalData.items,
start_time: 0 ,
register_time: modalData.register_time ,
mail_type: modalData.mail_type===1 ? '全服邮件' : '个人邮件',
@ -156,6 +168,11 @@ const [Modal, modalApi] = useVbenModal({
disabled: true,
fieldName: 'Title',
},
{
component: 'Input',
disabled: true,
fieldName: 'Subtitle',
},
{
component: 'Textarea',
disabled: true,
@ -166,6 +183,11 @@ const [Modal, modalApi] = useVbenModal({
disabled: true,
fieldName: 'TitleEN',
},
{
component: 'Input',
disabled: true,
fieldName: 'SubtitleEN',
},
{
component: 'Textarea',
disabled: true,
@ -174,7 +196,7 @@ const [Modal, modalApi] = useVbenModal({
{
component: 'Input',
disabled: true,
fieldName: 'Items',
fieldName: 'items',
},
{
component: 'Input',

View File

@ -27,6 +27,11 @@ const [Form, FormApi] = useVbenForm({
label: '邮件标题',
rules: "required",
},
{
component: 'Input',
fieldName: 'Subtitle',
label: '邮件副标题',
},
{
component: 'Textarea',
fieldName: 'Content',
@ -43,6 +48,11 @@ const [Form, FormApi] = useVbenForm({
label: '英文邮件标题',
rules: "required",
},
{
component: 'Input',
fieldName: 'SubtitleEN',
label: '英文邮件副标题',
},
{
component: 'Textarea',
fieldName: 'ContentEN',
@ -148,8 +158,10 @@ const [Modal, modalApi] = useVbenModal({
const mail_type = values.mail_type;
const send_type = values.send_type;
const Title = values.Title;
const Subtitle = values.Subtitle;
const Content = values.Content;
const TitleEN = values.TitleEN;
const SubtitleEN = values.SubtitleEN;
const ContentEN = values.ContentEN;
const Items = values.Items;
const ToUids = values.ToUids;
@ -157,17 +169,19 @@ const [Modal, modalApi] = useVbenModal({
const param: MailData = {
AppId: modalData.AppId,
ServerId: modalData.ServerId,
title:Title,
content:Content,
items:Items,
to_uids:ToUids,
start_time:start_time,
end_time:end_time,
register_time:register_time,
mail_type:mail_type,
send_type:send_type,
title_en:TitleEN,
content_en:ContentEN,
title: Title,
subtitle: Subtitle,
content: Content,
title_en: TitleEN,
subtitle_en: SubtitleEN,
content_en: ContentEN,
items: Items,
to_uids: ToUids,
start_time: start_time,
end_time: end_time,
register_time: register_time,
mail_type: mail_type,
send_type: send_type,
}
await addMailApi(param);
modalApi.close();

View File

@ -73,9 +73,12 @@ const gridOptions: VxeGridProps<MailData> = {
columns: [
{ field: 'mail_id', title: 'id' },
{ field: 'title', title: '邮件标题' },
{ field: 'title_en', title: '英文邮件标题' },
{ field: 'subtitle', title: '邮件副标题' },
{ field: 'subtitleEN', title: '英文邮件副标题' },
{ field: 'content', title: '邮件内容' },
{ field: 'content_en', title: '英文邮件内容' },
{ field: 'items', title: '道具' },
{ field: 'mail_type', title: '邮件类型' , formatter: ({ cellValue }) => cellValue == 1 ? '普通邮件' : '节日邮件'},
{ field: 'send_type', title: '邮件发送类型' , formatter: ({ cellValue }) => cellValue == 1 ? '全服邮件' : '个人邮件'},
{ field: 'to_uids', title: '接收者' },