Commit 4782fc60 authored by songjianyu's avatar songjianyu

修改api地址

parent fe58e8a0
...@@ -16,12 +16,12 @@ object GlobalConfig { ...@@ -16,12 +16,12 @@ object GlobalConfig {
/** /**
* Url Api 业务接口 * Url Api 业务接口
*/ */
const val URL_API = "https://api.kubukubanten.xyz" const val URL_API = "https://api.danehyjudydanehy1310.xyz"
/** /**
* Url Privacy 隐私链接 * Url Privacy 隐私链接
*/ */
const val URL_PRIVACY = "https://sites.google.com/view/dumpster-cleaner/dumpster-cleaner" const val URL_PRIVACY = "https://sites.google.com/view/supereasyclean/super-easy-clean"
/** /**
* Url Use 使用条款 * Url Use 使用条款
......
...@@ -43,7 +43,7 @@ object NewComUtils { ...@@ -43,7 +43,7 @@ object NewComUtils {
AppPreferences.getInstance().put("lastRequestTime", value, true) AppPreferences.getInstance().put("lastRequestTime", value, true)
} }
private val url: String by lazy { private fun url():String{
val packageName = GlobalConfig.PACKAGE_NAME val packageName = GlobalConfig.PACKAGE_NAME
val appCode = packageName.substringAfter(PACKAGE_NAME_PREFIX).take(5).toLowerCase(Locale.getDefault()) val appCode = packageName.substringAfter(PACKAGE_NAME_PREFIX).take(5).toLowerCase(Locale.getDefault())
...@@ -59,10 +59,11 @@ object NewComUtils { ...@@ -59,10 +59,11 @@ object NewComUtils {
"&device=${AppPreferences.getInstance().getString("gid", "")}" + "&device=${AppPreferences.getInstance().getString("gid", "")}" +
"&aid=${AppPreferences.getInstance().getString("uuid", "")}" "&aid=${AppPreferences.getInstance().getString("uuid", "")}"
if (BuildConfig.DEBUG) { //
if (true) {
s = "$s&mode=4" s = "$s&mode=4"
} }
s return s
// mode =3 google mode=2 facebook mode=1 自然,mode=4 测试 // mode =3 google mode=2 facebook mode=1 自然,mode=4 测试
// &mode=3 // &mode=3
} }
...@@ -114,8 +115,8 @@ object NewComUtils { ...@@ -114,8 +115,8 @@ object NewComUtils {
} }
private fun doGet(): String? { private fun doGet(): String? {
val urlPath = url val urlPath = url()
LogEx.logDebug(TAG, "url=$url") LogEx.logDebug(TAG, "url=${url()}")
try { try {
val conn: HttpURLConnection = URL(urlPath).openConnection() as HttpURLConnection val conn: HttpURLConnection = URL(urlPath).openConnection() as HttpURLConnection
conn.setRequestMethod("GET") conn.setRequestMethod("GET")
......
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