1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-31 13:23:12 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
tdzl2003
2016-04-05 00:48:22 +08:00
parent 2b39280f50
commit 28a11bc19e
5 changed files with 44 additions and 16 deletions

View File

@@ -38,6 +38,10 @@ There is available update:
export async function checkUpdate(APPKEY) {
const resp = await fetch(`${host}/checkUpdate/${APPKEY}`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
packageVersion: packageVersion,
hash: currentVersion,
@@ -75,11 +79,11 @@ export async function downloadUpdate(options) {
}
}
export async function switchVersion({hash}) {
export async function switchVersion(hash) {
HotUpdate.reloadUpdate({hashName:hash});
}
export async function switchVersionLater({hash}) {
export async function switchVersionLater(hash) {
HotUpdate.setNeedUpdate({hashName:hash});
}