t调试
This commit is contained in:
@@ -175,7 +175,7 @@ class PayResultFragment : BaseFragment<FragmentPayResultBinding>() {
|
||||
}
|
||||
|
||||
private fun loadUserInfo(item: MemberInfo) {
|
||||
binding.ivHeadPic.load(R.mipmap.ic_launcher)
|
||||
binding.ivHeadPic.load(item.faceUrl?.ifBlank { R.drawable.ic_avatar_default })
|
||||
binding.tvUserName.text = item.name
|
||||
|
||||
val phone = item.phone ?: ""
|
||||
|
||||
@@ -40,6 +40,8 @@ data class MemberInfo(
|
||||
val phone: String?,
|
||||
//姓名
|
||||
val name: String?,
|
||||
//头像
|
||||
val faceUrl: String?,
|
||||
//充值余额
|
||||
val topUpBalance: Double?,
|
||||
//赠送余额
|
||||
@@ -92,7 +94,7 @@ data class UserNutrition(
|
||||
//肉蛋超量
|
||||
val meatEggsExcess: String?=null,
|
||||
)
|
||||
|
||||
//{"code":"00000","data":"{\"orderType\":0,\"orderPayFrom\":2,\"payType\":\"1\",\"paySuc\":0,\"totalFee\":0.01,\"orderCode\":\"1998193614899372032\",\"message\":\"支付成功\",\"payCode\":\"1998193614899372032508227\"}","msg":"成功","total":0}
|
||||
data class PayResult(
|
||||
val paySuc: String? = null
|
||||
)
|
||||
|
||||
@@ -41,12 +41,13 @@ data class FoodInfo(
|
||||
val meatEggs:Double? = null,
|
||||
//推荐能量
|
||||
val recommendCalorie: Double? = null,
|
||||
//图片
|
||||
var foodImg: String? = "",
|
||||
|
||||
//-----------------------------------
|
||||
var score: Int = 0,
|
||||
var isChecked: Boolean = false,
|
||||
var photoUri: Uri? = null,
|
||||
var foodImg: String? = "",
|
||||
|
||||
// @SerializedName("foodTypeAndRealIntakeVoList")
|
||||
// val foodTypeAndRealIntakeVoList: List<FoodTypeAndRealIntakeVo>? = listOf(),
|
||||
|
||||
@@ -129,7 +129,7 @@ class ScanQrCodePayPresentation(
|
||||
}
|
||||
|
||||
private fun loadUserInfo(item: MemberInfo) {
|
||||
binding.ivHeadPic.load(R.mipmap.ic_launcher)
|
||||
binding.ivHeadPic.load(item.faceUrl?.ifBlank { R.drawable.ic_avatar_default })
|
||||
binding.tvUserName.text = item.name
|
||||
|
||||
val phone = item.phone ?: ""
|
||||
|
||||
@@ -98,8 +98,12 @@ class UserViewModel : BaseViewModel() {
|
||||
SPUtil.getInstance().put(GlobalKey.KEY_FIRST_RUN, true)
|
||||
withContext(Dispatchers.Default) {
|
||||
val list: List<UserFaceModel> = response.data ?: emptyList()
|
||||
val item = list.firstOrNull { it.userId == "1951105919342936066" }
|
||||
Timber.tag(TAG).d("getUserFaceCache userId = ${item?.userId}")
|
||||
if (list.isEmpty()) {
|
||||
ToastUtils.showToast("查询人脸数据为空")
|
||||
return@withContext
|
||||
}
|
||||
// val item = list.firstOrNull { it.userId == "1951105919342936066" }
|
||||
// Timber.tag(TAG).d("getUserFaceCache userId = ${item?.userId}")
|
||||
val faceEntity = list.map {
|
||||
FaceEntity(it.userId, null, Base64.decode(it.faceFeatureStr))
|
||||
}
|
||||
@@ -384,7 +388,14 @@ class UserViewModel : BaseViewModel() {
|
||||
Timber.tag(TAG).d("queryOrderState")
|
||||
val response = repository.queryOrderState(orderNo = orderId)
|
||||
if (parseResponse(response)) {
|
||||
val orderState = response.data == "1"
|
||||
val respData = response.data as? String
|
||||
?: if (response.data is Any) {
|
||||
GsonUtils.toJson(response.data)
|
||||
} else {
|
||||
""
|
||||
}
|
||||
val payResult = GsonUtils.fromJson(respData, PayResult::class.java)
|
||||
val orderState = payResult?.paySuc == "1"
|
||||
block(orderState)
|
||||
} else {
|
||||
block(false)
|
||||
|
||||
Reference in New Issue
Block a user