Browse Source

1.添加正式版本和测试版本展示

20241218TB223FC(测试jar包)
wangwanlei 5 months ago
parent
commit
7bf0793fcf

+ 2
- 2
app/src/main/java/com/xhly/manageapp/ui/login/activity/LoginActivity.kt View File

117
         val appVersionCode = SystemUtil.getAppVersionCode(this, packageName)
117
         val appVersionCode = SystemUtil.getAppVersionCode(this, packageName)
118
         val appVersionName = SystemUtil.getAppVersionName(this, packageName)
118
         val appVersionName = SystemUtil.getAppVersionName(this, packageName)
119
         mBinding.versionTv.text =if (com.xhkjedu.manageapp.BuildConfig.IS_DEBUG){
119
         mBinding.versionTv.text =if (com.xhkjedu.manageapp.BuildConfig.IS_DEBUG){
120
-            "版本 v${appVersionName} (Build ${appVersionCode})正式版"
121
-        }else{
122
             "版本 v${appVersionName} (Build ${appVersionCode})测试版"
120
             "版本 v${appVersionName} (Build ${appVersionCode})测试版"
121
+        }else{
122
+            "版本 v${appVersionName} (Build ${appVersionCode})正式版"
123
         }
123
         }
124
         mBinding.loginBtn.setOnClickListener {
124
         mBinding.loginBtn.setOnClickListener {
125
             val rxPermissions = RxPermissions(this)
125
             val rxPermissions = RxPermissions(this)

+ 2
- 2
app/src/main/java/com/xhly/manageapp/ui/main/activity/MainActivity.kt View File

820
         val appVersionCode = SystemUtil.getAppVersionCode(this, packageName)
820
         val appVersionCode = SystemUtil.getAppVersionCode(this, packageName)
821
         val appVersionName = SystemUtil.getAppVersionName(this, packageName)
821
         val appVersionName = SystemUtil.getAppVersionName(this, packageName)
822
         mBinding.versionTv.text =if (com.xhkjedu.manageapp.BuildConfig.IS_DEBUG){
822
         mBinding.versionTv.text =if (com.xhkjedu.manageapp.BuildConfig.IS_DEBUG){
823
-            "版本 v${appVersionName} (Build ${appVersionCode})正式版"
824
-        }else{
825
             "版本 v${appVersionName} (Build ${appVersionCode})测试版"
823
             "版本 v${appVersionName} (Build ${appVersionCode})测试版"
824
+        }else{
825
+            "版本 v${appVersionName} (Build ${appVersionCode})正式版"
826
         }
826
         }
827
         if (SystemUtil.isSuEnable()) {
827
         if (SystemUtil.isSuEnable()) {
828
             //root了则调用接口
828
             //root了则调用接口

Loading…
Cancel
Save