fix: 默认的WABA号码

dev/emitter
Lei OT 10 months ago
parent f194ee9efe
commit 7dfdcd02e6

@ -8,7 +8,7 @@ import { SendOutlined, CloseCircleOutlined, LoadingOutlined, FileOutlined } from
import { isEmpty, } from '@/utils/commons';
import { v4 as uuid } from 'uuid';
import { sentMsgTypeMapped, whatsappSupportFileTypes, uploadProgressSimulate } from '@/channel/bubbleMsgUtils';
import { OSS_URL as aliOSSHost } from '@/config';
import { OSS_URL as aliOSSHost, DEFAULT_WABA } from '@/config';
import { postUploadFileItem } from '@/actions/CommonActions';
import dayjs from 'dayjs';
import useStyleStore from '@/stores/StyleStore';
@ -55,17 +55,18 @@ const InputComposer = ({ channel, currentActive }) => {
? 'Enter 发送, Shift+Enter 换行'
: 'Enter 换行';
const [fromIM, setFromIM] = useState('');
const [fromIM, setFromIM] = useState(DEFAULT_WABA);
useEffect(() => {
switch (channel) {
case 'waba':
setFromIM(whatsAppBusiness)
setFromIM(whatsAppBusiness || DEFAULT_WABA)
break
case 'wa':
setFromIM('') // todo: WhatsApp
break
default:
setFromIM(DEFAULT_WABA)
break
}

Loading…
Cancel
Save