feat: 支付链接入口

2.0/email-builder
Lei OT 10 months ago
parent 5c1fe805ea
commit 7c1b60b2bc

@ -16,6 +16,7 @@ import { postSendEmail } from '@/actions/EmailActions';
import { sentMsgTypeMapped, } from '@/channel/bubbleMsgUtils';
import { useEmailDetail } from '@/hooks/useEmail';
import useSnippetStore from '@/stores/SnippetStore'
import { useOrderStore } from '@/stores/OrderStore'
const getAbstract = (longtext) => {
const lines = longtext.split('\n');
@ -334,7 +335,8 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, toEmail, convers
};
const [openDrawer] = useSnippetStore((state) => [state.openDrawer])
const [openDrawerSnippet] = useSnippetStore((state) => [state.openDrawer])
const [openPaymentDrawer] = useOrderStore((state) => [state.openDrawer])
return (
<>
@ -442,8 +444,8 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, toEmail, convers
<Flex align={'center'} className='absolute right-0'>
{/* todo: 添加: 支付链接 */}
<Divider type='vertical' />
<Button type={'link'} onClick={() => openDrawer()}>图文集</Button>
<Button type={'link'}>支付链接</Button>
<Button type={'link'} onClick={() => openDrawerSnippet()}>图文集</Button>
<Button type={'link'} onClick={() => openPaymentDrawer()}>支付链接</Button>
{/* 更多工具 */}
{/* <Popover
content={

@ -1,21 +1,13 @@
import React, { useState, useRef, useEffect } from 'react';
import { App, Input, Flex, Button, Image, } from 'antd';
import { App, Input, Flex, Button, Image, Tooltip } from 'antd';
// import { Input } from 'react-chat-elements';
import useAuthStore from '@/stores/AuthStore';
import useConversationStore from '@/stores/ConversationStore';
import {
SendOutlined,
MessageOutlined,
SmileOutlined,
PictureOutlined,
CommentOutlined,
UploadOutlined,
CloudUploadOutlined,
FolderAddOutlined,
FilePdfOutlined,
CloseCircleOutlined,
YoutubeOutlined,
AudioOutlined, PlayCircleOutlined, LoadingOutlined, CheckCircleOutlined, FileOutlined
LoadingOutlined, FileOutlined,
DollarOutlined
} from '@ant-design/icons';
import { isEmpty, } from '@/utils/commons';
import { v4 as uuid } from 'uuid';
@ -25,9 +17,9 @@ import InputEmoji from './Emoji';
import InputMediaUpload from './MediaUpload';
import { OSS_URL as aliOSSHost } from '@/config';
import { postUploadFileItem } from '@/actions/CommonActions';
import ExpireTimeClock from '../ExpireTimeClock';
import dayjs from 'dayjs';
import useStyleStore from '@/stores/StyleStore';
import { useOrderStore } from '@/stores/OrderStore'
const ButtonStyleClsMapped =
{
@ -39,6 +31,8 @@ const InputComposer = ({ isWABA, channel }) => {
const [mobile] = useStyleStore((state) => [state.mobile]);
const userId = useAuthStore((state) => state.loginUser.userId);
const [openPaymentDrawer] = useOrderStore((state) => [state.openDrawer])
const websocket = useConversationStore((state) => state.websocket);
const websocketOpened = useConversationStore((state) => state.websocketOpened);
const currentConversation = useConversationStore((state) => state.currentConversation);
@ -304,6 +298,11 @@ const InputComposer = ({ isWABA, channel }) => {
{channel==='waba' && <InputTemplate key='templates' disabled={!talkabled} invokeSendMessage={invokeSendMessage} />}
<InputEmoji key='emoji' disabled={!textabled} inputEmoji={addEmoji} />
<InputMediaUpload key={'addNewMedia'} disabled={!textabled} {...{ invokeUploadFileMessage, invokeSendUploadMessage }} />
<Tooltip title={<><div>支付链接</div></>} >
<Button type='text' onClick={() => openPaymentDrawer()} icon={<DollarOutlined className='text-orange-500' />} size={'middle'} />
</Tooltip>
{/* <Button type='text' className='' icon={<YoutubeOutlined />} size={'middle'} />
<Button type='text' className='' icon={<AudioOutlined />} size={'middle'} />
<Button type='text' className='' icon={<FolderAddOutlined />} size={'middle'} />

Loading…
Cancel
Save