test: 删除发送邮件的 debug

2.0/email-builder
Lei OT 1 year ago
parent 2401a64fc8
commit 8216df2659

@ -223,7 +223,7 @@ export const sentMsgTypeMapped = {
...msg,
whatsapp_msg_type: '',
actionId: msg.id,
conversationid: msg.id.split('.')[0],
conversationid: msg.conversationid,
originText: msg.text,
text: (msg.text),
msgtext: {

@ -118,6 +118,9 @@ const useAuthStore = create(devtools((set, get) => ({
loadUserSession: () => {
let sessionData = window.sessionStorage.getItem('GLOBAL_SALES_LOGIN_USER')
if (window.location.port === '4173') {
sessionData = `{"userId":"383","userIdStr":"383,609","emailList":[{"opi_sn":383,"mat_sn":760,"email":"lyj@asiahighlights.com","default":false,"backup":false},{"opi_sn":383,"mat_sn":759,"email":"lyj@chinahighlights.com","default":false,"backup":true},{"opi_sn":383,"mat_sn":758,"email":"lyj@hainatravel.com","default":true,"backup":false}],"username":"廖一军","avatarUrl":"https://static-legacy.dingtalk.com/media/lALPBDDrhXr716HNAoDNAoA_640_640.png","mobile":"+86-18777396951","email":"lyj@hainatravel.com","whatsAppBusiness":"8617458471254","openId":"iioljiPmZ4RPoOYpkFiSn7IKAiEiE","accountList":[{"OPI_SN":383,"OPI_Code":"LYJ","OPI_NameCN":"廖一军","OPI_DEI_SN":7,"OPI_NameEN":"Jimmy Liow"},{"OPI_SN":609,"OPI_Code":"LYJAH","OPI_NameCN":"廖一军ah","OPI_DEI_SN":28,"OPI_NameEN":"Jimmy Liow"}]}`
}
if (import.meta.env.DEV && isEmpty(sessionData)) {
sessionData = window.localStorage.getItem('GLOBAL_SALES_LOGIN_USER')
}

@ -33,7 +33,7 @@ const BubbleEmail = ({ onOpenEditor, onOpenEmail, ...message }) => {
}
try {
// debug: mai_sn: emailMsgContent.mai_sn
await postEmailResend({ mai_sn: 5066519, conversationid: message.conversationid, actionId: emailMsgContent.actionId })
await postEmailResend({ mai_sn: emailMsgContent.mai_sn, conversationid: message.conversationid, actionId: emailMsgContent.actionId })
} catch (err) {
notification.error({
message: "请求失败",

@ -66,6 +66,9 @@ const NewTagForm = ({onSubmit,...props}) => {
const EditChatMemoForm = ({onSubmit,...props}) => {
const [form] = Form.useForm();
const [subLoding, setSubLoding] = useState(false);
/**
* @deprecated
*/
const onFinish = async (values) => {
console.log('Received values of form[chat_memo]: ', values);
setSubLoding(true);
@ -85,7 +88,8 @@ const EditChatMemoForm = ({onSubmit,...props}) => {
name='chat_memo_form'
layout='inline' size='small'
initialValues={{}}
onFinish={onFinish}>
// onFinish={onFinish}
>
<Form.Item name={'memo'} rules={[{ required: true, message: '请输入备注' }]}>
<Input placeholder='输入备注' width={400} className='w-64' />
</Form.Item>

@ -60,7 +60,7 @@ const EmailDetail = ({ open, setOpen, emailMsg, ...props }) => {
}
try {
// debug: mai_sn
await postEmailResend({ mai_sn: 5066519, conversationid, actionId })
await postEmailResend({ mai_sn, conversationid, actionId })
setOpen(false)
} catch (err) {
notification.error({

@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import { App, ConfigProvider, Drawer, Button, Form, Input, Flex, Checkbox, Popconfirm, Select, Space, Upload, Divider } from 'antd';
import { App, ConfigProvider, Button, Form, Input, Flex, Checkbox, Popconfirm, Select, Space, Upload, Divider } from 'antd';
import { UploadOutlined } from '@ant-design/icons';
import '@dckj/react-better-modal/dist/index.css';
import DnDModal from '@/components/DndModal';
@ -246,10 +246,10 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, conversationid,
const body = structuredClone(form.getFieldsValue());
body.mailcontent = isRichText ? htmlContent : textContent;
body.from = newFromEmail || fromEmail;
body.to = 'lyt@hainatravel.com'; // debug: 0
// body.to = 'lyt@hainatravel.com'; // debug: 0
body.attaList = fileList;
body.opi_sn = emailUser || fromUser;
body.mat_sn = 278; // emailUserMat
body.mat_sn = emailUserMat;
console.log('body', body);
const values = await form.validateFields();
body.cc = values.cc || '';

Loading…
Cancel
Save