1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 10:51:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Add link error hint

This commit is contained in:
sunnylqm
2020-04-30 17:59:28 +08:00
parent 20a21ae894
commit eaae1286f4

View File

@@ -1,7 +1,11 @@
import getHost, { tryBackupDomains } from './getHost'; import getHost, { tryBackupDomains } from './getHost';
import { NativeAppEventEmitter, NativeModules } from 'react-native'; import { NativeAppEventEmitter, NativeModules } from 'react-native';
const Pushy = NativeModules.Pushy || {}; let Pushy = NativeModules.Pushy;
if (!Pushy) {
throw new Error('react-native-update模块无法加载请对照安装文档检查配置。');
}
export const downloadRootDir = Pushy.downloadRootDir; export const downloadRootDir = Pushy.downloadRootDir;
export const packageVersion = Pushy.packageVersion; export const packageVersion = Pushy.packageVersion;
@@ -111,6 +115,11 @@ export function markSuccess() {
Pushy.markSuccess(); Pushy.markSuccess();
} }
// function report(action) {
// // ${project}.${host}/logstores/${logstore}/track?APIVersion=0.6.0&key1=val1
// fetch(`${logUrl}&action=${action}`);
// }
NativeAppEventEmitter.addListener('RCTPushyDownloadProgress', params => {}); NativeAppEventEmitter.addListener('RCTPushyDownloadProgress', params => {});
NativeAppEventEmitter.addListener('RCTPushyUnzipProgress', params => {}); NativeAppEventEmitter.addListener('RCTPushyUnzipProgress', params => {});