| 123456789101112131415161718192021222324252627282930313233343536 |
- import i18n from '../i18n';
- import * as Linking from 'expo-linking';
- // import { Toast, ModalIndicator } from 'teaset';
- import { Platform } from 'react-native';
- function connect(navigation) {
- navigation.navigate('AlertModal', {
- msg: `${i18n.t('tips1')}:0512-109291882?`,
- hasCancel: true,
- submitText: i18n.t('li-ji-bo-da'),
- submitEvent: () => {
- Linking.openURL('tel:+123456789');
- },
- });
- }
- function toastShow() {
- if (Platform.OS === 'web') return;
- ModalIndicator.show(i18n.t('jia-zai-zhong'));
- }
- function toastHide() {
- if (Platform.OS === 'web') return;
- ModalIndicator.hide();
- }
- function toastSuccess(title) {
- if (Platform.OS === 'web') return;
- Toast.success(title);
- }
- function toastInfo(title) {
- if (Platform.OS === 'web') return;
- Toast.message(title);
- }
- export { connect, toastShow, toastHide, toastInfo, toastSuccess };
|