接口报错显示具体信息
This commit is contained in:
@@ -326,14 +326,14 @@ class ReceiptViewModel @Inject constructor(
|
||||
fun confirmReceipt(uploadInfo: UploadInfo, callback: (Boolean) -> Unit) {
|
||||
launchWithLoading {
|
||||
val resp = repository.confirmReceipt(uploadInfo)
|
||||
callback(resp.data == true)
|
||||
callback(resp.isSuccess())
|
||||
}
|
||||
}
|
||||
|
||||
fun addToWarehouse(list: List<PurchaseWarehouseParam>, callback: (Boolean) -> Unit) {
|
||||
fun addToWarehouse(list: List<PurchaseWarehouseParam>, callback: (Boolean, String) -> Unit) {
|
||||
launchWithLoading {
|
||||
val resp = repository.selfPurchaseWarehousing(list)
|
||||
callback(resp.data == true)
|
||||
callback(resp.isSuccess(), resp.msg?:"")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user