From 3433f3e9a0254b24cec2836b112267b1af3f9101 Mon Sep 17 00:00:00 2001
From: tj <1378534974@qq.com>
Date: 星期一, 07 四月 2025 10:57:40 +0800
Subject: [PATCH] 1.jks打包相关修改 2.vip续费页面相关修改
---
app/src/main/res/layout/fragment_member_info_card.xml | 2 +
keytool | 0
public_cert.cer | 0
sms-manager.jks | 0
app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardViewModel.kt | 16 +++++--
app/src/main/AndroidManifest.xml | 8 ++++
app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardFragment.kt | 7 +++
app/src/main/res/xml/network_security_config.xml | 1
app/src/main/java/com/example/firstapp/database/service/ApiService.kt | 4 +
app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt | 2 +
README.md | 10 +++++
app/src/main/res/drawable/avatar.png | 0
app/src/main/res/drawable/gift_one.png | 0
app/src/main/res/mipmap/vip_free_member.png | 0
app/src/main/java/com/example/firstapp/App.kt | 35 +++++++----------
15 files changed, 57 insertions(+), 28 deletions(-)
diff --git a/README.md b/README.md
index 1c96189..2c07e83 100644
--- a/README.md
+++ b/README.md
@@ -2,3 +2,13 @@
短信平台
+# md5
+ADC67C7C8E0BE3829D34E976D8EFCC9B
+# 公钥:
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoKuRiiydxMr1CFaenGIr
+MVqwOFtRgzW+ihjza8wldQOcLvqB58joTi9jwGLVqOnfoAA8hIzOZ33jWe5ZsLgq
+UjwugDj+VOMW7YTAZlVoY/1lUX2gyexaRiZf2D2Bxikp3SLrlG7fp4sYMIXAdMPx
+i/Y9Tgr9d7KGu2Yaz1ER+Kcq3WI+PDjYJjlQfgpkSruKb65hVhtQA1ZJp3rzPLRw
+/0sK7H2dwYxFvsVN+m6dhBnTmOcrvZ7jpIgI47kHMxT0Qj53J10/6D9Ww9+h6TM6
+ISnvE8tXF0iP0nDD+kSpuky/6592+48Pof08IN+oaQKe7Ycf8iyAfGQSO3vUe8I5
+EQIDAQAB
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 99381b1..5e9d88c 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -86,6 +86,14 @@
tools:targetApi="31"
android:usesCleartextTraffic="true"
>
+
+ <provider
+ android:name="androidx.startup.InitializationProvider"
+ android:authorities="${applicationId}.androidx-startup"
+ android:exported="false"
+ tools:node="remove" />
+
+
<activity
android:name=".activity.VipActivity"
android:exported="false"
diff --git a/app/src/main/java/com/example/firstapp/App.kt b/app/src/main/java/com/example/firstapp/App.kt
index 7c60e3a..c8fc2c4 100644
--- a/app/src/main/java/com/example/firstapp/App.kt
+++ b/app/src/main/java/com/example/firstapp/App.kt
@@ -3,24 +3,16 @@
import android.annotation.SuppressLint
import android.app.Application
import android.app.PendingIntent
-import android.bluetooth.BluetoothAdapter
-import android.bluetooth.BluetoothDevice
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.location.Geocoder
-import android.net.ConnectivityManager
-import android.net.wifi.WifiManager
import android.os.Build
+import androidx.annotation.NonNull
import androidx.lifecycle.MutableLiveData
import androidx.multidex.MultiDex
import androidx.work.Configuration
import androidx.work.WorkManager
-import com.gyf.cactus.Cactus
-import com.gyf.cactus.callback.CactusCallback
-import com.gyf.cactus.ext.cactus
-import com.hjq.language.MultiLanguages
-import com.hjq.language.OnLanguageListener
import com.example.firstapp.core.Core
import com.example.firstapp.database.repository.CodeRepository
import com.example.firstapp.database.repository.KeywordRepository
@@ -28,28 +20,23 @@
import com.example.firstapp.database.repository.ReminderRepository
import com.example.firstapp.database.service.RetrofitClient
import com.example.firstapp.receiver.CactusReceiver
-import com.example.firstapp.service.BluetoothScanService
-import com.example.firstapp.service.HttpServerService
-import com.example.firstapp.utils.ACTION_START
import com.example.firstapp.utils.AppInfo
-import com.example.firstapp.utils.CactusSave
import com.example.firstapp.utils.FRONT_CHANNEL_ID
import com.example.firstapp.utils.FRONT_CHANNEL_NAME
import com.example.firstapp.utils.FRONT_NOTIFY_ID
import com.example.firstapp.utils.FRPC_LIB_VERSION
-import com.example.firstapp.utils.HistoryUtils
import com.example.firstapp.utils.Log
import com.example.firstapp.utils.PreferencesManager
import com.example.firstapp.utils.SettingUtils
-import com.example.firstapp.utils.SharedPreference
-
import com.example.firstapp.utils.tinker.TinkerLoadLibrary
+import com.gyf.cactus.Cactus
+import com.gyf.cactus.callback.CactusCallback
+import com.gyf.cactus.ext.cactus
+import com.hjq.language.MultiLanguages
import com.king.location.LocationClient
import com.xuexiang.xutil.file.FileUtils
import frpclib.Frpclib
-import io.reactivex.Observable
import io.reactivex.disposables.Disposable
-import io.reactivex.schedulers.Schedulers
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.SupervisorJob
import java.io.BufferedWriter
@@ -59,8 +46,6 @@
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
-import java.util.TimeZone
-import java.util.concurrent.TimeUnit
@Suppress("DEPRECATION")
class App : Application(), CactusCallback, Configuration.Provider by Core {
@@ -160,7 +145,8 @@
if (SettingUtils.enablePureClientMode) return
//初始化WorkManager
- WorkManager.initialize(this, Configuration.Builder().build())
+// WorkManager.initialize(this, Configuration.Builder().build())
+ WorkManager.initialize(this, getWorkManagerConfiguration())
//动态加载FrpcLib
val libPath = filesDir.absolutePath + "/libs"
@@ -296,6 +282,13 @@
}
}
+ @NonNull
+ override fun getWorkManagerConfiguration(): Configuration {
+ return Configuration.Builder()
+ .setMinimumLoggingLevel(android.util.Log.DEBUG) // 设置日志级别
+ .build()
+ }
+
/**
* 初始化基础库
*/
diff --git a/app/src/main/java/com/example/firstapp/database/service/ApiService.kt b/app/src/main/java/com/example/firstapp/database/service/ApiService.kt
index 2fbbb90..6be57ba 100644
--- a/app/src/main/java/com/example/firstapp/database/service/ApiService.kt
+++ b/app/src/main/java/com/example/firstapp/database/service/ApiService.kt
@@ -78,7 +78,9 @@
// 创建Retrofit实例(单例)
object RetrofitClient{
- private const val BASE_URL ="http://192.168.1.213:8080/flower/"
+// private const val BASE_URL ="http://192.168.1.198:8080/flower/"
+ private const val BASE_URL ="http://14.103.144.28:8080/flower/"
+
// 创建OkHttpClient,配置拦截器和超时时间
private val okHttpClient = OkHttpClient.Builder()
diff --git a/app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt b/app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt
index eee2467..1a0a2cb 100644
--- a/app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt
+++ b/app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt
@@ -4,6 +4,7 @@
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.asLiveData
import androidx.lifecycle.viewModelScope
+import androidx.room.RewriteQueriesToDropUnusedColumns
import com.example.firstapp.AppDatabase
import com.example.firstapp.database.entity.Code
import com.example.firstapp.database.repository.CodeRepository
@@ -26,6 +27,7 @@
fun getYearlyHeatmap(date: Long) = repository.getYearlyHeatmap(date).asLiveData()
+
fun getWeeklyStats(date: Long, weekCount: Int = 6) =
repository.getWeeklyStats(date, weekCount).asLiveData()
diff --git a/app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardFragment.kt b/app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardFragment.kt
index 0d3247e..405783d 100644
--- a/app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardFragment.kt
+++ b/app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardFragment.kt
@@ -144,8 +144,13 @@
}
viewLifecycleOwner.lifecycleScope.launch {
- viewModel.color.collect { color ->
+ viewModel.phoneTextColor.collect { color ->
binding.phoneNumberText.setTextColor(Color.parseColor(color))
+ }
+ }
+
+ viewLifecycleOwner.lifecycleScope.launch {
+ viewModel.memberStatusColor.collect { color ->
binding.memberStatus.setTextColor(Color.parseColor(color))
}
}
diff --git a/app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardViewModel.kt b/app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardViewModel.kt
index fa18bcf..c640222 100644
--- a/app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardViewModel.kt
+++ b/app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardViewModel.kt
@@ -30,9 +30,13 @@
private val _background = MutableStateFlow(R.drawable.dialog_background)
val background: StateFlow<Int> = _background
- // 背景色
- private val _color = MutableStateFlow("#E8EAEE")
- val color: StateFlow<String> = _color
+ // 手机号字体颜色
+ private val _phoneTextColor = MutableStateFlow("#37393B")
+ val phoneTextColor: StateFlow<String> = _phoneTextColor
+
+ // 到期时间字体颜色
+ private val _memberStatusColor = MutableStateFlow("#37393B")
+ val memberStatusColor: StateFlow<String> = _memberStatusColor
// 更新数据的方法
@@ -64,13 +68,15 @@
// vip头像
_vipCover.value ="http://192.168.1.201:9000/sms/member/vip.png"
_background.value = R.drawable.vip_black_background
- _color.value ="#A9A9AB"
+ _phoneTextColor.value ="#F2F2F2"
+ _memberStatusColor.value ="#AAAAAA"
}else{
_memberStatus.value = "未开通"
_vipCover.value ="http://192.168.1.201:9000/sms/member/vip_no.png"
_background.value =R.drawable.vip_white_background
- _color.value ="#A4A4A4"
+ _phoneTextColor.value ="#37393B"
+ _memberStatusColor.value ="#37393B"
}
// 头像
diff --git a/app/src/main/res/drawable/avatar.png b/app/src/main/res/drawable/avatar.png
index 04a43e1..9d15b9d 100644
--- a/app/src/main/res/drawable/avatar.png
+++ b/app/src/main/res/drawable/avatar.png
Binary files differ
diff --git a/app/src/main/res/drawable/gift_one.png b/app/src/main/res/drawable/gift_one.png
index d6bd848..451fe0b 100644
--- a/app/src/main/res/drawable/gift_one.png
+++ b/app/src/main/res/drawable/gift_one.png
Binary files differ
diff --git a/app/src/main/res/layout/fragment_member_info_card.xml b/app/src/main/res/layout/fragment_member_info_card.xml
index d1789c5..46571a7 100644
--- a/app/src/main/res/layout/fragment_member_info_card.xml
+++ b/app/src/main/res/layout/fragment_member_info_card.xml
@@ -52,6 +52,7 @@
android:layout_height="40dp"
android:gravity="center"
android:text="@{viewModel.phoneNumber}"
+ android:textColor="#F2F2F2"
app:layout_constraintStart_toEndOf="@id/memberAvatarView"
app:layout_constraintTop_toTopOf="parent" />
@@ -72,6 +73,7 @@
android:text="@{viewModel.memberStatus}"
android:layout_marginLeft="8dp"
android:padding="2dp"
+ android:textColor="#AAAAAA"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/memberAvatarView" />
diff --git a/app/src/main/res/mipmap/vip_free_member.png b/app/src/main/res/mipmap/vip_free_member.png
index d6bd848..451fe0b 100644
--- a/app/src/main/res/mipmap/vip_free_member.png
+++ b/app/src/main/res/mipmap/vip_free_member.png
Binary files differ
diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml
index f8bbdd2..ba135d2 100644
--- a/app/src/main/res/xml/network_security_config.xml
+++ b/app/src/main/res/xml/network_security_config.xml
@@ -6,6 +6,7 @@
<domain includeSubdomains="true">192.168.1.198</domain>
<domain includeSubdomains="true">192.168.1.199</domain>
<domain includeSubdomains="true">192.168.1.201</domain>
+ <domain includeSubdomains="true">14.103.144.28</domain>
<!-- 可添加其他域名或IP(如192.168.0.101) -->
<!-- 如果本地服务使用自签名证书,需在 network_security_config.xml 中信任该证书:-->
<!-- <trust-anchors>-->
diff --git a/keytool b/keytool
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/keytool
diff --git a/public_cert.cer b/public_cert.cer
new file mode 100644
index 0000000..97de39d
--- /dev/null
+++ b/public_cert.cer
Binary files differ
diff --git a/sms-manager.jks b/sms-manager.jks
new file mode 100644
index 0000000..f2291a6
--- /dev/null
+++ b/sms-manager.jks
Binary files differ
--
Gitblit v1.9.3