优化
This commit is contained in:
@@ -988,7 +988,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
params["foodVector"] = foodVectorJson.toRequestBody()
|
||||
val idList = viewModel.uploadCollectFoodPics(files, params)
|
||||
if (idList.isNullOrEmpty()) {
|
||||
loadRemindDialog("未返回id")
|
||||
loadRemindDialog("上传失败,未返回向量数据id")
|
||||
Timber.tag(TAG).d("idList为空")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -225,7 +225,8 @@ class CollectFragment : BaseFragment<FragmentCollectBinding>() {
|
||||
ToastUtils.showToast("请选择菜品名称")
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (foodCollectionList.size <= 1) {
|
||||
val count = foodCollectionList.count { it.imageFile != null }
|
||||
if (count == 0) {
|
||||
ToastUtils.showToast("请拍摄菜品照片")
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user