Browse Source

1.修改游戏启动页面UI

王鹏鹏 2 years ago
parent
commit
649713b1ea

+ 10 - 5
home/src/main/java/com/yingyangfly/home/evaluation/EvaluationHistoryActivity.kt

@@ -1,6 +1,7 @@
 package com.yingyangfly.home.evaluation
 
 import android.annotation.SuppressLint
+import android.text.TextUtils
 import android.view.MotionEvent
 import android.view.View
 import com.alibaba.android.arouter.facade.annotation.Route
@@ -32,11 +33,15 @@ class EvaluationHistoryActivity :
             rvResult.adapter = adapter
             adapter.setData(results)
             adapter.onClickListener = {
-                JumpUtil.jumpActivityWithUrl(
-                    RouterUrlCommon.reviewResultDetail,
-                    it.reviewTaskId,
-                    mContext
-                )
+                if (TextUtils.equals("0", it.status)) {
+                    "请完成测评,再查看报告详情哦!".toast()
+                } else {
+                    JumpUtil.jumpActivityWithUrl(
+                        RouterUrlCommon.reviewResultDetail,
+                        it.reviewTaskId,
+                        mContext
+                    )
+                }
             }
         }
     }

+ 5 - 3
personalcenter/src/main/java/com/yingyang/personalcenter/personalcenter/PersonalCenterActivity.kt

@@ -1,6 +1,7 @@
 package com.yingyang.personalcenter.personalcenter
 
 import android.annotation.SuppressLint
+import android.text.TextUtils
 import android.view.MotionEvent
 import android.view.View
 import com.alibaba.android.arouter.facade.annotation.Route
@@ -70,16 +71,17 @@ class PersonalCenterActivity :
             if (it != null) {
                 binding.data = it
                 //保存用户头像
-                if (it.avatar.isEmpty().not()) {
+                //保存用户头像
+                if (TextUtils.isEmpty(it.avatar).not()) {
                     User.saveAvatar(it.avatar)
                 }
                 //保存用户名
-                if (it.name.isEmpty().not()) {
+                if (TextUtils.isEmpty(it.name).not()) {
                     User.saveName(it.name)
                 }
                 User.saveUserSex(it.getSex())
                 User.saveUserAge(it.getAgeInfo())
-                if (it.id.isEmpty().not()) {
+                if (TextUtils.isEmpty(it.id).not()) {
                     User.saveUserId(it.id)
                 }
                 if (it.diagnoseResult.isNullOrEmpty().not()) {