tj
2025-04-02 11adee7f9ff0986fa209af6ce29a37b3c0b27044
app/src/main/java/com/example/firstapp/ui/vip/MemberInfoCardViewModel.kt
@@ -19,7 +19,7 @@
    val memberStatus: StateFlow<String> = _memberStatus
    // 头像
    private val _cover = MutableStateFlow("")
    private val _cover = MutableStateFlow("http://192.168.1.201:9000/sms/avatar/avatar_default.png")
    val cover: StateFlow<String> = _cover
    // vip头像
@@ -67,7 +67,17 @@
            }
            // 头像
            _cover.value = userInfo.cover
            // 如果头像不为空的话,则更新头像
//            if(userInfo.cover.isNotEmpty()){
//                _cover.value = userInfo.cover
//            }
            userInfo.cover?.let {
                if (it.isNotEmpty()) {
                    _cover.value = it
                }
            }
        }
    }