设备联调

This commit is contained in:
马增飞
2025-11-06 19:34:42 +08:00
parent fb074c1aaa
commit abe594fb66
13 changed files with 140 additions and 16 deletions
@@ -130,7 +130,7 @@ class UserViewModel : BaseViewModel() {
/**
* 通过用户id获取用户信息
*/
fun getUserInfoById(equipmentCode: String = globalEquipmentCode, memberId: Int) {
fun getUserInfoById(equipmentCode: String = globalEquipmentCode, memberId: Int, action:(EquipmentUserInfo?)->Unit={}) {
_currentUserInfo.value = null
launchWithLoading {
val loginParam = LoginParam(
@@ -141,6 +141,7 @@ class UserViewModel : BaseViewModel() {
val response = repository.equipmentBoxLogin(loginParam)
if (parseResponse(response)) {
_currentUserInfo.value = response.data
action(response.data)
}
}
}