fix: 默认的WABA号码

dev/emitter
Lei OT 1 year ago
parent f194ee9efe
commit 7dfdcd02e6

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

Loading…
Cancel
Save