注册用户的功能
是没有绑定域名吗
或者是不能在主线程?
viewModelScope.launch {
val user = LCUser()
user.username = username
user.password = password
user.email = username
// user.mobilePhoneNumber = "+8618200008888"
user.put("gender", "secret")
user.signUpInBackground().subscribe(object : Observer {
override fun onSubscribe(d: Disposable) {
}
override fun onNext(t: LCUser) {
_loginResult.value =
LoginResult(success = LoggedInUserView(displayName = username))
}
override fun onError(e: Throwable) {
_loginResult.value = LoginResult(error = R.string.login_failed)
}
override fun onComplete() {
}
})
}