Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
xxsq
Commits
5b6cb2c1
Commit
5b6cb2c1
authored
May 31, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :小象省钱 [实现方案] :修改显示价格
parent
e7c9e27e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
TbGoodsDetailActivity.kt
...ava/com/zxbw/modulemain/activity/TbGoodsDetailActivity.kt
+5
-5
GoodsListAdapter.kt
...main/java/com/zxbw/modulemain/adapter/GoodsListAdapter.kt
+3
-3
HomeRecommendAdapter.kt
.../java/com/zxbw/modulemain/adapter/HomeRecommendAdapter.kt
+5
-4
No files found.
moduleMain/src/main/java/com/zxbw/modulemain/activity/TbGoodsDetailActivity.kt
View file @
5b6cb2c1
...
...
@@ -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
(
...
...
moduleMain/src/main/java/com/zxbw/modulemain/adapter/GoodsListAdapter.kt
View file @
5b6cb2c1
...
...
@@ -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
(
...
...
moduleMain/src/main/java/com/zxbw/modulemain/adapter/HomeRecommendAdapter.kt
View file @
5b6cb2c1
...
...
@@ -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
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment