Commit 4782fc60 authored by songjianyu's avatar songjianyu

修改api地址

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