修改验证码界面,修改注册接口传输方式
This commit is contained in:
parent
aca373cd8c
commit
064a6c4c3e
|
|
@ -71,8 +71,12 @@ import com.yingmao.clash.view.dialog.DialogAppVersion
|
||||||
import com.yingmao.clash.view.dialog.DialogDoMainChoose
|
import com.yingmao.clash.view.dialog.DialogDoMainChoose
|
||||||
import com.yingmao.clash.view.dialog.RxDialogSureCancel
|
import com.yingmao.clash.view.dialog.RxDialogSureCancel
|
||||||
import com.yingmao.clash.vm.SplashAtyVM
|
import com.yingmao.clash.vm.SplashAtyVM
|
||||||
|
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.coroutines.MainScope
|
import kotlinx.coroutines.MainScope
|
||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
@ -183,6 +187,9 @@ class SplashActivity : BaseActivity() {
|
||||||
// val Sgtr= AESUtil.decrypt("6A9E6037E4E31FDFE8E09A79FAD64B5CE7AA2D6C0DF34000998651C877C8005AD68274B63FCB1FC35DAFAD278B3EF19B79E83738A3AD5DB70D9601E43050BE0E")
|
// val Sgtr= AESUtil.decrypt("6A9E6037E4E31FDFE8E09A79FAD64B5CE7AA2D6C0DF34000998651C877C8005AD68274B63FCB1FC35DAFAD278B3EF19B79E83738A3AD5DB70D9601E43050BE0E")
|
||||||
// println("Sgtr==>$Sgtr")
|
// println("Sgtr==>$Sgtr")
|
||||||
|
|
||||||
|
// val Sgtr= AESUtil.Registerdecrypt(""
|
||||||
|
// , registerKey, registerIV2)
|
||||||
|
//com.cncat.vpn.common.log.Log.d("Sgtr==>$Sgtr")
|
||||||
// OpenInstall.getWakeUp(intent, wakeUpAdapter)
|
// OpenInstall.getWakeUp(intent, wakeUpAdapter)
|
||||||
// OpenInstall.getInstall { appData, error ->
|
// OpenInstall.getInstall { appData, error ->
|
||||||
// var appData = appData
|
// var appData = appData
|
||||||
|
|
@ -340,13 +347,20 @@ class SplashActivity : BaseActivity() {
|
||||||
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SuppressLint("JavascriptInterface")
|
@SuppressLint("JavascriptInterface")
|
||||||
private fun setWebView() {
|
private fun setWebView() {
|
||||||
rlPb.visibility = View.INVISIBLE
|
rlPb.visibility = View.INVISIBLE
|
||||||
webView.visibility = View.VISIBLE
|
webView.visibility = View.VISIBLE
|
||||||
but_skip.visibility = View.VISIBLE
|
lifecycleScope.launch(Dispatchers.Main) {
|
||||||
|
delay(3000) // 延迟3秒
|
||||||
|
com.cncat.vpn.common.log.Log.d("setWebView delay")
|
||||||
|
but_skip.visibility = View.VISIBLE
|
||||||
|
but_register.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
// WebView设置
|
// WebView设置
|
||||||
val webSettings = webView.settings
|
val webSettings = webView.settings
|
||||||
// 可选,设置开启Chrome调试
|
// 可选,设置开启Chrome调试
|
||||||
|
|
@ -379,7 +393,7 @@ class SplashActivity : BaseActivity() {
|
||||||
|
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public fun getVerifyResult(verifyResult: String): Boolean {
|
public fun getVerifyResult(verifyResult: String): Boolean {
|
||||||
// com.cncat.vpn.common.log.Log.d("verifyResult==>${verifyResult}")
|
com.cncat.vpn.common.log.Log.d("verifyResult==>${verifyResult}")
|
||||||
captchaInfo = verifyResult
|
captchaInfo = verifyResult
|
||||||
|
|
||||||
launch {
|
launch {
|
||||||
|
|
@ -503,6 +517,7 @@ class SplashActivity : BaseActivity() {
|
||||||
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
||||||
rlPb.visibility = View.VISIBLE
|
rlPb.visibility = View.VISIBLE
|
||||||
but_skip.visibility = View.INVISIBLE
|
but_skip.visibility = View.INVISIBLE
|
||||||
|
but_register.visibility = View.INVISIBLE
|
||||||
splashAtyVM.checkLogin()
|
splashAtyVM.checkLogin()
|
||||||
} else {
|
} else {
|
||||||
// doRegister()
|
// doRegister()
|
||||||
|
|
@ -519,6 +534,7 @@ class SplashActivity : BaseActivity() {
|
||||||
ll_action.visibility = View.VISIBLE
|
ll_action.visibility = View.VISIBLE
|
||||||
rlPb.visibility = View.INVISIBLE
|
rlPb.visibility = View.INVISIBLE
|
||||||
but_skip.visibility = View.INVISIBLE
|
but_skip.visibility = View.INVISIBLE
|
||||||
|
but_register.visibility = View.INVISIBLE
|
||||||
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
||||||
|
|
||||||
if (token != null && token.isNotEmpty()) {
|
if (token != null && token.isNotEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,12 @@ interface HttpApi {
|
||||||
)
|
)
|
||||||
@GET("/netbarcloud/open/startImg")
|
@GET("/netbarcloud/open/startImg")
|
||||||
suspend fun splashBg(): StartingBeans
|
suspend fun splashBg(): StartingBeans
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
"User-Agent: Octopus_Android"
|
"User-Agent: Octopus_Android"
|
||||||
)
|
)
|
||||||
@POST("/netbarcloud/vpn/phLogin.do")
|
@POST("/netbarcloud/vpn/phLogin.do")
|
||||||
fun login2(@QueryMap params: Map<String, String>): Call<LoginRsp2>
|
fun login2(@QueryMap params: Map<String, String>): Call<LoginRsp2>
|
||||||
|
|
||||||
//检查登录 : http://10.10.23.115:8020/netbarcloud/api/userinfo
|
//检查登录 : http://10.10.23.115:8020/netbarcloud/api/userinfo
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -87,7 +88,12 @@ interface HttpApi {
|
||||||
"User-Agent: Octopus_Android"
|
"User-Agent: Octopus_Android"
|
||||||
)
|
)
|
||||||
@POST("/netbarcloud/vpn/appRegister2")
|
@POST("/netbarcloud/vpn/appRegister2")
|
||||||
suspend fun encryptionRegister(@QueryMap params: Map<String, String>): RegisterRsp
|
suspend fun encryptionRegister(
|
||||||
|
|
||||||
|
@Body requestBody: RequestBody,
|
||||||
|
): RegisterRsp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//显示赠送时长 :
|
//显示赠送时长 :
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -147,7 +153,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): String
|
): String
|
||||||
|
|
||||||
//心跳 http://10.10.23.115:8020/netbarcloud/api/heartbeat
|
//心跳 http://10.10.23.115:8020/netbarcloud/api/heartbeat
|
||||||
|
|
@ -160,7 +166,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): String
|
): String
|
||||||
|
|
||||||
// @GET("/darkSuperman/lazy/blob/master/fire.json")
|
// @GET("/darkSuperman/lazy/blob/master/fire.json")
|
||||||
|
|
@ -169,40 +175,56 @@ interface HttpApi {
|
||||||
//影猫
|
//影猫
|
||||||
@GET("/host_ym.txt")
|
@GET("/host_ym.txt")
|
||||||
suspend fun getHost(): String
|
suspend fun getHost(): String
|
||||||
|
|
||||||
@GET("/host_ym.txt")
|
@GET("/host_ym.txt")
|
||||||
suspend fun getHostAWS(): String
|
suspend fun getHostAWS(): String
|
||||||
|
|
||||||
@GET("/ym-source/ym/main/host_ym.txt")
|
@GET("/ym-source/ym/main/host_ym.txt")
|
||||||
suspend fun getHostGithub(): String
|
suspend fun getHostGithub(): String
|
||||||
|
|
||||||
//八爪鱼
|
//八爪鱼
|
||||||
@GET("/hostdef.txt")
|
@GET("/hostdef.txt")
|
||||||
suspend fun getBzyHostDef(): String
|
suspend fun getBzyHostDef(): String
|
||||||
|
|
||||||
@GET("/hostdef.txt")
|
@GET("/hostdef.txt")
|
||||||
suspend fun getBzyHostAWS(): String
|
suspend fun getBzyHostAWS(): String
|
||||||
|
|
||||||
@GET("/ym-source/ym/main/hostdef.txt")
|
@GET("/ym-source/ym/main/hostdef.txt")
|
||||||
suspend fun getBzyHostGithub(): String
|
suspend fun getBzyHostGithub(): String
|
||||||
|
|
||||||
//太子
|
//太子
|
||||||
@GET("/hosttaizi.txt")
|
@GET("/hosttaizi.txt")
|
||||||
suspend fun getTzHostTZ(): String
|
suspend fun getTzHostTZ(): String
|
||||||
|
|
||||||
@GET("/hosttaizi.txt")
|
@GET("/hosttaizi.txt")
|
||||||
suspend fun getTzHostAWS(): String
|
suspend fun getTzHostAWS(): String
|
||||||
|
|
||||||
@GET("/ym-source/ym/main/hosttaizi.txt")
|
@GET("/ym-source/ym/main/hosttaizi.txt")
|
||||||
suspend fun getTzHostGithub(): String
|
suspend fun getTzHostGithub(): String
|
||||||
|
|
||||||
//云梯
|
//云梯
|
||||||
@GET("/host_yunti.txt")
|
@GET("/host_yunti.txt")
|
||||||
suspend fun getYunTiHost(): String
|
suspend fun getYunTiHost(): String
|
||||||
|
|
||||||
@GET("/host_yunti.txt")
|
@GET("/host_yunti.txt")
|
||||||
suspend fun getYunTiHostAWS(): String
|
suspend fun getYunTiHostAWS(): String
|
||||||
|
|
||||||
@GET("/ym-source/ym/main/host_yunti.txt")
|
@GET("/ym-source/ym/main/host_yunti.txt")
|
||||||
suspend fun getYunTiHostGithub(): String
|
suspend fun getYunTiHostGithub(): String
|
||||||
|
|
||||||
//注册链接
|
//注册链接
|
||||||
@GET("/ymregister.txt")
|
@GET("/ymregister.txt")
|
||||||
suspend fun getYmRegister(): String
|
suspend fun getYmRegister(): String
|
||||||
|
|
||||||
@GET("/taiziregister.txt")
|
@GET("/taiziregister.txt")
|
||||||
suspend fun getTzRegister(): String
|
suspend fun getTzRegister(): String
|
||||||
|
|
||||||
@GET("/bzyregister.txt")
|
@GET("/bzyregister.txt")
|
||||||
suspend fun getBzyRegister(): String
|
suspend fun getBzyRegister(): String
|
||||||
|
|
||||||
@GET("/yunti_register.txt")
|
@GET("/yunti_register.txt")
|
||||||
suspend fun getYuntiRegister(): String
|
suspend fun getYuntiRegister(): String
|
||||||
|
|
||||||
//客服链接
|
//客服链接
|
||||||
@GET("/ymkefu.txt")
|
@GET("/ymkefu.txt")
|
||||||
suspend fun getYingMaoKefuHost(): String
|
suspend fun getYingMaoKefuHost(): String
|
||||||
|
|
@ -256,9 +278,10 @@ interface HttpApi {
|
||||||
)
|
)
|
||||||
@POST("/netbarcloud/upload/uploadRequestLogs")
|
@POST("/netbarcloud/upload/uploadRequestLogs")
|
||||||
suspend fun uploadRequestLogs(
|
suspend fun uploadRequestLogs(
|
||||||
@Body param: RequestBody, @Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Body param: RequestBody,
|
||||||
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): NormalRsp
|
): NormalRsp
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -269,7 +292,7 @@ interface HttpApi {
|
||||||
suspend fun getDomain(
|
suspend fun getDomain(
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): String
|
): String
|
||||||
|
|
||||||
//http://10.10.23.115:8020/netbarcloud/vpn/getPointCardSurplus.do
|
//http://10.10.23.115:8020/netbarcloud/vpn/getPointCardSurplus.do
|
||||||
|
|
@ -279,7 +302,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): NormalRsp
|
): NormalRsp
|
||||||
|
|
||||||
//http://10.10.23.115:8020/netbarcloud/vpn/phRechargeInfo.do
|
//http://10.10.23.115:8020/netbarcloud/vpn/phRechargeInfo.do
|
||||||
|
|
@ -296,7 +319,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): RechargeInfoRsp
|
): RechargeInfoRsp
|
||||||
|
|
||||||
//http://10.10.23.115:8020/netbarcloud/vpn/phPay.do
|
//http://10.10.23.115:8020/netbarcloud/vpn/phPay.do
|
||||||
|
|
@ -308,7 +331,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): PayRsp
|
): PayRsp
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -317,7 +340,7 @@ interface HttpApi {
|
||||||
@QueryMap params: HashMap<String, String?>,
|
@QueryMap params: HashMap<String, String?>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): PayRsp
|
): PayRsp
|
||||||
|
|
||||||
//http://10.10.23.115:8020/netbarcloud/vpn/appAliPay.do
|
//http://10.10.23.115:8020/netbarcloud/vpn/appAliPay.do
|
||||||
|
|
@ -329,7 +352,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): NormalRsp
|
): NormalRsp
|
||||||
|
|
||||||
//汇旺财二维码支付
|
//汇旺财二维码支付
|
||||||
|
|
@ -341,7 +364,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): QRPayRsp
|
): QRPayRsp
|
||||||
|
|
||||||
//汇旺财二维码支付结果
|
//汇旺财二维码支付结果
|
||||||
|
|
@ -353,7 +376,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): QRPayStatusRsp
|
): QRPayStatusRsp
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -366,7 +389,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): WXPayRsp
|
): WXPayRsp
|
||||||
|
|
||||||
//http://10.10.23.115:8020/netbarcloud/vpn/pcPayStatus.do
|
//http://10.10.23.115:8020/netbarcloud/vpn/pcPayStatus.do
|
||||||
|
|
@ -378,7 +401,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): NormalRsp
|
): NormalRsp
|
||||||
|
|
||||||
//http://10.10.23.115:8020/netbarcloud/vpn/phOrderList.do
|
//http://10.10.23.115:8020/netbarcloud/vpn/phOrderList.do
|
||||||
|
|
@ -390,7 +413,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): ExpensesRecordRsp
|
): ExpensesRecordRsp
|
||||||
|
|
||||||
//http://10.10.23.115:8020/netbarcloud/vpn/pointCardSurplusRecharge.do
|
//http://10.10.23.115:8020/netbarcloud/vpn/pointCardSurplusRecharge.do
|
||||||
|
|
@ -402,7 +425,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): NormalMessageRsp
|
): NormalMessageRsp
|
||||||
|
|
||||||
//http://10.10.23.115:8020/netbarcloud/vpn/appPcPointCardPay.do
|
//http://10.10.23.115:8020/netbarcloud/vpn/appPcPointCardPay.do
|
||||||
|
|
@ -414,7 +437,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): NormalMessageRsp
|
): NormalMessageRsp
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -425,7 +448,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): BiLaiNormalRsp
|
): BiLaiNormalRsp
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -436,7 +459,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): BiLaiNormalRsp
|
): BiLaiNormalRsp
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -447,7 +470,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): PhDownloadUrlRsp
|
): PhDownloadUrlRsp
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -458,7 +481,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): BiLaiPayStatusRsp
|
): BiLaiPayStatusRsp
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -470,7 +493,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): SubscriptionRsp
|
): SubscriptionRsp
|
||||||
|
|
||||||
//网页支付统一订单查询
|
//网页支付统一订单查询
|
||||||
|
|
@ -482,7 +505,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): NormalMessageRsp
|
): NormalMessageRsp
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -493,7 +516,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): AppVersionCheckRsp
|
): AppVersionCheckRsp
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -501,7 +524,7 @@ interface HttpApi {
|
||||||
)
|
)
|
||||||
@GET("/netbarcloud/vpn/upgradeVersion")
|
@GET("/netbarcloud/vpn/upgradeVersion")
|
||||||
suspend fun upgradeVersion(
|
suspend fun upgradeVersion(
|
||||||
@QueryMap params: Map<String, String>
|
@QueryMap params: Map<String, String>,
|
||||||
): AppVersionCheckRsp
|
): AppVersionCheckRsp
|
||||||
|
|
||||||
//忘记密码
|
//忘记密码
|
||||||
|
|
@ -522,7 +545,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): SendSmsRsp
|
): SendSmsRsp
|
||||||
|
|
||||||
//会员签到
|
//会员签到
|
||||||
|
|
@ -534,7 +557,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): VipSignRsp
|
): VipSignRsp
|
||||||
|
|
||||||
//会员签到
|
//会员签到
|
||||||
|
|
@ -546,7 +569,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): GetActivityRsp
|
): GetActivityRsp
|
||||||
|
|
||||||
//获取阿里云上传数据
|
//获取阿里云上传数据
|
||||||
|
|
@ -558,7 +581,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): UploadParamData
|
): UploadParamData
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -570,7 +593,7 @@ interface HttpApi {
|
||||||
@Body requestBody: RequestBody,
|
@Body requestBody: RequestBody,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): PayUploadParamData
|
): PayUploadParamData
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -581,7 +604,7 @@ interface HttpApi {
|
||||||
@QueryMap params: Map<String, String>,
|
@QueryMap params: Map<String, String>,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): AppStartupStatus
|
): AppStartupStatus
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -593,7 +616,7 @@ interface HttpApi {
|
||||||
@Body requestBody: RequestBody,
|
@Body requestBody: RequestBody,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): AppStopStatus
|
): AppStopStatus
|
||||||
|
|
||||||
@Headers(
|
@Headers(
|
||||||
|
|
@ -605,6 +628,6 @@ interface HttpApi {
|
||||||
@Body requestBody: RequestBody,
|
@Body requestBody: RequestBody,
|
||||||
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
@Header("token") string: String = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_TOKEN
|
BZYConstants.MMKV_KEY_TOKEN
|
||||||
).toString()
|
).toString(),
|
||||||
): AppStopStatus
|
): AppStopStatus
|
||||||
}
|
}
|
||||||
|
|
@ -2,6 +2,7 @@ package com.yingmao.clash.vm
|
||||||
|
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
|
import com.google.gson.Gson
|
||||||
import com.orhanobut.logger.Logger
|
import com.orhanobut.logger.Logger
|
||||||
|
|
||||||
import com.tencent.mmkv.MMKV
|
import com.tencent.mmkv.MMKV
|
||||||
|
|
@ -20,6 +21,9 @@ import com.yingmao.clash.net.http.NetService
|
||||||
import com.yingmao.clash.util.AESUtil
|
import com.yingmao.clash.util.AESUtil
|
||||||
|
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
|
import okhttp3.MediaType.Companion.toMediaType
|
||||||
|
import okhttp3.RequestBody
|
||||||
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
|
|
||||||
|
|
||||||
class SplashAtyVM : PublicViewMode() {
|
class SplashAtyVM : PublicViewMode() {
|
||||||
|
|
@ -82,8 +86,12 @@ class SplashAtyVM : PublicViewMode() {
|
||||||
fun registerByEncryption(params: Map<String, String>) {
|
fun registerByEncryption(params: Map<String, String>) {
|
||||||
Log.e("data", "register ....")
|
Log.e("data", "register ....")
|
||||||
val httpApi = NetService.instances.createHttps(HttpApi::class.java)
|
val httpApi = NetService.instances.createHttps(HttpApi::class.java)
|
||||||
|
|
||||||
|
val gson = Gson()
|
||||||
|
val jsonString = gson.toJson(params)
|
||||||
|
val requestBody: RequestBody = jsonString.toRequestBody("application/json; charset=utf-8".toMediaType())
|
||||||
doAsync(HttpReqType.REGISTER) {
|
doAsync(HttpReqType.REGISTER) {
|
||||||
httpApi.encryptionRegister(params)
|
httpApi.encryptionRegister(requestBody)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/login_btn_bg_selector"
|
android:background="@drawable/login_btn_bg_selector"
|
||||||
android:text="@string/skip"
|
android:text="@string/skip"
|
||||||
android:visibility="visible">
|
android:visibility="invisible">
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/login_btn_bg_selector"
|
android:background="@drawable/login_btn_bg_selector"
|
||||||
android:text="@string/email_or_phone_register"
|
android:text="@string/email_or_phone_register"
|
||||||
android:visibility="visible">
|
android:visibility="invisible">
|
||||||
|
|
||||||
</Button>
|
</Button>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
||||||
|
|
@ -338,15 +338,15 @@
|
||||||
<string name="everyDay">每天</string>
|
<string name="everyDay">每天</string>
|
||||||
<string name="PopularApplications">熱門應用</string>
|
<string name="PopularApplications">熱門應用</string>
|
||||||
<string name="PopularApplicationsStr">熱門應用導航</string>
|
<string name="PopularApplicationsStr">熱門應用導航</string>
|
||||||
<string name="sure_restart">"建議重啓 "</string>
|
<string name="sure_restart">"建議重啓"</string>
|
||||||
<string name="restart">"重啓 "</string>
|
<string name="restart">"重啓"</string>
|
||||||
<string name="node_item_test">線路測速</string>
|
<string name="node_item_test">線路測速</string>
|
||||||
|
|
||||||
<string name="agree">同意</string>
|
<string name="agree">同意</string>
|
||||||
<string name="disagree">不同意</string>
|
<string name="disagree">不同意</string>
|
||||||
<string name="skip">直接登入</string>
|
<string name="skip">直接登入</string>
|
||||||
<string name="app_name_yunti">雲梯加速器</string>
|
<string name="app_name_yunti">雲梯加速器</string>
|
||||||
<string name="email_or_phone_register">郵箱註冊</string>
|
<string name="email_or_phone_register">手動注册</string>
|
||||||
|
|
||||||
<string name="CZHY">充值會員</string>
|
<string name="CZHY">充值會員</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -337,15 +337,14 @@
|
||||||
<string name="everyDay">每天</string>
|
<string name="everyDay">每天</string>
|
||||||
<string name="PopularApplications">熱門應用</string>
|
<string name="PopularApplications">熱門應用</string>
|
||||||
<string name="PopularApplicationsStr">熱門應用導航</string>
|
<string name="PopularApplicationsStr">熱門應用導航</string>
|
||||||
<string name="sure_restart">"建議重啓 "</string>
|
<string name="sure_restart">"建議重啓"</string>
|
||||||
<string name="restart">"重啓 "</string>
|
<string name="restart">"重啓"</string>
|
||||||
<string name="node_item_test">線路測速</string>
|
<string name="node_item_test">線路測速</string>
|
||||||
|
|
||||||
<string name="agree">同意</string>
|
<string name="agree">同意</string>
|
||||||
<string name="disagree">不同意</string>
|
<string name="disagree">不同意</string>
|
||||||
<string name="skip">直接登入</string>
|
<string name="skip">直接登入</string>
|
||||||
<string name="app_name_yunti">雲梯加速器</string>
|
<string name="app_name_yunti">雲梯加速器</string>
|
||||||
<string name="email_or_phone_register">郵箱註冊</string>
|
<string name="email_or_phone_register">手動注册</string>
|
||||||
|
|
||||||
<string name="CZHY">充值會員</string>
|
<string name="CZHY">充值會員</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -366,7 +366,7 @@
|
||||||
<string name="skip">直接登录</string>
|
<string name="skip">直接登录</string>
|
||||||
|
|
||||||
<string name="app_name_yunti">云梯加速器</string>
|
<string name="app_name_yunti">云梯加速器</string>
|
||||||
<string name="email_or_phone_register">邮箱注册</string>
|
<string name="email_or_phone_register">手动注册</string>
|
||||||
|
|
||||||
<string name="CZHY">充值会员</string>
|
<string name="CZHY">充值会员</string>
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Reference in New Issue