Ver Fonte

fix 增加刷新支付方式获取途径

robin há 4 anos atrás
pai
commit
6fbcf3168c

+ 7 - 1
app/src/main/java/com/doverfuelingsolutions/issp/utils/log/DFSLogger.kt

@@ -93,7 +93,13 @@ object DFSLogger {
         is String -> content
         is Iterable<*> -> content.joinToString { stringify(it) }
         is Throwable -> getFullStackTrace(content)
-        else -> gson.toJson(content)
+        else -> {
+            try {
+                gson.toJson(content)
+            } catch (e: Exception) {
+                "null"
+            }
+        }
     }
 
     private fun getFullStackTrace(throwable: Throwable): String {

+ 8 - 0
app/src/main/java/com/doverfuelingsolutions/issp/view/MainActivity.kt

@@ -167,6 +167,9 @@ class MainActivity : AppCompatActivity(),
 
                     initView()
                     DFSToastUtil.success(R.string.refresh_success)
+
+                    // 支付配置
+                    SystemApi.paymentParam()
                 }
             }
         }
@@ -219,6 +222,11 @@ class MainActivity : AppCompatActivity(),
         if (isBottom) {
             mLoginTokenRefresher.start(this)
             handleUnsolvedOrder()
+
+            GlobalScope.launch {
+                // 支付配置
+                SystemApi.paymentParam()
+            }
         }
     }