Commit 7747514a authored by wanglei's avatar wanglei

...配置

parent 893ba7e1
......@@ -223,22 +223,21 @@ class MyApplication : Application() {
private fun initRemoteConfig() {
NewComUtils.requestCfg { config ->
LogEx.logDebug("requestCfg", "config=$config")
if (config != null) {
AppPreferences.getInstance().put("config", config)
initConfig(config)
} else {
EventUtils.event("configNull")
}
LogEx.logDebug("requestCfg", "config=$config")
initConfig(config)
}
}
private fun initConfig(config: String? = AppPreferences.getInstance().getString("config", "")) {
private fun initConfig(config: String) {
kotlin.runCatching {
// kotlin.runCatching {
val configBean = Gson().fromJson(config, ConfigBean::class.java)
val jsonObject = JSONObject()
......@@ -259,7 +258,7 @@ class MyApplication : Application() {
//启动定时器
changeTimer()
}
// }
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment