| 32 | timer = setInterval(download, 24 * 60 * 60 * 1000) // 1天 |
| 33 | }, |
| 34 | async downloadRemoteConfig () { |
| 35 | if (get().app.remoteConfig.enabled !== true) { |
| 36 | // 删除保存的远程配置文件 |
| 37 | configApi.deleteRemoteConfigFile() |
| 38 | configApi.deleteRemoteConfigFile('_personal') |
| 39 | return |
| 40 | } |
| 41 | |
| 42 | const remoteConfig = get().app.remoteConfig |
| 43 | await configApi.doDownloadRemoteConfig(remoteConfig.url) |
| 44 | await configApi.doDownloadRemoteConfig(remoteConfig.personalUrl, '_personal') |
| 45 | }, |
| 46 | doDownloadRemoteConfig (remoteConfigUrl, suffix = '') { |
| 47 | if (!remoteConfigUrl) { |
| 48 | // 删除保存的远程配置文件 |