fix 支付,客服

This commit is contained in:
cyh 2025-02-17 15:55:20 +08:00
parent 52a297431f
commit 5200ed6fd3
8 changed files with 74 additions and 22 deletions

View File

@ -255,7 +255,7 @@ 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, "") // val uc = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_VPN_UserCommand, "")
// Log.i("newMainActGlo isGlobal==>${isGlobal}, uc==>${uc}") // Log.i("newMainActGlo isGlobal==>${isGlobal}, uc==>${uc}")
newMainActGlo = isGlobal newMainActGlo = isGlobal
@ -475,7 +475,7 @@ class NewMainActivity : BaseActivity() {
mainAtyVM.getAirNodes() mainAtyVM.getAirNodes()
RxToast.info(resources.getString(R.string.SuccessfullyUpdatedUserInformation)) RxToast.info(resources.getString(R.string.SuccessfullyUpdatedUserInformation))
} else { } else {
RxToast.info(resources.getString(R.string.PaymentResultsStr)) // RxToast.info(resources.getString(R.string.PaymentResultsStr))
} }
} else { } else {
RxToast.info(resources.getString(R.string.QueryFailed)) RxToast.info(resources.getString(R.string.QueryFailed))
@ -817,6 +817,9 @@ class NewMainActivity : BaseActivity() {
REQUEST_CODE_PAY_WEB_VIEW_ACTIVITY REQUEST_CODE_PAY_WEB_VIEW_ACTIVITY
) )
} }
public fun goCheckLogin() {
mainAtyVM.checkLogin()
}
private fun showPayResultDialog() { private fun showPayResultDialog() {
checkPayResultDia = MaterialDialog(this).show { checkPayResultDia = MaterialDialog(this).show {
@ -829,7 +832,7 @@ class NewMainActivity : BaseActivity() {
horizontalPadding = false horizontalPadding = false
) )
getCustomView().findViewById<TextView>(R.id.tv_pay_finish).setOnClickListener { getCustomView().findViewById<TextView>(R.id.tv_pay_finish).setOnClickListener {
mainAtyVM.checkLogin() goCheckLogin()
showBindAccount() showBindAccount()
dismiss() dismiss()
} }
@ -1142,7 +1145,8 @@ class NewMainActivity : BaseActivity() {
if (activityDialog != null) { if (activityDialog != null) {
activityDialog?.dismiss() activityDialog?.dismiss()
} }
showPayResultDialog() goCheckLogin()
showBindAccount()
} }
} }

View File

@ -182,6 +182,9 @@ class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatch
view.findViewById<Button>(R.id.backupRecharge).setOnClickListener { view.findViewById<Button>(R.id.backupRecharge).setOnClickListener {
goRechargeWeb() goRechargeWeb()
} }
view.findViewById<ImageView>(R.id.refresh_expire_iv).setOnClickListener {
updateUserInfo()
}
setExpireDate() setExpireDate()
setProxyModeView(NewMainActivity.newMainActGlo) setProxyModeView(NewMainActivity.newMainActGlo)
} }
@ -659,6 +662,12 @@ class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatch
mact.goBackupRechargeWeb() mact.goBackupRechargeWeb()
} }
} }
private fun updateUserInfo() {
if (activity!=null) {
var mact = activity as NewMainActivity
mact.goCheckLogin()
}
}
private fun start_u_timer() { private fun start_u_timer() {
if (activity!=null) { if (activity!=null) {
var mact = activity as NewMainActivity var mact = activity as NewMainActivity

View File

@ -602,7 +602,7 @@ class RechargeFragment : BaseFragment() {
findViewById<LinearLayout>(R.id.llAggregatePayment).visibility=View.VISIBLE findViewById<LinearLayout>(R.id.llAggregatePayment).visibility=View.VISIBLE
val JUhePay=findViewById<TextView>(R.id.JUhePay) val JUhePay=findViewById<TextView>(R.id.JUhePay)
JUhePay.visibility=View.VISIBLE JUhePay.visibility=View.VISIBLE
// JUhePay.text = index.payChannel JUhePay.text = index.payChannel
if(index.payType==1){ if(index.payType==1){
val ivAlipay =findViewById<AppCompatImageView>(R.id.ivAlipay) val ivAlipay =findViewById<AppCompatImageView>(R.id.ivAlipay)
ivAlipay.visibility=View.VISIBLE ivAlipay.visibility=View.VISIBLE
@ -653,7 +653,10 @@ class RechargeFragment : BaseFragment() {
}else if(index.payModel==7){ }else if(index.payModel==7){
findViewById<LinearLayout>(R.id.llStripe).visibility=View.VISIBLE findViewById<LinearLayout>(R.id.llStripe).visibility=View.VISIBLE
findViewById<LinearLayout>(R.id.llStripePay).visibility=View.VISIBLE findViewById<LinearLayout>(R.id.llStripePay).visibility=View.VISIBLE
findViewById<TextView>(R.id.tvStripePay).visibility=View.VISIBLE var payinfo= findViewById<TextView>(R.id.tvStripePay)
payinfo.visibility=View.VISIBLE
payinfo.text=index.payChannel
findViewById<AppCompatImageView>(R.id.ivStripeAlipay).visibility=View.VISIBLE findViewById<AppCompatImageView>(R.id.ivStripeAlipay).visibility=View.VISIBLE
findViewById<AppCompatImageView>(R.id.ivStripeAlipay).setOnClickListener { findViewById<AppCompatImageView>(R.id.ivStripeAlipay).setOnClickListener {
if(selectedGradeID!=0){ if(selectedGradeID!=0){

View File

@ -1,7 +1,9 @@
package com.yingmao.clash.webview package com.yingmao.clash.webview
import android.app.Activity import android.app.Activity
import android.content.Intent
import android.content.pm.ActivityInfo import android.content.pm.ActivityInfo
import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.os.CountDownTimer import android.os.CountDownTimer
import android.view.View import android.view.View
@ -15,6 +17,9 @@ import com.yingmao.clash.R
import com.cncat.vpn.common.log.Log import com.cncat.vpn.common.log.Log
import com.yingmao.clash.conf.BZYConstants import com.yingmao.clash.conf.BZYConstants
import com.yingmao.clash.util.StatusBarUtils import com.yingmao.clash.util.StatusBarUtils
import java.net.URLDecoder
import java.net.URLEncoder
class BZYWebViewKeFu : AppCompatActivity() { class BZYWebViewKeFu : AppCompatActivity() {
private lateinit var webView: WebView private lateinit var webView: WebView
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
@ -72,7 +77,11 @@ class BZYWebViewKeFu : AppCompatActivity() {
webView.loadUrl("file:///android_asset/TZKeFu.html") webView.loadUrl("file:///android_asset/TZKeFu.html")
} else { } else {
if (BuildConfig.is_ym) { if (BuildConfig.is_ym) {
webView.loadUrl("file:///android_asset/YMKeFu.html") val userName = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME,"")
var enNmae= URLEncoder.encode(userName,"UTF-8")
Log.d("enNmae==>${enNmae}")
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://test.yingmaox.cc:8041/widget?website_token=hrRz6CyYCqM8KZEQ1W88bS6b&app_account=${enNmae}")))
finish()
} else { } else {
webView.loadUrl("file:///android_asset/kefu.html") webView.loadUrl("file:///android_asset/kefu.html")
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

View File

@ -55,6 +55,12 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
<ImageView
android:layout_marginLeft="5dp"
android:id="@+id/refresh_expire_iv"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/refresh2"></ImageView>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout

View File

@ -19,8 +19,7 @@
<androidx.viewpager2.widget.ViewPager2 <androidx.viewpager2.widget.ViewPager2
android:id="@+id/container" android:id="@+id/container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" > android:layout_height="match_parent"></androidx.viewpager2.widget.ViewPager2>
</androidx.viewpager2.widget.ViewPager2>
<ImageView <ImageView
android:id="@+id/iv_slider" android:id="@+id/iv_slider"
@ -39,12 +38,14 @@
android:layout_marginRight="20dp" android:layout_marginRight="20dp"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<com.airbnb.lottie.LottieAnimationView <com.airbnb.lottie.LottieAnimationView
android:id="@+id/lottie_activity" android:id="@+id/lottie_activity"
android:layout_width="45dp" android:layout_width="45dp"
android:layout_height="40dp" android:layout_height="40dp"
app:lottie_autoPlay="true" app:lottie_autoPlay="true"
app:lottie_loop="true"></com.airbnb.lottie.LottieAnimationView> app:lottie_loop="true"></com.airbnb.lottie.LottieAnimationView>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -75,29 +76,28 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/ll_activity" android:layout_below="@+id/ll_activity"
android:layout_marginEnd="30dp"
android:layout_marginStart="30dp" android:layout_marginStart="30dp"
android:orientation="horizontal" android:layout_marginEnd="30dp"
android:background="@drawable/shape_notice_background" android:background="@drawable/shape_notice_background"
android:gravity="center" android:gravity="center"
> android:orientation="horizontal">
<com.yingmao.clash.util.MarqueeTextView <com.yingmao.clash.util.MarqueeTextView
android:id="@+id/mainPageHorseRaceLamp" android:id="@+id/mainPageHorseRaceLamp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" android:layout_marginStart="50dp"
android:scrollHorizontally="true" android:layout_marginEnd="50dp"
android:ellipsize="marquee" android:ellipsize="marquee"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:marqueeRepeatLimit="marquee_forever" android:marqueeRepeatLimit="marquee_forever"
android:padding="10dp" android:padding="10dp"
android:textColor="@color/white" android:scrollHorizontally="true"
android:singleLine="true"
android:text="" android:text=""
android:textSize="17sp" android:textColor="@color/white"
android:layout_marginEnd="50dp" android:textSize="17sp" />
android:layout_marginStart="50dp"
/>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
@ -134,7 +134,6 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" /> android:textSize="14sp" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -333,6 +332,7 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:background="@color/white_50" /> android:background="@color/white_50" />
<TextView <TextView
android:id="@+id/tv_setting" android:id="@+id/tv_setting"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -349,6 +349,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="15dp"> android:layout_marginTop="15dp">
<TextView <TextView
android:id="@+id/tv_vip_recharge" android:id="@+id/tv_vip_recharge"
android:layout_width="0dp" android:layout_width="0dp"
@ -360,6 +361,7 @@
android:text="@string/RenewalRecharge" android:text="@string/RenewalRecharge"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/tv_vip_sign" android:id="@+id/tv_vip_sign"
android:layout_width="0dp" android:layout_width="0dp"
@ -372,9 +374,11 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/tv_version" android:id="@+id/tv_version"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@ -66,8 +66,8 @@ subprojects {
minSdk = 21 minSdk = 21
//noinspection ExpiredTargetSdkVersion //noinspection ExpiredTargetSdkVersion
targetSdk = 34 targetSdk = 34
versionName = "1.0.3.0" versionName = "1.0.3.1"
versionCode = 1030 versionCode = 1031
resValue("string", "release_name", "v$versionName") resValue("string", "release_name", "v$versionName")
resValue("integer", "release_code", "$versionCode") resValue("integer", "release_code", "$versionCode")
externalNativeBuild { externalNativeBuild {
@ -116,6 +116,23 @@ subprojects {
} }
//影猫 //影猫
create("1525") {
isDefault = true
dimension = flavorDimensionList[0]
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")")
buildConfigField("boolean", "is_back_cn", "false")
buildConfigField("boolean", "is_ym", "true")
buildConfigField("boolean", "is_tz", "false")
buildConfigField("String", "applicationId", "\"com.yingmao.clash\"")
buildConfigField("String", "service_url", "\"https://api.ymvpnpro.cc:8700\"")
buildConfigField("boolean", "is_free", "false")
buildConfigField("String", "productId", "\"1525\"")
manifestPlaceholders(
mapOf(
"APP_NAME" to "@string/app_name_gz2", "APP_ICON" to "@mipmap/ic_logo_9972"
)
)
}
create("5599") { create("5599") {
isDefault = true isDefault = true
dimension = flavorDimensionList[0] dimension = flavorDimensionList[0]