fix
This commit is contained in:
parent
d35751c81b
commit
f3b7c4b538
|
|
@ -167,40 +167,48 @@ class NewMainActivity : BaseActivity() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
isUpload = true
|
isUpload = true
|
||||||
GlobalScope.async {
|
try {
|
||||||
val hostsJsonArray = JsonArray()
|
|
||||||
for (hostItem in hostsMem) {
|
|
||||||
val hostAndTime = hostItem.split("{")
|
|
||||||
val hostJsonObject = JsonObject()
|
|
||||||
hostJsonObject.addProperty(
|
|
||||||
"id", MMKV.defaultMMKV().decodeInt(BZYConstants.MMKV_KEY_NOTE_NODE_ID, 0)
|
|
||||||
)
|
|
||||||
hostJsonObject.addProperty("requestHosts", hostAndTime[0])
|
|
||||||
hostJsonObject.addProperty("requestTime", hostAndTime[1])
|
|
||||||
hostsJsonArray.add(hostJsonObject)
|
|
||||||
}
|
|
||||||
|
|
||||||
val httpApi = NetService.instances.createHttps(HttpApi::class.java)
|
|
||||||
val hostsJsonArrayStr = hostsJsonArray.toString()
|
GlobalScope.async {
|
||||||
|
val hostsJsonArray = JsonArray()
|
||||||
|
for (hostItem in hostsMem) {
|
||||||
|
val hostAndTime = hostItem.split("{")
|
||||||
|
val hostJsonObject = JsonObject()
|
||||||
|
hostJsonObject.addProperty(
|
||||||
|
"id", MMKV.defaultMMKV().decodeInt(BZYConstants.MMKV_KEY_NOTE_NODE_ID, 0)
|
||||||
|
)
|
||||||
|
hostJsonObject.addProperty("requestHosts", hostAndTime[0])
|
||||||
|
hostJsonObject.addProperty("requestTime", hostAndTime[1])
|
||||||
|
hostsJsonArray.add(hostJsonObject)
|
||||||
|
}
|
||||||
|
|
||||||
|
val httpApi = NetService.instances.createHttps(HttpApi::class.java)
|
||||||
|
val hostsJsonArrayStr = hostsJsonArray.toString()
|
||||||
// Log.d("hostsJsonArrayStr==>$hostsJsonArrayStr")
|
// Log.d("hostsJsonArrayStr==>$hostsJsonArrayStr")
|
||||||
val hostsJsonArrayStrObject = JsonObject()
|
val hostsJsonArrayStrObject = JsonObject()
|
||||||
hostsJsonArrayStrObject.addProperty("requestLogs", hostsJsonArrayStr)
|
hostsJsonArrayStrObject.addProperty("requestLogs", hostsJsonArrayStr)
|
||||||
val phToken = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_PH_TOKEN, "")
|
val phToken = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_PH_TOKEN, "")
|
||||||
hostsJsonArrayStrObject.addProperty("phToken", phToken)
|
hostsJsonArrayStrObject.addProperty("phToken", phToken)
|
||||||
|
|
||||||
val encryptHostsJsonArrayStrObject = AESUtil.byteArrayToHexStr(
|
val encryptHostsJsonArrayStrObject = AESUtil.byteArrayToHexStr(
|
||||||
AESUtil.encrypt(hostsJsonArrayStrObject.toString())
|
AESUtil.encrypt(hostsJsonArrayStrObject.toString())
|
||||||
)
|
)
|
||||||
// Log.d("encryptHostsJsonArrayStrObject==>$encryptHostsJsonArrayStrObject")
|
// Log.d("encryptHostsJsonArrayStrObject==>$encryptHostsJsonArrayStrObject")
|
||||||
val requestBody: RequestBody = RequestBody.create(
|
val requestBody: RequestBody = RequestBody.create(
|
||||||
"text/plain".toMediaTypeOrNull(), encryptHostsJsonArrayStrObject
|
"text/plain".toMediaTypeOrNull(), encryptHostsJsonArrayStrObject
|
||||||
)
|
)
|
||||||
val uploadRequestLogs = httpApi.uploadRequestLogs(requestBody)
|
val uploadRequestLogs = httpApi.uploadRequestLogs(requestBody)
|
||||||
Log.d("uploadRequestLogs==>${uploadRequestLogs}")
|
Log.d("uploadRequestLogs==>${uploadRequestLogs}")
|
||||||
// if ("0" == uploadRequestLogs.code) {
|
// if ("0" == uploadRequestLogs.code) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
} finally {
|
||||||
hostsMem.clear()
|
hostsMem.clear()
|
||||||
isUpload = false
|
isUpload = false
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -119,11 +119,9 @@ class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatch
|
||||||
getNodesStatus()
|
getNodesStatus()
|
||||||
// accelerateViewModel.getAirNodes()
|
// accelerateViewModel.getAirNodes()
|
||||||
// accelerateViewModel.appCheck()
|
// accelerateViewModel.appCheck()
|
||||||
|
|
||||||
val token = MMKV.defaultMMKV().decodeString(
|
val token = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString()
|
||||||
|
|
||||||
Log.d("token==>$token")
|
Log.d("token==>$token")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class NetService private constructor() : INetService {
|
||||||
val hh = if (!BuildConfig.is_back_cn) {
|
val hh = if (!BuildConfig.is_back_cn) {
|
||||||
// "https://app.bazhuayujiasu.cc:18001"
|
// "https://app.bazhuayujiasu.cc:18001"
|
||||||
// "https://api.gaogaoshousoft.cc:18001"
|
// "https://api.gaogaoshousoft.cc:18001"
|
||||||
// "https://api.yingmaovpnpro.win:18002"
|
// "https://api.yingmaox.cc:8700"
|
||||||
// "https://113.108.210.50:21002"
|
// "https://113.108.210.50:21002"
|
||||||
MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_CURRENT_HOST, BuildConfig.service_url)!!
|
MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_CURRENT_HOST, BuildConfig.service_url)!!
|
||||||
// MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_CURRENT_HOST, "https://app.bazhuayujiasu.cc:18001")
|
// MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_CURRENT_HOST, "https://app.bazhuayujiasu.cc:18001")
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,8 @@ subprojects {
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
//noinspection ExpiredTargetSdkVersion
|
//noinspection ExpiredTargetSdkVersion
|
||||||
targetSdk = 31
|
targetSdk = 31
|
||||||
versionName = "1.0.1.9"
|
versionName = "1.0.2.0"
|
||||||
versionCode = 1019
|
versionCode = 1020
|
||||||
resValue("string", "release_name", "v$versionName")
|
resValue("string", "release_name", "v$versionName")
|
||||||
resValue("integer", "release_code", "$versionCode")
|
resValue("integer", "release_code", "$versionCode")
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue