Commit 5b6cb2c1 authored by 王雪伟's avatar 王雪伟

[提交人]:王雪伟

[提交简述] :小象省钱
[实现方案] :修改显示价格
parent e7c9e27e
......@@ -114,15 +114,15 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View,
}
id_tv_goods_name?.text = goodsDetail?.title
id_tv_tm_price?.text = goodsDetail?.reserve_price
id_tv_tm_buy_price?.text = goodsDetail?.reserve_price
id_tv_tm_price?.text = goodsDetail?.zk_final_price
id_tv_tm_buy_price?.text = goodsDetail?.zk_final_price
id_tv_sale_num?.text = goodsDetail?.volume ?: "0"
id_tv_not_vip_desc.text = "会员下单,立省${goodsDetail?.coupon_amount?.toDoubleOrNull() ?: 0}元"
if (goodsDetail?.coupon_amount.isNullOrEmpty()) {
id_tv_xx_price?.text = "${goodsDetail?.reserve_price}"
id_tv_vip_buy_price?.text = "${goodsDetail?.reserve_price}"
id_tv_xx_price?.text = "${goodsDetail?.zk_final_price}"
id_tv_vip_buy_price?.text = "${goodsDetail?.zk_final_price}"
} else {
var r_price = goodsDetail?.reserve_price?.toDoubleOrNull() ?: 0 as Double
var r_price = goodsDetail?.zk_final_price?.toDoubleOrNull() ?: 0 as Double
var c_price = goodsDetail?.coupon_amount?.toDoubleOrNull() ?: 0 as Double
var vipPrice = Utils.getNoMoreThanTwoDigits(
Utils.sub(
......
......@@ -45,14 +45,14 @@ class GoodsListAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, GoodsListAdapter
holder.id_item_goods_img?.setLoadImageUrl(bean.pict_url, 0, 5)
}
}
holder.id_tv_tb_price_value?.text = "淘宝商城价 : ¥${bean.reserve_price}"
holder.id_tv_tb_price_value?.text = "淘宝商城价 : ¥${bean.zk_final_price}"
if (bean.coupon_amount.isNullOrEmpty()){
holder.id_tv_yhq_value?.visibility =View.GONE
holder.id_tv_goods_price?.text ="${bean.reserve_price}"
holder.id_tv_goods_price?.text ="${bean.zk_final_price}"
}else{
holder.id_tv_yhq_value?.visibility =View.VISIBLE
holder.id_tv_yhq_value?.text = "${bean.coupon_amount}元券"
var r_price = bean.reserve_price?.toDoubleOrNull() ?: 0 as Double
var r_price = bean.zk_final_price?.toDoubleOrNull() ?: 0 as Double
var c_price = bean.coupon_amount?.toDoubleOrNull() ?: 0 as Double
holder.id_tv_goods_price?.text = Utils.getNoMoreThanTwoDigits(
Utils.sub(
......
......@@ -95,18 +95,19 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
holder.id_item_goods_img?.setLoadImageUrl(bean.pict_url, 0, 5)
}
}
holder.id_tv_tb_price_value?.text = "淘宝商城价 : ¥${bean.reserve_price}"
holder.id_tv_tb_price_value?.text = "淘宝商城价 : ¥${bean.zk_final_price}"
if (bean.coupon_amount.isNullOrEmpty()) {
holder.id_tv_yhq_value?.visibility = View.GONE
holder.id_tv_goods_price?.text = "${bean.reserve_price}"
holder.id_tv_goods_price?.text = "${bean.zk_final_price}"
} else {
holder.id_tv_yhq_value?.visibility = View.VISIBLE
holder.id_tv_yhq_value?.text = "${bean.coupon_amount}元券"
var r_price = bean.reserve_price?.toDoubleOrNull() ?: 0 as Double
var z_price = bean.zk_final_price?.toDoubleOrNull() ?: 0 as Double
var c_price = bean.coupon_amount?.toDoubleOrNull() ?: 0 as Double
holder.id_tv_goods_price?.text = Utils.getNoMoreThanTwoDigits(
Utils.sub(
r_price,
z_price,
c_price
)
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment