精简了称sdk调用
This commit is contained in:
@@ -68,7 +68,6 @@ abstract class BaseViewModel() : ViewModel() {
|
||||
GlobalData.restId = equipmentInfo.canteenId!!
|
||||
}
|
||||
|
||||
|
||||
fun handleError(exception: Exception) {
|
||||
Timber.d("handleError ${exception.message}")
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class UserViewModel : BaseViewModel() {
|
||||
val nutritionData: StateFlow<UserNutritionData?> = _nutritionData
|
||||
|
||||
/**
|
||||
* 饭点类型
|
||||
* 饭点类型 早餐/午餐/晚餐
|
||||
*/
|
||||
private val _dinnerTypeInfo = MutableStateFlow<DinnerTypeInfo?>(null)
|
||||
val dinnerTypeInfo: StateFlow<DinnerTypeInfo?> = _dinnerTypeInfo
|
||||
@@ -201,9 +201,9 @@ class UserViewModel : BaseViewModel() {
|
||||
/**
|
||||
* 提交就餐数据
|
||||
*/
|
||||
fun postUserNutritionData(param: UserNutritionParam) {
|
||||
fun postUserNutritionData(param: List<UserNutritionParam>) {
|
||||
Timber.d("postUserNutritionData param = $param")
|
||||
launchWithLoading {
|
||||
launch {
|
||||
val response = repository.postUserNutritionData(param)
|
||||
if (parseResponse(response)) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user