feat: 集成expo-background-task和expo-task-manager,重构后台任务管理,添加健康提醒功能,优化任务执行逻辑

This commit is contained in:
2025-09-05 22:07:29 +08:00
parent 3c416545db
commit e6708e68c2
7 changed files with 225 additions and 200 deletions

40
package-lock.json generated
View File

@@ -23,6 +23,7 @@
"dayjs": "^1.11.13",
"expo": "53.0.22",
"expo-apple-authentication": "~7.2.4",
"expo-background-task": "~0.2.8",
"expo-blur": "~14.1.5",
"expo-camera": "^16.1.11",
"expo-constants": "~17.1.7",
@@ -39,13 +40,13 @@
"expo-status-bar": "~2.2.3",
"expo-symbols": "~0.4.5",
"expo-system-ui": "~5.0.11",
"expo-task-manager": "~13.1.6",
"expo-web-browser": "~14.2.0",
"lodash": "^4.17.21",
"lottie-react-native": "^7.3.4",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.5",
"react-native-background-fetch": "^4.2.8",
"react-native-cos-sdk": "^1.2.1",
"react-native-device-info": "^14.0.4",
"react-native-exit-app": "^2.0.0",
@@ -7125,6 +7126,18 @@
"react-native": "*"
}
},
"node_modules/expo-background-task": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/expo-background-task/-/expo-background-task-0.2.8.tgz",
"integrity": "sha512-dePyskpmyDZeOtbr9vWFh+Nrse0TvF6YitJqnKcd+3P7pDMiDr1V2aT6zHdNOc5iV9vPaDJoH/zdmlarp1uHMQ==",
"license": "MIT",
"dependencies": {
"expo-task-manager": "~13.1.6"
},
"peerDependencies": {
"expo": "*"
}
},
"node_modules/expo-blur": {
"version": "14.1.5",
"resolved": "https://registry.npmjs.org/expo-blur/-/expo-blur-14.1.5.tgz",
@@ -7455,6 +7468,19 @@
"integrity": "sha512-0v2/ruY7eeKun4BeKu+GcfO+SHBdl0LJn4ZFzTzjHdWES0Cn+ONqKljYaIv8p9MV2Hx/kcdEvbY4lWI34jC/mQ==",
"license": "MIT"
},
"node_modules/expo-task-manager": {
"version": "13.1.6",
"resolved": "https://registry.npmjs.org/expo-task-manager/-/expo-task-manager-13.1.6.tgz",
"integrity": "sha512-sYNAftpIeZ+j6ur17Jo0OpSTk9ks/MDvTbrNCimXMyjIt69XXYL/kAPYf76bWuxOuN8bcJ8Ef8YvihkwFG9hDA==",
"license": "MIT",
"dependencies": {
"unimodules-app-loader": "~5.1.3"
},
"peerDependencies": {
"expo": "*",
"react-native": "*"
}
},
"node_modules/expo-web-browser": {
"version": "14.2.0",
"resolved": "https://registry.npmjs.org/expo-web-browser/-/expo-web-browser-14.2.0.tgz",
@@ -11435,12 +11461,6 @@
}
}
},
"node_modules/react-native-background-fetch": {
"version": "4.2.8",
"resolved": "https://mirrors.tencent.com/npm/react-native-background-fetch/-/react-native-background-fetch-4.2.8.tgz",
"integrity": "sha512-vKPumvhBuxr3oI1L7cNunYIsKV8jD4Xz2A9JT/FW5yvn7GAAct184FAZ9dFef75auBxixinaCjRBlip53xGWmQ==",
"license": "MIT"
},
"node_modules/react-native-cos-sdk": {
"version": "1.2.1",
"resolved": "https://mirrors.tencent.com/npm/react-native-cos-sdk/-/react-native-cos-sdk-1.2.1.tgz",
@@ -13884,6 +13904,12 @@
"node": ">=4"
}
},
"node_modules/unimodules-app-loader": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/unimodules-app-loader/-/unimodules-app-loader-5.1.3.tgz",
"integrity": "sha512-nPUkwfkpJWvdOQrVvyQSUol93/UdmsCVd9Hkx9RgAevmKSVYdZI+S87W73NGKl6QbwK9L1BDSY5OrQuo8Oq15g==",
"license": "MIT"
},
"node_modules/unique-string": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",