一键连更改相关数据
This commit is contained in:
parent
b6b439bca4
commit
7a1312d0b3
|
|
@ -113,17 +113,17 @@ dependencies {
|
||||||
// implementation("com.luozm.captcha:captcha:1.1.2")
|
// implementation("com.luozm.captcha:captcha:1.1.2")
|
||||||
// implementation("com.aliyun.dpa:oss-android-sdk:2.9.19")
|
// implementation("com.aliyun.dpa:oss-android-sdk:2.9.19")
|
||||||
// implementation ("com.hihonor.mcs:ads-identifier:1.0.3.301")
|
// implementation ("com.hihonor.mcs:ads-identifier:1.0.3.301")
|
||||||
implementation("com.github.gzu-liyujiang:Android_CN_OAID:4.2.8") {
|
// implementation("com.github.gzu-liyujiang:Android_CN_OAID:4.2.8") {
|
||||||
exclude("com.hihonor.mcs", "ads-identifier")
|
// exclude("com.hihonor.mcs", "ads-identifier")
|
||||||
exclude("com.huawei.hms", "ads-identifier")
|
// exclude("com.huawei.hms", "ads-identifier")
|
||||||
}
|
// }
|
||||||
|
// 华为的最新版本广告标识服务SDK,参阅 https://developer.huawei.com/consumer/cn/doc/HMSCore-Guides/identifier-service-version-change-history-0000001050066927
|
||||||
|
// api ("com.huawei.hms:ads-identifier:3.4.62.300")
|
||||||
|
// // 荣耀的最新版本广告标识服务SDK,参阅 https://developer.hihonor.com/cn/kitdoc?kitId=11030&navigation=guides&docId=intergrate.md
|
||||||
|
// api ("com.hihonor.mcs:ads-identifier:1.0.2.301")
|
||||||
//stripe 支付
|
//stripe 支付
|
||||||
implementation("com.stripe:stripe-android:21.4.2")// 使用最新版本
|
implementation("com.stripe:stripe-android:21.4.2")// 使用最新版本
|
||||||
implementation("com.github.getActivity:XXPermissions:20.0")
|
implementation("com.github.getActivity:XXPermissions:20.0")
|
||||||
// 华为的最新版本广告标识服务SDK,参阅 https://developer.huawei.com/consumer/cn/doc/HMSCore-Guides/identifier-service-version-change-history-0000001050066927
|
|
||||||
api ("com.huawei.hms:ads-identifier:3.4.62.300")
|
|
||||||
// 荣耀的最新版本广告标识服务SDK,参阅 https://developer.hihonor.com/cn/kitdoc?kitId=11030&navigation=guides&docId=intergrate.md
|
|
||||||
api ("com.hihonor.mcs:ads-identifier:1.0.2.301")
|
|
||||||
implementation("com.android.installreferrer:installreferrer:2.2")// 使用最新版本
|
implementation("com.android.installreferrer:installreferrer:2.2")// 使用最新版本
|
||||||
implementation("io.github.youth5201314:banner:2.2.3")
|
implementation("io.github.youth5201314:banner:2.2.3")
|
||||||
implementation("com.github.zhpanvip:viewpagerindicator:1.2.3")
|
implementation("com.github.zhpanvip:viewpagerindicator:1.2.3")
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,11 @@ import android.graphics.Color
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.LinearLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.appcompat.widget.AppCompatImageView
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
|
@ -54,6 +57,8 @@ import com.yingmao.clash.view.dialog.DialogDoMainChoose
|
||||||
import com.yingmao.clash.view.dialog.PayConfirmDialog
|
import com.yingmao.clash.view.dialog.PayConfirmDialog
|
||||||
import com.yingmao.clash.view.dialog.RxDialogShapeLoading
|
import com.yingmao.clash.view.dialog.RxDialogShapeLoading
|
||||||
import com.yingmao.clash.view.dialog.SplashDialog
|
import com.yingmao.clash.view.dialog.SplashDialog
|
||||||
|
import com.yingmao.clash.webview.BZYWebViewKeFu
|
||||||
|
import com.yingmao.clash.webview.CustomerServiceWebView
|
||||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.coroutines.MainScope
|
import kotlinx.coroutines.MainScope
|
||||||
|
|
@ -63,23 +68,18 @@ import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
class MemberRechargeActivity : BaseActivity() {
|
class MemberRechargeActivity : BaseActivity() {
|
||||||
private lateinit var aiBack: AppCompatImageView
|
private lateinit var aiBack: AppCompatImageView
|
||||||
private lateinit var userIdentity: TextView
|
|
||||||
private lateinit var userIdentityNumber: TextView
|
|
||||||
private lateinit var expirationTime: TextView
|
|
||||||
private lateinit var userIdentityNumberCopy: TextView
|
|
||||||
private lateinit var viewModel: RechargeViewModel
|
private lateinit var viewModel: RechargeViewModel
|
||||||
private lateinit var swipeLayout: SwipeRefreshLayout
|
private lateinit var swipeLayout: SwipeRefreshLayout
|
||||||
private lateinit var rvRechargeList: RecyclerView
|
private lateinit var rvRechargeList:RecyclerView
|
||||||
private lateinit var tvPay: TextView
|
private lateinit var tvPay:TextView
|
||||||
private lateinit var tvRechargeRecord: TextView
|
private lateinit var tvRechargeRecord:TextView
|
||||||
|
private lateinit var clCustom: ConstraintLayout
|
||||||
private var selectedGrade: Grade? = null
|
private var selectedGrade: Grade? = null
|
||||||
|
|
||||||
private lateinit var rxDialogShapeLoading: RxDialogShapeLoading
|
private lateinit var rxDialogShapeLoading: RxDialogShapeLoading
|
||||||
private var outTradeNo = ""
|
private var outTradeNo = ""
|
||||||
private var selectedGradeID: Int = 0
|
private var selectedGradeID :Int=0
|
||||||
|
|
||||||
//stripePay 支付
|
//stripePay 支付
|
||||||
private var paymentIntentClientSecret: String = ""
|
private var paymentIntentClientSecret: String = ""
|
||||||
private val stripe: Stripe by lazy {
|
private val stripe: Stripe by lazy {
|
||||||
|
|
@ -98,69 +98,37 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initData() {
|
private fun initData() {
|
||||||
val validPeriod = MMKV.defaultMMKV().decodeLong(BZYConstants.MMKV_KEY_VPN_VALID_PERIOD)
|
|
||||||
setExpireDate(validPeriod)
|
|
||||||
if (checkExpire()) {
|
|
||||||
userIdentity.text = resources.getString(R.string.TemporaryUser)
|
|
||||||
} else {
|
|
||||||
userIdentity.text = resources.getString(R.string.VIPMember)
|
|
||||||
}
|
|
||||||
userIdentityNumber.text =
|
|
||||||
MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME)
|
|
||||||
|
|
||||||
|
|
||||||
viewModel = ViewModelProvider(this)[RechargeViewModel::class.java]
|
viewModel = ViewModelProvider(this)[RechargeViewModel::class.java]
|
||||||
observe(this, viewModel)
|
observe(this, viewModel)
|
||||||
//获取充值列表
|
//获取充值列表
|
||||||
val username =
|
val username = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME,"")!!
|
||||||
MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")!!
|
val phToken = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_PH_TOKEN,"")!!
|
||||||
val phToken = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_PH_TOKEN, "")!!
|
|
||||||
val userId = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_USER_ID)!!
|
val userId = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_USER_ID)!!
|
||||||
viewModel.getPhRechargeInfo(username, phToken, userId)
|
viewModel.getPhRechargeInfo(username, phToken, userId)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initView() {
|
private fun initView() {
|
||||||
aiBack = findViewById(R.id.aiBack)
|
aiBack=findViewById(R.id.aiBack)
|
||||||
userIdentity = findViewById(R.id.userIdentity)
|
swipeLayout=findViewById(R.id.swipeLayout)
|
||||||
userIdentityNumber = findViewById(R.id.userIdentityNumber)
|
rvRechargeList=findViewById(R.id.rvRechargeList)
|
||||||
expirationTime = findViewById(R.id.expirationTime)
|
tvPay=findViewById(R.id.tvPay)
|
||||||
userIdentityNumberCopy = findViewById(R.id.userIdentityNumberCopy)
|
tvRechargeRecord=findViewById(R.id.tvRechargeRecord)
|
||||||
swipeLayout = findViewById(R.id.swipeLayout)
|
clCustom=findViewById(R.id.clCustom)
|
||||||
rvRechargeList = findViewById(R.id.rvRechargeList)
|
|
||||||
tvPay = findViewById(R.id.tvPay)
|
|
||||||
tvRechargeRecord = findViewById(R.id.tvRechargeRecord)
|
|
||||||
|
|
||||||
swipeLayout.setColorSchemeColors(Color.rgb(47, 223, 189))
|
swipeLayout.setColorSchemeColors(Color.rgb(47, 223, 189))
|
||||||
swipeLayout.setOnRefreshListener {
|
swipeLayout.setOnRefreshListener {
|
||||||
selectedGrade = null
|
selectedGrade = null
|
||||||
val username =
|
val username = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME,"")!!
|
||||||
MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")!!
|
val phToken = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_PH_TOKEN,"")!!
|
||||||
val phToken = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_PH_TOKEN, "")!!
|
|
||||||
//获取充值列表
|
//获取充值列表
|
||||||
val userId = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_USER_ID)!!
|
val userId = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_USER_ID)!!
|
||||||
viewModel.getPhRechargeInfo(username, phToken, userId)
|
viewModel.getPhRechargeInfo(username, phToken, userId)
|
||||||
}
|
}
|
||||||
|
|
||||||
aiBack.setOnClickListener {
|
aiBack.setOnClickListener {
|
||||||
val intent = Intent()
|
val intent=Intent()
|
||||||
this.setResult(1000, intent)
|
this.setResult(1000,intent)
|
||||||
finish() // 关闭当前 Activity
|
finish() // 关闭当前 Activity
|
||||||
}
|
}
|
||||||
|
|
||||||
userIdentityNumberCopy.setOnClickListener {
|
|
||||||
val userName = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME)
|
|
||||||
val clipboardManager = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
|
||||||
val clipData = ClipData.newPlainText("text", userName)
|
|
||||||
clipboardManager.setPrimaryClip(clipData)
|
|
||||||
RxToast.info(resources.getString(R.string.CopyToClipboard))
|
|
||||||
}
|
|
||||||
userIdentityNumber.setOnClickListener {
|
|
||||||
val userName = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME)
|
|
||||||
val clipboardManager = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
|
||||||
val clipData = ClipData.newPlainText("text", userName)
|
|
||||||
clipboardManager.setPrimaryClip(clipData)
|
|
||||||
RxToast.info(resources.getString(R.string.CopyToClipboard))
|
|
||||||
}
|
|
||||||
tvRechargeRecord.setOnClickListener {
|
tvRechargeRecord.setOnClickListener {
|
||||||
startActivity(Intent(this@MemberRechargeActivity, ExpensesRecordActivity::class.java))
|
startActivity(Intent(this@MemberRechargeActivity, ExpensesRecordActivity::class.java))
|
||||||
}
|
}
|
||||||
|
|
@ -170,82 +138,13 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
RxToast.info(resources.getString(R.string.selectRechargeAmount))
|
RxToast.info(resources.getString(R.string.selectRechargeAmount))
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
if(BuildConfig.productId=="9788"){
|
viewModel.pay("1", selectedGrade!!, "pointCard")
|
||||||
val payConfirm =
|
|
||||||
PayConfirmDialog(this)
|
|
||||||
payConfirm.showDialog(this@MemberRechargeActivity)
|
|
||||||
payConfirm.setOnDialogClickListener(object : PayConfirmDialog.ActivityLinkListener{
|
|
||||||
override fun onFinishClickListener() {
|
|
||||||
viewModel.pay("1", selectedGrade!!, "pointCard")
|
|
||||||
payConfirm.cancel()
|
|
||||||
}
|
|
||||||
override fun onCancelClickListener() {
|
|
||||||
payConfirm.cancel()
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
}
|
||||||
}else{
|
clCustom.setOnClickListener {
|
||||||
viewModel.pay("1", selectedGrade!!, "pointCard")
|
startActivity(Intent(this@MemberRechargeActivity, CustomerServiceWebView::class.java))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SimpleDateFormat")
|
|
||||||
fun setExpireDate(validPeriod: Long) {
|
|
||||||
val isExpire = checkExpire()
|
|
||||||
var endTimeInfo = "--"
|
|
||||||
if (isExpire) {
|
|
||||||
endTimeInfo = resources.getString(R.string.AccountExpired)
|
|
||||||
} else {
|
|
||||||
val decodeString = MMKV.defaultMMKV().decodeString(BZYConstants.languageInfo, "")
|
|
||||||
if (decodeString.isNullOrEmpty()) {
|
|
||||||
//获取当前系统语言
|
|
||||||
val config = resources.configuration
|
|
||||||
val language = config.locale.language
|
|
||||||
if (language.equals("en")) {
|
|
||||||
val dateFormat = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
|
||||||
val localEN = Locale.ENGLISH
|
|
||||||
SimpleDateFormat("MM/dd/yyyy HH:mm", localEN)
|
|
||||||
} else {
|
|
||||||
val localEN = Locale.ENGLISH
|
|
||||||
SimpleDateFormat("MM/dd/yyyy HH:mm", localEN)
|
|
||||||
}
|
|
||||||
endTimeInfo = dateFormat.format(validPeriod)
|
|
||||||
} else {
|
|
||||||
val dateFormat = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
|
||||||
SimpleDateFormat("yyyy年MM月dd日 HH:mm")
|
|
||||||
} else {
|
|
||||||
SimpleDateFormat("yyyy年MM月dd日 HH:mm")
|
|
||||||
|
|
||||||
}
|
|
||||||
endTimeInfo = dateFormat.format(validPeriod)
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (decodeString == "English") {
|
|
||||||
val dateFormat = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
|
||||||
val locale = Locale.ENGLISH
|
|
||||||
SimpleDateFormat("MM/dd/yyyy HH:mm", locale)
|
|
||||||
} else {
|
|
||||||
val locale = Locale.ENGLISH
|
|
||||||
SimpleDateFormat("MM/dd/yyyy HH:mm", locale)
|
|
||||||
}
|
|
||||||
endTimeInfo = dateFormat.format(validPeriod)
|
|
||||||
} else {
|
|
||||||
val dateFormat = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
|
||||||
SimpleDateFormat("yyyy年MM月dd日 HH:mm")
|
|
||||||
} else {
|
|
||||||
SimpleDateFormat("yyyy年MM月dd日 HH:mm")
|
|
||||||
}
|
|
||||||
endTimeInfo = dateFormat.format(validPeriod)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
expirationTime.text = endTimeInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun checkExpire(): Boolean {
|
private fun checkExpire(): Boolean {
|
||||||
val validPeriod = MMKV.defaultMMKV().decodeLong(BZYConstants.MMKV_KEY_VPN_VALID_PERIOD)
|
val validPeriod = MMKV.defaultMMKV().decodeLong(BZYConstants.MMKV_KEY_VPN_VALID_PERIOD)
|
||||||
if (validPeriod > 0) {
|
if (validPeriod > 0) {
|
||||||
|
|
@ -264,13 +163,11 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
Logger.d("获取充值续费信息")
|
Logger.d("获取充值续费信息")
|
||||||
swipeLayout.isRefreshing = true
|
swipeLayout.isRefreshing = true
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpReqType.PAY -> {
|
HttpReqType.PAY -> {
|
||||||
Logger.d("支付获取订单号")
|
Logger.d("支付获取订单号")
|
||||||
showLoadingDialog(resources.getString(R.string.GeneratingOrder))
|
showLoadingDialog(resources.getString(R.string.GeneratingOrder))
|
||||||
}
|
}
|
||||||
|
else->{
|
||||||
else -> {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -283,7 +180,7 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
swipeLayout.isRefreshing = false
|
swipeLayout.isRefreshing = false
|
||||||
(httpStatus.rsp as RechargeInfoRsp).let { it ->
|
(httpStatus.rsp as RechargeInfoRsp).let { it ->
|
||||||
if (it.code != "1000") {
|
if (it.code != "1000") {
|
||||||
RxToast.error(if (it.message.isNullOrBlank()) resources.getString(R.string.FailedRechargeList) + "(${it.code})" else "${it.code}:${it.message}")
|
RxToast.error(if (it.message.isNullOrBlank())resources.getString(R.string.FailedRechargeList)+ "(${it.code})" else "${it.code}:${it.message}")
|
||||||
} else {
|
} else {
|
||||||
it.data?.let { rechargeInfo ->
|
it.data?.let { rechargeInfo ->
|
||||||
initAdapter(rechargeInfo)
|
initAdapter(rechargeInfo)
|
||||||
|
|
@ -291,13 +188,12 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpReqType.PAY -> {
|
HttpReqType.PAY -> {
|
||||||
hideLoadingDialog()
|
hideLoadingDialog()
|
||||||
Logger.d("生成订单请求成功")
|
Logger.d("生成订单请求成功")
|
||||||
(httpStatus.rsp as PayRsp).let { rsp ->
|
(httpStatus.rsp as PayRsp).let { rsp ->
|
||||||
if (rsp.code != "1000") {
|
if (rsp.code != "1000") {
|
||||||
RxToast.error(if (rsp.message.isNullOrBlank()) resources.getString(R.string.OrderGenerationFailed) + "(${rsp.code})" else "${rsp.code}:${rsp.message}")
|
RxToast.error(if (rsp.message.isNullOrBlank()) resources.getString(R.string.OrderGenerationFailed)+"(${rsp.code})" else "${rsp.code}:${rsp.message}")
|
||||||
} else {
|
} else {
|
||||||
let {
|
let {
|
||||||
outTradeNo = rsp.data?.outTradeNo!!
|
outTradeNo = rsp.data?.outTradeNo!!
|
||||||
|
|
@ -308,11 +204,10 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpReqType.unionPay -> {
|
HttpReqType.unionPay -> {
|
||||||
(httpStatus.rsp as PayRsp).let { rsp ->
|
(httpStatus.rsp as PayRsp).let { rsp ->
|
||||||
if (rsp.code != "1000") {
|
if (rsp.code != "1000") {
|
||||||
RxToast.error(if (rsp.message.isNullOrBlank()) resources.getString(R.string.OrderGenerationFailed) + "(${rsp.code})" else "${rsp.code}:${rsp.message}")
|
RxToast.error(if (rsp.message.isNullOrBlank()) resources.getString(R.string.OrderGenerationFailed)+"(${rsp.code})" else "${rsp.code}:${rsp.message}")
|
||||||
} else {
|
} else {
|
||||||
if (rsp.data != null) {
|
if (rsp.data != null) {
|
||||||
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(rsp.data.payUrl)))
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(rsp.data.payUrl)))
|
||||||
|
|
@ -320,57 +215,37 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
HttpReqType.StripeType ->{
|
||||||
HttpReqType.StripeType -> {
|
|
||||||
(httpStatus.rsp as PayUploadParamData).let {
|
(httpStatus.rsp as PayUploadParamData).let {
|
||||||
if (it.data != null) {
|
if(it.data!=null){
|
||||||
paymentIntentClientSecret = it.data.clientSecret.toString()
|
paymentIntentClientSecret= it.data.clientSecret.toString()
|
||||||
startCheckout()
|
startCheckout()
|
||||||
} else {
|
}else{
|
||||||
hideLoading()
|
hideLoading()
|
||||||
RxToast.info(getString(R.string.NoPaymentReceipt))
|
RxToast.info(getString(R.string.NoPaymentReceipt))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
HttpReqType.StripeWeChat ->{
|
||||||
HttpReqType.StripeWeChat -> {
|
|
||||||
(httpStatus.rsp as PayUploadParamData).let {
|
(httpStatus.rsp as PayUploadParamData).let {
|
||||||
if (it.data != null) {
|
if(it.data!=null){
|
||||||
paymentIntentClientSecret = it.data.clientSecret.toString()
|
paymentIntentClientSecret= it.data.clientSecret.toString()
|
||||||
val serviceUrl = MMKV.defaultMMKV().decodeString(
|
val serviceUrl = MMKV.defaultMMKV().decodeString(
|
||||||
BZYConstants.MMKV_KEY_CURRENT_HOST,
|
BZYConstants.MMKV_KEY_CURRENT_HOST,
|
||||||
BuildConfig.service_url
|
BuildConfig.service_url
|
||||||
)!!
|
)!!
|
||||||
val payUrl =
|
val payUrl=serviceUrl+"/78zccgy0nsgknh9n4/iiii.html?s=${it.data.clientSecret.toString()}"
|
||||||
serviceUrl + "/78zccgy0nsgknh9n4/iiii.html?s=${it.data.clientSecret.toString()}"
|
|
||||||
val uri = Uri.parse(payUrl)
|
val uri = Uri.parse(payUrl)
|
||||||
val intent = Intent(Intent.ACTION_VIEW)
|
val intent = Intent(Intent.ACTION_VIEW)
|
||||||
intent.setData(uri)
|
intent.setData(uri)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
} else {
|
}else{
|
||||||
hideLoading()
|
hideLoading()
|
||||||
RxToast.info(getString(R.string.NoPaymentReceipt))
|
RxToast.info(getString(R.string.NoPaymentReceipt))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else->{
|
||||||
HttpReqType.CHECK_LOGIN -> {
|
|
||||||
Logger.d("支付成功更新有效期")
|
|
||||||
val checkLoginRsp = httpStatus.rsp
|
|
||||||
if (checkLoginRsp is CheckLoginRsp) {
|
|
||||||
if (checkLoginRsp.code == 0) {
|
|
||||||
if (checkLoginRsp.data != null) {
|
|
||||||
val vpnExpireTime = checkLoginRsp.data.vpnExpireTime
|
|
||||||
setExpireDate(vpnExpireTime)
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
Logger.d("微信或者支付宝支付成功更新有效期失败:${checkLoginRsp.code}${checkLoginRsp.msg}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -389,23 +264,20 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
Logger.d("获取支付订单号异常${httpStatus.msg}")
|
Logger.d("获取支付订单号异常${httpStatus.msg}")
|
||||||
RxToast.error(resources.getString(R.string.DataPayNumber))
|
RxToast.error(resources.getString(R.string.DataPayNumber))
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpReqType.unionPay -> {
|
HttpReqType.unionPay -> {
|
||||||
Logger.d("OrderGenerationFailed${httpStatus.msg}")
|
Logger.d("OrderGenerationFailed${httpStatus.msg}")
|
||||||
RxToast.error(resources.getString(R.string.OrderGenerationFailed))
|
RxToast.error(resources.getString(R.string.OrderGenerationFailed))
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpReqType.StripeType -> {
|
HttpReqType.StripeType -> {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
RxToast.error(resources.getString(R.string.NoPaymentReceipt))
|
RxToast.error(resources.getString(R.string.NoPaymentReceipt))
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else->{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var dialogDoMainChoose: DialogDoMainChoose? = null
|
var dialogDoMainChoose: DialogDoMainChoose? = null
|
||||||
private fun showDomainList() {
|
private fun showDomainList() {
|
||||||
try {
|
try {
|
||||||
|
|
@ -428,8 +300,6 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
val userId = MMKV.defaultMMKV()
|
val userId = MMKV.defaultMMKV()
|
||||||
.decodeString(BZYConstants.MMKV_KEY_USER_ID)!!
|
.decodeString(BZYConstants.MMKV_KEY_USER_ID)!!
|
||||||
viewModel.getPhRechargeInfo(username, phToken, userId)
|
viewModel.getPhRechargeInfo(username, phToken, userId)
|
||||||
dialogDoMainChoose?.dismiss()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun cancel() {
|
override fun cancel() {
|
||||||
|
|
@ -437,32 +307,6 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
dialogDoMainChoose?.dismiss()
|
dialogDoMainChoose?.dismiss()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
dialogDoMainChoose?.setOnListItemListener(object :
|
|
||||||
DialogDoMainChoose.OnListItemListener {
|
|
||||||
override fun listItemClick() {
|
|
||||||
MainApplication.restartApp(this@MemberRechargeActivity, object :
|
|
||||||
MainApplication.OnRestartButtonListener {
|
|
||||||
override fun enterButton() {
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun cancelButton() {
|
|
||||||
val username = MMKV.defaultMMKV()
|
|
||||||
.decodeString(
|
|
||||||
BZYConstants.MMKV_KEY_REMEMBER_USERNAME,
|
|
||||||
""
|
|
||||||
)!!
|
|
||||||
val phToken = MMKV.defaultMMKV()
|
|
||||||
.decodeString(BZYConstants.MMKV_KEY_PH_TOKEN, "")!!
|
|
||||||
val userId = MMKV.defaultMMKV()
|
|
||||||
.decodeString(BZYConstants.MMKV_KEY_USER_ID)!!
|
|
||||||
viewModel.getPhRechargeInfo(username, phToken, userId)
|
|
||||||
dialogDoMainChoose?.dismiss()
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
dialogDoMainChoose?.show()
|
dialogDoMainChoose?.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -473,7 +317,6 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showLoadingDialog(content: String) {
|
private fun showLoadingDialog(content: String) {
|
||||||
apply {
|
apply {
|
||||||
if (!::rxDialogShapeLoading.isInitialized) {
|
if (!::rxDialogShapeLoading.isInitialized) {
|
||||||
|
|
@ -486,37 +329,32 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun hideLoadingDialog() {
|
private fun hideLoadingDialog() {
|
||||||
if (::rxDialogShapeLoading.isInitialized && rxDialogShapeLoading.isShowing) {
|
if (::rxDialogShapeLoading.isInitialized && rxDialogShapeLoading.isShowing) {
|
||||||
rxDialogShapeLoading.cancel()
|
rxDialogShapeLoading.cancel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initAdapter(recharge: RechargeInfo) {
|
private fun initAdapter(recharge: RechargeInfo) {
|
||||||
val rechargeListAdapter = VIPRechargeAdapter()
|
val rechargeListAdapter = VIPRechargeAdapter()
|
||||||
rvRechargeList.layoutManager =
|
rvRechargeList.layoutManager =GridLayoutManager(CommonUtils.getApp(), 2, GridLayoutManager.VERTICAL, false)
|
||||||
GridLayoutManager(CommonUtils.getApp(), 2, GridLayoutManager.VERTICAL, false)
|
rechargeListAdapter.setCloudServiceList(recharge,this@MemberRechargeActivity)
|
||||||
rechargeListAdapter.setCloudServiceList(recharge, this@MemberRechargeActivity)
|
rvRechargeList.adapter=rechargeListAdapter
|
||||||
rvRechargeList.adapter = rechargeListAdapter
|
rechargeListAdapter.setListener(object :VIPRechargeAdapter.VIPRechargeItemClickListener{
|
||||||
rechargeListAdapter.setListener(object : VIPRechargeAdapter.VIPRechargeItemClickListener {
|
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
override fun onItemClick(noteItem: Grade?) {
|
override fun onItemClick(noteItem: Grade?) {
|
||||||
selectedGrade = noteItem
|
selectedGrade=noteItem
|
||||||
val amount = selectedGrade!!.amount?.toFloat()
|
val amount = selectedGrade!!.amount?.toFloat()
|
||||||
if (amount != null) {
|
if (amount != null) {
|
||||||
if (selectedGrade!!.id != null) {
|
if(selectedGrade!!.id!=null){
|
||||||
selectedGradeID = selectedGrade!!.id!!
|
selectedGradeID = selectedGrade!!.id!!
|
||||||
}
|
}
|
||||||
val decimalFormat = DecimalFormat("#0.00")
|
val decimalFormat = DecimalFormat("#0.00")
|
||||||
tvPay.text =
|
tvPay.text =resources.getString(R.string.ActivateVIP)+"(¥${decimalFormat.format(amount)})"
|
||||||
resources.getString(R.string.ActivateVIP) + "(¥${decimalFormat.format(amount)})"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(DelicateCoroutinesApi::class)
|
@OptIn(DelicateCoroutinesApi::class)
|
||||||
private fun startCheckout() {
|
private fun startCheckout() {
|
||||||
GlobalScope.launch {
|
GlobalScope.launch {
|
||||||
|
|
@ -536,14 +374,12 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
RxToast.info(getString(R.string.PaymentCompleted))
|
RxToast.info(getString(R.string.PaymentCompleted))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StripeIntent.Status.RequiresAction -> {
|
StripeIntent.Status.RequiresAction -> {
|
||||||
Log.i("startCheckout:RequiresAction")
|
Log.i("startCheckout:RequiresAction")
|
||||||
ThreadUtils.runOnUiThread {
|
ThreadUtils.runOnUiThread {
|
||||||
RxToast.info(getString(R.string.PaymentCancellation))
|
RxToast.info(getString(R.string.PaymentCancellation))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
Log.i("startCheckout status::${paymentIntent.status}")
|
Log.i("startCheckout status::${paymentIntent.status}")
|
||||||
}
|
}
|
||||||
|
|
@ -559,7 +395,6 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun orderPayment(data: Trade) {
|
private fun orderPayment(data: Trade) {
|
||||||
Log.i("PayGradeIDTEST:${selectedGradeID}")
|
Log.i("PayGradeIDTEST:${selectedGradeID}")
|
||||||
val payList = mutableListOf<RechargeModelEntity>()
|
val payList = mutableListOf<RechargeModelEntity>()
|
||||||
|
|
@ -644,16 +479,9 @@ class MemberRechargeActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onRestart() {
|
|
||||||
super.onRestart()
|
|
||||||
android.util.Log.e("MemberRechargeActivity", " onRestart 重新可见之后刷新有效期")
|
|
||||||
viewModel.checkLogin()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onBackPressed() {
|
override fun onBackPressed() {
|
||||||
val intent = Intent()
|
val intent=Intent()
|
||||||
this.setResult(1000, intent)
|
this.setResult(1000,intent)
|
||||||
finish() // 关闭当前 Activity
|
finish() // 关闭当前 Activity
|
||||||
super.onBackPressed()
|
super.onBackPressed()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,28 +237,8 @@ class NewMainActivity : BaseActivity() {
|
||||||
profileBinder =
|
profileBinder =
|
||||||
MainApplication.getApp()?.let { ProfileManager(it).wrap() as IProfileManager }
|
MainApplication.getApp()?.let { ProfileManager(it).wrap() as IProfileManager }
|
||||||
clashBinder = MainApplication.getApp()?.let { ClashManager(it).wrap() as IClashManager }
|
clashBinder = MainApplication.getApp()?.let { ClashManager(it).wrap() as IClashManager }
|
||||||
|
|
||||||
//文件权限请求
|
|
||||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
||||||
// if (ContextCompat.checkSelfPermission(
|
|
||||||
// this,
|
|
||||||
// Manifest.permission.WRITE_EXTERNAL_STORAGE
|
|
||||||
// ) != PackageManager.PERMISSION_GRANTED
|
|
||||||
// ) {
|
|
||||||
// ActivityCompat.requestPermissions(
|
|
||||||
// this,
|
|
||||||
// arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE),
|
|
||||||
// REQUEST_CODE_WRITE_STORAGE
|
|
||||||
// )
|
|
||||||
// } else {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
mainAtyVM = ViewModelProvider(this).get(MainAtyVM::class.java)
|
mainAtyVM = ViewModelProvider(this).get(MainAtyVM::class.java)
|
||||||
observe(this, mainAtyVM)
|
observe(this, mainAtyVM)
|
||||||
|
|
||||||
mainAtyVM.getRuningNoticeInfo()
|
|
||||||
mainAtyVM.startHeartBeat()
|
mainAtyVM.startHeartBeat()
|
||||||
initViews()
|
initViews()
|
||||||
MMKV.defaultMMKV().encode(BZYConstants.MMKV_KEY_GLOBAL_MODEL, false)
|
MMKV.defaultMMKV().encode(BZYConstants.MMKV_KEY_GLOBAL_MODEL, false)
|
||||||
|
|
@ -267,12 +247,8 @@ class NewMainActivity : BaseActivity() {
|
||||||
|
|
||||||
|
|
||||||
val isGlobal = MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_GLOBAL_MODEL, false)
|
val isGlobal = MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_GLOBAL_MODEL, false)
|
||||||
// val uc = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_VPN_UserCommand, "")
|
|
||||||
// Log.i("newMainActGlo isGlobal==>${isGlobal}, uc==>${uc}")
|
|
||||||
newMainActGlo = isGlobal
|
newMainActGlo = isGlobal
|
||||||
|
|
||||||
startLog()
|
startLog()
|
||||||
// showBindAccount()
|
|
||||||
firstEntry()
|
firstEntry()
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
val requestPermissionLauncher =
|
val requestPermissionLauncher =
|
||||||
|
|
@ -315,7 +291,7 @@ class NewMainActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mainAtyVM.getNoticeInfo()
|
// mainAtyVM.getNoticeInfo()
|
||||||
activityPopupWindow()
|
activityPopupWindow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -589,110 +565,106 @@ class NewMainActivity : BaseActivity() {
|
||||||
} else if (httpStatus.reqType == HttpReqType.GetActivity) {
|
} else if (httpStatus.reqType == HttpReqType.GetActivity) {
|
||||||
val data = httpStatus.rsp as GetActivityRsp
|
val data = httpStatus.rsp as GetActivityRsp
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
if (data.data != null) {
|
if (data.data.data.list.isNotEmpty()) {
|
||||||
if (data.data.data != null) {
|
if(data.data.data.list.size>1){
|
||||||
if (data.data.data.list.isNotEmpty()) {
|
val bannerImgBeans=mutableListOf<BannerImgBean>()
|
||||||
if(data.data.data.list.size>1){
|
data.data.data.list.forEach {item->
|
||||||
val bannerImgBeans=mutableListOf<BannerImgBean>()
|
bannerImgBeans.add(BannerImgBean(item.title,item.content,item.redirectLink,0))
|
||||||
data.data.data.list.forEach {item->
|
}
|
||||||
bannerImgBeans.add(BannerImgBean(item.title,item.content,item.redirectLink,0))
|
homeActivityDialog = HomeActivityDialog(this,bannerImgBeans)
|
||||||
}
|
homeActivityDialog!!.show()
|
||||||
homeActivityDialog = HomeActivityDialog(this,bannerImgBeans)
|
homeActivityDialog?.setOnDialogClickListener(object : HomeActivityDialog.OnHADialogClickListener {
|
||||||
homeActivityDialog!!.show()
|
override fun onRechargeClickListener() {
|
||||||
homeActivityDialog?.setOnDialogClickListener(object : HomeActivityDialog.OnHADialogClickListener {
|
//跳转到支付界面
|
||||||
override fun onRechargeClickListener() {
|
goBackupRechargeWeb()
|
||||||
//跳转到支付界面
|
|
||||||
goBackupRechargeWeb()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCancelClickListener() {
|
|
||||||
homeActivityDialog?.dismiss()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onClickImgType(position: Int) {
|
|
||||||
android.util.Log.i("Postion", "position::$position")
|
|
||||||
|
|
||||||
if(bannerImgBeans.get(position).redirectLink.contains("https:")){
|
|
||||||
var uri = Uri.parse(bannerImgBeans.get(position).redirectLink)
|
|
||||||
val intent = Intent(Intent.ACTION_VIEW)
|
|
||||||
intent.setData(uri)
|
|
||||||
startActivity(intent)
|
|
||||||
}else if(bannerImgBeans.get(position).redirectLink.contains("firstCharge")){
|
|
||||||
goBackupRechargeWeb()
|
|
||||||
}else if(bannerImgBeans.get(position).redirectLink.contains("BindAccount")){
|
|
||||||
var useraccount =
|
|
||||||
MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")!!
|
|
||||||
if (Utils.isEmail(useraccount) || Utils.isPhoneNumber(useraccount)) {
|
|
||||||
RxToast.info(resources.getString(R.string.bindingAgi))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
val dialog = DialogBandChoose(this@NewMainActivity)
|
|
||||||
dialog.setOnBandClickListener(object : DialogBandChoose.OnBandClickListener {
|
|
||||||
override fun onBandClick(isPhone: Boolean) {
|
|
||||||
val intent = Intent(CommonUtils.getApp(), BandPhoneActivity::class.java)
|
|
||||||
intent.putExtra("isPhone", isPhone)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
dialog.show()
|
|
||||||
}else if(bannerImgBeans.get(position).redirectLink.contains("SignIn")){
|
|
||||||
mainAtyVM.vipSign()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
data.data.data.list[0].redirectLink.let {
|
|
||||||
var bannerImgBeans=mutableListOf<BannerImgBean>()
|
|
||||||
bannerImgBeans.add(BannerImgBean(data.data.data.list[0].title,data.data.data.list[0].content,data.data.data.list[0].redirectLink,0))
|
|
||||||
homeActivityDialog =
|
|
||||||
HomeActivityDialog(this,bannerImgBeans)
|
|
||||||
homeActivityDialog!!.show()
|
|
||||||
homeActivityDialog?.setOnDialogClickListener(object :
|
|
||||||
HomeActivityDialog.OnHADialogClickListener {
|
|
||||||
override fun onRechargeClickListener() {
|
|
||||||
//跳转到支付界面
|
|
||||||
goBackupRechargeWeb()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCancelClickListener() {
|
|
||||||
homeActivityDialog?.dismiss()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onClickImgType(position: Int) {
|
|
||||||
android.util.Log.i("Postion", "position::$position")
|
|
||||||
if(bannerImgBeans.get(position).redirectLink.contains("https:")){
|
|
||||||
var uri = Uri.parse(bannerImgBeans.get(position).redirectLink)
|
|
||||||
val intent = Intent(Intent.ACTION_VIEW)
|
|
||||||
intent.setData(uri)
|
|
||||||
startActivity(intent)
|
|
||||||
}else if(bannerImgBeans.get(position).redirectLink.contains("firstCharge")){
|
|
||||||
goBackupRechargeWeb()
|
|
||||||
}else if(bannerImgBeans.get(position).redirectLink.contains("BindAccount")){
|
|
||||||
var useraccount =
|
|
||||||
MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")!!
|
|
||||||
if (Utils.isEmail(useraccount) || Utils.isPhoneNumber(useraccount)) {
|
|
||||||
RxToast.info(resources.getString(R.string.bindingAgi))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
val dialog = DialogBandChoose(this@NewMainActivity)
|
|
||||||
dialog.setOnBandClickListener(object : DialogBandChoose.OnBandClickListener {
|
|
||||||
override fun onBandClick(isPhone: Boolean) {
|
|
||||||
val intent = Intent(CommonUtils.getApp(), BandPhoneActivity::class.java)
|
|
||||||
intent.putExtra("isPhone", isPhone)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
dialog.show()
|
|
||||||
}else if(bannerImgBeans.get(position).redirectLink.contains("SignIn")){
|
|
||||||
mainAtyVM.vipSign()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onCancelClickListener() {
|
||||||
|
homeActivityDialog?.dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onClickImgType(position: Int) {
|
||||||
|
android.util.Log.i("Postion", "position::$position")
|
||||||
|
|
||||||
|
if(bannerImgBeans.get(position).redirectLink.contains("https:")){
|
||||||
|
val uri = Uri.parse(bannerImgBeans.get(position).redirectLink)
|
||||||
|
val intent = Intent(Intent.ACTION_VIEW)
|
||||||
|
intent.setData(uri)
|
||||||
|
startActivity(intent)
|
||||||
|
}else if(bannerImgBeans.get(position).redirectLink.contains("firstCharge")){
|
||||||
|
goBackupRechargeWeb()
|
||||||
|
}else if(bannerImgBeans.get(position).redirectLink.contains("BindAccount")){
|
||||||
|
var useraccount =
|
||||||
|
MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")!!
|
||||||
|
if (Utils.isEmail(useraccount) || Utils.isPhoneNumber(useraccount)) {
|
||||||
|
RxToast.info(resources.getString(R.string.bindingAgi))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
val dialog = DialogBandChoose(this@NewMainActivity)
|
||||||
|
dialog.setOnBandClickListener(object : DialogBandChoose.OnBandClickListener {
|
||||||
|
override fun onBandClick(isPhone: Boolean) {
|
||||||
|
val intent = Intent(CommonUtils.getApp(), BandPhoneActivity::class.java)
|
||||||
|
intent.putExtra("isPhone", isPhone)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
dialog.show()
|
||||||
|
}else if(bannerImgBeans.get(position).redirectLink.contains("SignIn")){
|
||||||
|
mainAtyVM.vipSign()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
data.data.data.list[0].redirectLink.let {
|
||||||
|
var bannerImgBeans=mutableListOf<BannerImgBean>()
|
||||||
|
bannerImgBeans.add(BannerImgBean(data.data.data.list[0].title,data.data.data.list[0].content,data.data.data.list[0].redirectLink,0))
|
||||||
|
homeActivityDialog =
|
||||||
|
HomeActivityDialog(this,bannerImgBeans)
|
||||||
|
homeActivityDialog!!.show()
|
||||||
|
homeActivityDialog?.setOnDialogClickListener(object :
|
||||||
|
HomeActivityDialog.OnHADialogClickListener {
|
||||||
|
override fun onRechargeClickListener() {
|
||||||
|
//跳转到支付界面
|
||||||
|
goBackupRechargeWeb()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCancelClickListener() {
|
||||||
|
homeActivityDialog?.dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onClickImgType(position: Int) {
|
||||||
|
android.util.Log.i("Postion", "position::$position")
|
||||||
|
if(bannerImgBeans.get(position).redirectLink.contains("https:")){
|
||||||
|
var uri = Uri.parse(bannerImgBeans.get(position).redirectLink)
|
||||||
|
val intent = Intent(Intent.ACTION_VIEW)
|
||||||
|
intent.setData(uri)
|
||||||
|
startActivity(intent)
|
||||||
|
}else if(bannerImgBeans.get(position).redirectLink.contains("firstCharge")){
|
||||||
|
goBackupRechargeWeb()
|
||||||
|
}else if(bannerImgBeans.get(position).redirectLink.contains("BindAccount")){
|
||||||
|
var useraccount =
|
||||||
|
MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, "")!!
|
||||||
|
if (Utils.isEmail(useraccount) || Utils.isPhoneNumber(useraccount)) {
|
||||||
|
RxToast.info(resources.getString(R.string.bindingAgi))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
val dialog = DialogBandChoose(this@NewMainActivity)
|
||||||
|
dialog.setOnBandClickListener(object : DialogBandChoose.OnBandClickListener {
|
||||||
|
override fun onBandClick(isPhone: Boolean) {
|
||||||
|
val intent = Intent(CommonUtils.getApp(), BandPhoneActivity::class.java)
|
||||||
|
intent.putExtra("isPhone", isPhone)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
dialog.show()
|
||||||
|
}else if(bannerImgBeans.get(position).redirectLink.contains("SignIn")){
|
||||||
|
mainAtyVM.vipSign()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,11 +149,7 @@ class SplashActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
private fun initApplication(isNeedRegister: Boolean) {
|
private fun initApplication(isNeedRegister: Boolean) {
|
||||||
username = Utils.getUniqueID(this)
|
username = Utils.getUniqueID(this)
|
||||||
val decodeBool =
|
MainApplication.initUtil()
|
||||||
MMKV.defaultMMKV().decodeBool(BZYConstants.is_splash_first, false)
|
|
||||||
if(decodeBool){
|
|
||||||
MainApplication.initUtil()
|
|
||||||
}
|
|
||||||
setLocalLanguage()
|
setLocalLanguage()
|
||||||
// splashAtyVM.getSplashBg()
|
// splashAtyVM.getSplashBg()
|
||||||
var clashBinder = MainApplication.getApp()?.let {
|
var clashBinder = MainApplication.getApp()?.let {
|
||||||
|
|
@ -449,7 +445,6 @@ class SplashActivity : BaseActivity() {
|
||||||
override fun onFinishClickListener() {
|
override fun onFinishClickListener() {
|
||||||
doRegisterByEncryption()
|
doRegisterByEncryption()
|
||||||
MMKV.defaultMMKV().encode(BZYConstants.is_splash_first, true)
|
MMKV.defaultMMKV().encode(BZYConstants.is_splash_first, true)
|
||||||
MainApplication.initUtil()
|
|
||||||
}
|
}
|
||||||
override fun onCancelClickListener() {
|
override fun onCancelClickListener() {
|
||||||
MMKV.defaultMMKV().encode(BZYConstants.is_splash_first, false)
|
MMKV.defaultMMKV().encode(BZYConstants.is_splash_first, false)
|
||||||
|
|
@ -471,7 +466,7 @@ class SplashActivity : BaseActivity() {
|
||||||
rlPb.visibility = View.INVISIBLE
|
rlPb.visibility = View.INVISIBLE
|
||||||
but_skip?.visibility = View.INVISIBLE
|
but_skip?.visibility = View.INVISIBLE
|
||||||
but_register?.visibility = View.INVISIBLE
|
but_register?.visibility = View.INVISIBLE
|
||||||
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
if (MMKV.defaultMMKV().decodeBool(MMKV_KEY_IS_REGISTER, false)) {
|
||||||
|
|
||||||
if (token != null && token.isNotEmpty()) {
|
if (token != null && token.isNotEmpty()) {
|
||||||
ll_action.visibility = View.GONE
|
ll_action.visibility = View.GONE
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,6 @@ import androidx.core.content.getSystemService
|
||||||
import com.cncat.vpn.common.Global
|
import com.cncat.vpn.common.Global
|
||||||
import com.cncat.vpn.common.compat.currentProcessName
|
import com.cncat.vpn.common.compat.currentProcessName
|
||||||
import com.cncat.vpn.common.log.Log
|
import com.cncat.vpn.common.log.Log
|
||||||
import com.github.gzuliyujiang.oaid.DeviceID
|
|
||||||
import com.github.gzuliyujiang.oaid.DeviceIdentifier
|
|
||||||
import com.github.gzuliyujiang.oaid.IGetter
|
|
||||||
|
|
||||||
import com.jakewharton.processphoenix.ProcessPhoenix
|
import com.jakewharton.processphoenix.ProcessPhoenix
|
||||||
import com.orhanobut.logger.Logger
|
import com.orhanobut.logger.Logger
|
||||||
|
|
@ -94,7 +91,7 @@ class MainApplication : Application() {
|
||||||
|
|
||||||
fun initUtil() {
|
fun initUtil() {
|
||||||
getApp()?.let { mainApplication ->
|
getApp()?.let { mainApplication ->
|
||||||
DeviceIdentifier.register(mApp);
|
// DeviceIdentifier.register(mApp)
|
||||||
|
|
||||||
val processName = mainApplication.currentProcessName
|
val processName = mainApplication.currentProcessName
|
||||||
mainApplication.extractGeoFiles()
|
mainApplication.extractGeoFiles()
|
||||||
|
|
@ -106,22 +103,22 @@ class MainApplication : Application() {
|
||||||
* */
|
* */
|
||||||
val crashCatchHandler: CrashCatchHandler = CrashCatchHandler.getInstance() //获得单例
|
val crashCatchHandler: CrashCatchHandler = CrashCatchHandler.getInstance() //获得单例
|
||||||
crashCatchHandler.init(mainApplication) //初始化,传入context
|
crashCatchHandler.init(mainApplication) //初始化,传入context
|
||||||
|
//
|
||||||
if (DeviceID.supportedOAID(mainApplication)) {
|
// if (DeviceID.supportedOAID(mainApplication)) {
|
||||||
// 获取OAID/AAID,异步回调
|
// // 获取OAID/AAID,异步回调
|
||||||
DeviceID.getOAID(mainApplication, object : IGetter {
|
// DeviceID.getOAID(mainApplication, object : IGetter {
|
||||||
override fun onOAIDGetComplete(result: String) {
|
// override fun onOAIDGetComplete(result: String) {
|
||||||
// 不同厂商的OAID/AAID格式是不一样的,可进行MD5、SHA1之类的哈希运算统一
|
// // 不同厂商的OAID/AAID格式是不一样的,可进行MD5、SHA1之类的哈希运算统一
|
||||||
Log.d("onOAIDGetComplete ${result}")
|
// Log.d("onOAIDGetComplete ${result}")
|
||||||
OAID = result
|
// OAID = result
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
override fun onOAIDGetError(error: Exception) {
|
// override fun onOAIDGetError(error: Exception) {
|
||||||
// 获取OAID/AAID失败
|
// // 获取OAID/AAID失败
|
||||||
error.printStackTrace()
|
// error.printStackTrace()
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
//openinstall
|
//openinstall
|
||||||
// OpenInstall.init(applicationContext);
|
// OpenInstall.init(applicationContext);
|
||||||
PaymentConfiguration.init(
|
PaymentConfiguration.init(
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import android.view.ViewGroup
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.cncat.vpn.common.log.Log
|
|
||||||
import com.yingmao.clash.R
|
import com.yingmao.clash.R
|
||||||
import com.yingmao.clash.net.http.entity.Grade
|
import com.yingmao.clash.net.http.entity.Grade
|
||||||
import com.yingmao.clash.net.http.entity.RechargeInfo
|
import com.yingmao.clash.net.http.entity.RechargeInfo
|
||||||
|
|
@ -47,13 +46,11 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
|
||||||
LayoutInflater.from(context)
|
LayoutInflater.from(context)
|
||||||
.inflate(R.layout.vip_recharge_list_item_layout, parent, false)
|
.inflate(R.layout.vip_recharge_list_item_layout, parent, false)
|
||||||
)
|
)
|
||||||
|
|
||||||
// override fun getItemCount() = rechargeInfo.grade?.size
|
|
||||||
override fun getItemCount(): Int {
|
override fun getItemCount(): Int {
|
||||||
if(rechargeInfo.grade!=null){
|
if(rechargeInfo.grade!=null){
|
||||||
return rechargeInfo.grade!!.size
|
return rechargeInfo.grade!!.size
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged", "SetTextI18n")
|
@SuppressLint("NotifyDataSetChanged", "SetTextI18n")
|
||||||
|
|
@ -71,6 +68,7 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
|
||||||
val firstPayGiftDay = rechargeInfo.firstPayGiftDay?.toInt()?:0
|
val firstPayGiftDay = rechargeInfo.firstPayGiftDay?.toInt()?:0
|
||||||
val notFirstPayGiftDay = rechargeInfo.notFirstPayGiftDay?.toInt()?:0
|
val notFirstPayGiftDay = rechargeInfo.notFirstPayGiftDay?.toInt()?:0
|
||||||
val totalGiftAmount = giftDay + firstPayGiftDay + notFirstPayGiftDay
|
val totalGiftAmount = giftDay + firstPayGiftDay + notFirstPayGiftDay
|
||||||
|
android.util.Log.i("AAAATAAAA","totalGiftAmount:::"+totalGiftAmount)
|
||||||
when (rechargeInfo.grade?.getOrNull(position)?.days) {
|
when (rechargeInfo.grade?.getOrNull(position)?.days) {
|
||||||
30 -> {
|
30 -> {
|
||||||
holder.tvDayTxt.text = context!!.resources.getString(R.string.price30)
|
holder.tvDayTxt.text = context!!.resources.getString(R.string.price30)
|
||||||
|
|
@ -132,14 +130,15 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
|
||||||
|
|
||||||
if (selectorPosition == position) {
|
if (selectorPosition == position) {
|
||||||
holder.rechargeItemRl.isSelected = true
|
holder.rechargeItemRl.isSelected = true
|
||||||
|
holder.rechargeItemRl.setBackgroundResource(R.drawable.oc_pay_choose_bg)
|
||||||
if (selectorPosition == 0) {
|
if (selectorPosition == 0) {
|
||||||
listener?.onItemClick(rechargeInfo.grade?.getOrNull(position))
|
listener?.onItemClick(rechargeInfo.grade?.getOrNull(position))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
holder.rechargeItemRl.isSelected = false
|
holder.rechargeItemRl.isSelected = false
|
||||||
|
holder.rechargeItemRl.setBackgroundResource(R.drawable.oc_pay_item_bg)
|
||||||
}
|
}
|
||||||
holder.rechargeItemRl.setOnClickListener {
|
holder.rechargeItemRl.setOnClickListener {
|
||||||
Log.i("TESSS position:${position}")
|
|
||||||
listener?.onItemClick(rechargeInfo.grade?.getOrNull(position))
|
listener?.onItemClick(rechargeInfo.grade?.getOrNull(position))
|
||||||
selectorPosition = position
|
selectorPosition = position
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
|
|
@ -159,60 +158,6 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(rechargeInfo.grade!=null){
|
|
||||||
// holder.tvDayAverage.text=" ¥${rechargeInfo.grade?.getOrNull(position)?.amount}"
|
|
||||||
// if(rechargeInfo.grade?.getOrNull(position)?.days!=null){
|
|
||||||
// holder.tvDiscount.text=" ¥"+context!!.resources.getString(R.string.Discount).replace("$","${rechargeInfo.grade?.getOrNull(position)?.monthlyAmount}")
|
|
||||||
// if(context!=null){
|
|
||||||
// when(rechargeInfo.grade?.getOrNull(position)?.days){
|
|
||||||
// 30->{
|
|
||||||
// holder.tvDayTxt.text=context!!.resources.getString(R.string.price30)
|
|
||||||
// }
|
|
||||||
// 90->{
|
|
||||||
// holder.tvDayTxt.text=context!!.resources.getString(R.string.price90)
|
|
||||||
// }
|
|
||||||
// 180->{
|
|
||||||
// holder.tvDayTxt.text=context!!.resources.getString(R.string.price180)
|
|
||||||
// }
|
|
||||||
// 365->{
|
|
||||||
// holder.tvDayTxt.text=context!!.resources.getString(R.string.price365)
|
|
||||||
// }
|
|
||||||
// else->{
|
|
||||||
// holder.tvDayTxt.text="${rechargeInfo.grade?.getOrNull(position)?.days}"+ context!!.resources.getString(R.string.day)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// if(selectorPosition == position){
|
|
||||||
// holder.rechargeItemRl.isSelected = true
|
|
||||||
// if(selectorPosition==0){
|
|
||||||
// listener?.onItemClick(rechargeInfo.grade?.getOrNull(position))
|
|
||||||
// }
|
|
||||||
// }else{
|
|
||||||
// holder.rechargeItemRl.isSelected = false
|
|
||||||
// }
|
|
||||||
// holder.rechargeItemRl.setOnClickListener {
|
|
||||||
// Log.i("TESSS position:${position}")
|
|
||||||
// listener?.onItemClick(rechargeInfo.grade?.getOrNull(position))
|
|
||||||
// selectorPosition=position
|
|
||||||
// notifyDataSetChanged()
|
|
||||||
// }
|
|
||||||
// if(rechargeInfo.grade?.getOrNull(position)?.giftDay!=null&&rechargeInfo.firstPayGiftDay!=null&&rechargeInfo.notFirstPayGiftDay!=null){
|
|
||||||
// val giftDay =rechargeInfo.grade?.getOrNull(position)?.giftDay?:0
|
|
||||||
// val firstPayGiftDay =rechargeInfo.firstPayGiftDay!!.toInt()
|
|
||||||
// val notFirstPayGiftDay =rechargeInfo.notFirstPayGiftDay!!.toInt()
|
|
||||||
// val totalGiftAmount=giftDay+firstPayGiftDay+notFirstPayGiftDay
|
|
||||||
//
|
|
||||||
// if(totalGiftAmount>0){
|
|
||||||
// holder.clRandomlySend.visibility=View.VISIBLE
|
|
||||||
// holder.tvRandomlySend.text=context!!.resources.getString(R.string.GiveawayDay).replace("$","$totalGiftAmount")
|
|
||||||
// }else{
|
|
||||||
// holder.clRandomlySend.visibility=View.GONE
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -93,10 +93,10 @@ class NetService private constructor() : INetService {
|
||||||
// .sslSocketFactory(getSSLSocketFactory(), CustomTrustManager())//信任所有证书
|
// .sslSocketFactory(getSSLSocketFactory(), CustomTrustManager())//信任所有证书
|
||||||
.sslSocketFactory(getSSLSocketFactory(), trustAllCerts[0] as X509TrustManager)
|
.sslSocketFactory(getSSLSocketFactory(), trustAllCerts[0] as X509TrustManager)
|
||||||
.hostnameVerifier(getHostnameVerifier()!!)
|
.hostnameVerifier(getHostnameVerifier()!!)
|
||||||
if (BuildConfig.DEBUG) {
|
// if (BuildConfig.DEBUG) {
|
||||||
builder.addInterceptor(loggingInterceptor)
|
// builder.addInterceptor(loggingInterceptor)
|
||||||
}
|
// }
|
||||||
// builder.addInterceptor(loggingInterceptor)
|
builder.addInterceptor(loggingInterceptor)
|
||||||
return builder.build()
|
return builder.build()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,19 @@
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
<!-- This is the main color -->
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<!-- 边框颜色 -->
|
||||||
|
<solid android:color="#5A2B31"/>
|
||||||
|
<corners android:radius="16dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<!-- 给View的上 左 右设置8dp的边框 -->
|
||||||
|
<item android:top="1dp" android:left="1dp" android:right="3dp" android:bottom="3dp" >
|
||||||
|
<shape>
|
||||||
|
<!-- View填充颜色 -->
|
||||||
|
<solid android:color="#FFFFFF" />
|
||||||
|
<corners android:radius="16dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</layer-list>
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
<!-- This is the main color -->
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<!-- 边框颜色 -->
|
||||||
|
<solid android:color="#5A2B31"/>
|
||||||
|
<corners android:radius="16dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<!-- 给View的上 左 右设置8dp的边框 -->
|
||||||
|
<item android:top="1dp" android:left="1dp" android:right="3dp" android:bottom="3dp" >
|
||||||
|
<shape>
|
||||||
|
<!-- View填充颜色 -->
|
||||||
|
<solid android:color="#FFDBB2" />
|
||||||
|
<corners android:radius="16dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</layer-list>
|
||||||
|
|
@ -5,6 +5,6 @@
|
||||||
android:drawable="@color/translate"/>
|
android:drawable="@color/translate"/>
|
||||||
<item
|
<item
|
||||||
android:state_pressed="true"
|
android:state_pressed="true"
|
||||||
android:drawable="@color/black_141b21">
|
android:drawable="@color/gray_BDBDBD">
|
||||||
</item>
|
</item>
|
||||||
</selector>
|
</selector>
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".act.InstallApplicationActivity"
|
tools:context=".act.InstallApplicationActivity"
|
||||||
android:background="@drawable/homeact_linea_bg"
|
android:background="@mipmap/oc_index_bg"
|
||||||
>
|
>
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appBar"
|
android:id="@+id/appBar"
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
android:id="@+id/AIVBack"
|
android:id="@+id/AIVBack"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_mode_write"
|
android:src="@drawable/ic_mode_black"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
/>
|
/>
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,7 @@
|
||||||
android:layout_marginStart="13dp"
|
android:layout_marginStart="13dp"
|
||||||
android:layout_marginEnd="13dp"
|
android:layout_marginEnd="13dp"
|
||||||
android:layout_marginTop="31dp"
|
android:layout_marginTop="31dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:background="@drawable/oc_setting_lo_bg"
|
android:background="@drawable/oc_setting_lo_bg"
|
||||||
>
|
>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@drawable/oc_version_up_bg"
|
android:background="@mipmap/oc_index_bg"
|
||||||
>
|
>
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/ivBack"
|
android:id="@+id/ivBack"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:background="@drawable/ic_index_bg"
|
android:background="@mipmap/oc_index_bg"
|
||||||
android:id="@+id/root_view"
|
android:id="@+id/root_view"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
>
|
>
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
android:id="@+id/aiBack"
|
android:id="@+id/aiBack"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_s_back"
|
android:src="@drawable/ic_mode_black"
|
||||||
android:contentDescription="@string/kefu"
|
android:contentDescription="@string/kefu"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,7 @@
|
||||||
android:button="@null"
|
android:button="@null"
|
||||||
android:checked="true"
|
android:checked="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:drawablePadding="@dimen/dp_10"
|
||||||
app:drawableLeftCompat="@drawable/checked_selector"
|
app:drawableLeftCompat="@drawable/checked_selector"
|
||||||
app:layout_constraintStart_toStartOf="@+id/cb_remember_password"
|
app:layout_constraintStart_toStartOf="@+id/cb_remember_password"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cb_remember_password"
|
app:layout_constraintTop_toBottomOf="@+id/cb_remember_password"
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@
|
||||||
android:paddingLeft="@dimen/dp_10"
|
android:paddingLeft="@dimen/dp_10"
|
||||||
android:paddingTop="30dp"
|
android:paddingTop="30dp"
|
||||||
android:paddingRight="@dimen/dp_10"
|
android:paddingRight="@dimen/dp_10"
|
||||||
|
android:layout_gravity="start"
|
||||||
>
|
>
|
||||||
<!-- android:layout_gravity="start"-->
|
<!-- android:layout_gravity="start"-->
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:background="@drawable/oc_version_up_bg"
|
android:background="@drawable/payment_options_bg"
|
||||||
>
|
>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/KJPay"
|
android:id="@+id/KJPay"
|
||||||
|
|
@ -24,8 +24,9 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="17sp"
|
android:textSize="17sp"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:textColor="@color/orange_FF8A04"
|
android:textColor="@color/white"
|
||||||
android:text="@string/quickPayment" />
|
android:text="@string/quickPayment" />
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:background="@drawable/vip_recharge_list_item_bg_selector"
|
android:background="@drawable/oc_language_bg"
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
>
|
>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
@ -40,24 +40,12 @@
|
||||||
android:id="@+id/tvDayTxt"
|
android:id="@+id/tvDayTxt"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/blue_4072FE"
|
android:textColor="#B36C1B"
|
||||||
android:textSize="21sp"
|
android:textSize="21sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
/>
|
/>
|
||||||
<!-- <TextView-->
|
|
||||||
<!-- android:id="@+id/tvDayAverage"-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:textColor="@color/orange_FF991A"-->
|
|
||||||
<!-- android:text="¥36.8"-->
|
|
||||||
<!-- android:textSize="21sp"-->
|
|
||||||
<!-- android:layout_gravity="center"-->
|
|
||||||
<!-- android:layout_marginTop="5dp"-->
|
|
||||||
<!-- android:gravity="center"-->
|
|
||||||
<!-- />-->
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
@ -72,7 +60,7 @@
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/laPay"
|
android:text="@string/laPay"
|
||||||
android:textColor="@color/orange_FF991A"
|
android:textColor="#FF8A04"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
@ -80,7 +68,7 @@
|
||||||
android:id="@+id/tvDayAverage"
|
android:id="@+id/tvDayAverage"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/orange_FF991A"
|
android:textColor="#FF8A04"
|
||||||
android:text="36.8"
|
android:text="36.8"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue