添加 h5
This commit is contained in:
@@ -12,6 +12,7 @@ import { PageState } from '@/types/common';
|
||||
import Header from '@/components/Header';
|
||||
|
||||
import styles from './style.less';
|
||||
import h5plus from '@/utils/h5plus';
|
||||
|
||||
const Option = Select.Option;
|
||||
|
||||
@@ -44,8 +45,17 @@ const DrawPage: React.FC<DispatchProp & DrawModelState> = ({
|
||||
);
|
||||
} else if (pageState === PageState.Success) {
|
||||
const coinLabel = coin && coin.label.toUpperCase();
|
||||
const onScan = () => {
|
||||
message.warn(formatMessage({ id: 'draw.qrPrompt' }));
|
||||
const onScan = async () => {
|
||||
if (h5plus.isApp()) {
|
||||
const result = await h5plus.scan();
|
||||
if (result) {
|
||||
dispatch({ type: 'draw/onUpdateState', address: result });
|
||||
} else {
|
||||
message.warn(formatMessage({ id: 'draw.qrPrompt' }));
|
||||
}
|
||||
} else {
|
||||
message.warn(formatMessage({ id: 'draw.qrPrompt' }));
|
||||
}
|
||||
}
|
||||
const confirmContent = (
|
||||
<Modal
|
||||
|
||||
Reference in New Issue
Block a user