mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-01 13:53:11 +08:00
feat: web mock
This commit is contained in:
17
lib/index.web.js
Normal file
17
lib/index.web.js
Normal file
@@ -0,0 +1,17 @@
|
||||
export const downloadRootDir = '';
|
||||
export const packageVersion = '';
|
||||
export const currentVersion = '';
|
||||
export const isFirstTime = false;
|
||||
export const isRolledBack = false;
|
||||
|
||||
const noop = () => {};
|
||||
|
||||
export const checkUpdate = noop;
|
||||
export const downloadUpdate = noop;
|
||||
export const switchVersion = noop;
|
||||
export const switchVersionLater = noop;
|
||||
export const markSuccess = noop;
|
||||
export const downloadAndInstallApk = noop;
|
||||
export const setCustomEndpoints = noop;
|
||||
export const getCurrentVersionInfo = noop;
|
||||
export const simpleUpdate = noop;
|
||||
@@ -140,7 +140,7 @@ export async function checkUpdate(APPKEY, isRetry) {
|
||||
if (isRetry) {
|
||||
throw new Error('无法连接更新服务器,请检查网络连接后重试');
|
||||
}
|
||||
await tryBackupEndpoints(APPKEY);
|
||||
await tryBackupEndpoints();
|
||||
return checkUpdate(APPKEY, true);
|
||||
}
|
||||
const result = await resp.json();
|
||||
|
||||
Reference in New Issue
Block a user