增加配置接口;调试人脸识别;验证手机号密码登录和人脸登录功能;

This commit is contained in:
马增飞
2025-12-29 18:41:48 +08:00
parent 6c28260069
commit 17d47a876f
21 changed files with 141 additions and 55 deletions
@@ -11,6 +11,7 @@ import com.sw.plate.utils.arcface.facedb.entity.FaceEntity
import com.sw.platecabinet.GlobalData
import com.sw.platecabinet.GlobalData.globalEquipmentCode
import com.sw.platecabinet.GlobalKey
import com.sw.platecabinet.model.DeviceConfig
import com.sw.platecabinet.model.request.LoginParam
import com.sw.platecabinet.model.response.EquipmentUserInfo
import com.sw.platecabinet.model.response.UserFaceModel
@@ -140,7 +141,7 @@ class UserViewModel : BaseViewModel() {
/**
* 通过用户id获取用户信息
*/
fun getUserInfoById(memberId: Int?, action:(EquipmentUserInfo?)->Unit={}) {
fun getUserInfoById(memberId: String?, action:(EquipmentUserInfo?)->Unit={}) {
_currentUserInfo.value = null
launchWithLoading {
val loginParam = LoginParam(memberId = memberId)
@@ -159,5 +160,16 @@ class UserViewModel : BaseViewModel() {
Timber.d("resetUserInfo")
_currentUserInfo.value = null
}
fun getDeviceConfig(block: (DeviceConfig?) -> Unit) {
// Timber.tag(TAG).d("getDeviceConfig")
launch {
val response = repository.getDeviceConfig()
if (parseResponse(response)) {
block(response.data)
} else {
block(null)
}
}
}
}