Browse Source

提交人:jtm
提交内容:bug fixed

江天明 10 months ago
parent
commit
c83441dc09

+ 6 - 2
BusinessAuth/src/main/java/com/develop/auth/ui/MemberProfileFragment.kt

@@ -45,8 +45,12 @@ class MemberProfileFragment : CommonBVMFragment<FragmentMemberProfileBinding, Me
         viewModel.queryUserInfo()
         binding.tvChooseAge.setOnClickListener {
             AgeSelectDialog(hostActivity) { index, change ->
-                if (index != 0) {
-                    selectAge = index + 20
+                selectAge = if (index == 0) {
+                    0
+                } else if (index == 1){
+                    20
+                } else {
+                    index + 19
                 }
                 binding.tvChooseAge.text = selectAge.toString()
                 binding.tvChooseAge.setTextColor(Color.BLACK)

+ 5 - 0
BusinessCommon/src/main/java/com/develop/common/ui/CommonBindingActivity.kt

@@ -15,6 +15,7 @@ import android.view.inputmethod.InputMethodManager
 import android.widget.EditText
 import androidx.viewbinding.ViewBinding
 import com.develop.base.ext.navigateTo
+import com.develop.base.ext.toJson
 import com.develop.base.mvvm.BaseBindingActivity
 import com.develop.base.mvvm.FullScreenTransparentDialog
 import com.develop.base.util.GlobalToast
@@ -267,9 +268,13 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
 
     @Subscribe
     fun onCookDevMsgEvent(event: DevPromptEvent) {
+        Log.d("设备返回", "msg=>${event.msg}==action=>${event.action}==errorCode=>${CofarSDK.devInfo().errCode}")
         if (!this.equals(TopResumedAtyHolder.getCurrentActivity())) {
             return
         }
+        if (CofarSDK.devInfo().errCode.toInt() != 0 && event.msg == "dev_end_of_run_tips") {
+            return
+        }
 
         if("hide" == event.action){
             lastMsg = "";