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
58bc56a7
Commit
58bc56a7
authored
Jun 02, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :小象省钱 [实现方案] :跳转订单UI
parent
ab18a99d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
10 deletions
+29
-10
RightsDetailEntity.kt
...main/java/com/zxhl/cms/net/model/qy/RightsDetailEntity.kt
+1
-0
ItemVipOrderAdapter.kt
...n/java/com/zxbw/modulemain/adapter/ItemVipOrderAdapter.kt
+12
-3
MyOrderAdapter.kt
...c/main/java/com/zxbw/modulemain/adapter/MyOrderAdapter.kt
+10
-5
items_item_vip_rights_order.xml
...eMain/src/main/res/layout/items_item_vip_rights_order.xml
+6
-2
No files found.
cms/src/main/java/com/zxhl/cms/net/model/qy/RightsDetailEntity.kt
View file @
58bc56a7
...
@@ -22,6 +22,7 @@ class RightsDetailEntity : Serializable {
...
@@ -22,6 +22,7 @@ class RightsDetailEntity : Serializable {
var
status
:
String
?
=
""
var
status
:
String
?
=
""
var
productCode
:
String
?
=
""
var
productCode
:
String
?
=
""
var
icon
:
String
?
=
""
var
icon
:
String
?
=
""
var
bgImage
:
String
?
=
""
var
skillPrice
:
String
?
=
""
var
skillPrice
:
String
?
=
""
var
eqText
:
String
?
=
""
var
eqText
:
String
?
=
""
...
...
moduleMain/src/main/java/com/zxbw/modulemain/adapter/ItemVipOrderAdapter.kt
View file @
58bc56a7
package
com.zxbw.modulemain.adapter
package
com.zxbw.modulemain.adapter
import
android.app.Activity
import
android.content.Context
import
android.content.Context
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.ImageView
import
android.widget.TextView
import
android.widget.TextView
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView
import
com.bumptech.glide.Glide
import
com.zxbw.modulemain.R
import
com.zxbw.modulemain.R
import
com.zxhl.cms.AppContext
import
com.zxhl.cms.AppContext
import
com.zxhl.cms.common.base.BaseRecyclerAdapter
import
com.zxhl.cms.common.base.BaseRecyclerAdapter
...
@@ -15,17 +18,21 @@ import com.zxhl.cms.widget.RecycleImageView
...
@@ -15,17 +18,21 @@ import com.zxhl.cms.widget.RecycleImageView
class
ItemVipOrderAdapter
:
class
ItemVipOrderAdapter
:
BaseRecyclerAdapter
<
RightsDetailEntity
,
ItemVipOrderAdapter
.
ViewHolder
>
{
BaseRecyclerAdapter
<
RightsDetailEntity
,
ItemVipOrderAdapter
.
ViewHolder
>
{
private
var
mContext
:
Context
?
=
null
private
var
mContext
:
Activity
?
=
null
constructor
(
constructor
(
content
:
Context
?
content
:
Activity
?
)
:
super
()
{
)
:
super
()
{
mContext
=
content
mContext
=
content
}
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
var
bean
=
mList
[
position
]
var
bean
=
mList
[
position
]
holder
.
id_img_rights_icon
?.
setLoadImageUrl
(
bean
.
icon
,
false
)
if
(
mContext
?.
isDestroyed
!=
true
){
Glide
.
with
(
mContext
!!
).
load
(
bean
.
bgImage
).
placeholder
(
R
.
drawable
.
img_vip_rights_bg
)
.
into
(
holder
?.
id_img_rights_bg
!!
)
}
holder
.
id_img_rights_icon
?.
setLoadImageUrl
(
bean
.
icon
,
false
)
holder
.
id_tv_vip_goods_name
?.
text
=
"${bean.brand} ${bean.category} ${bean.goodsName}"
holder
.
id_tv_vip_goods_name
?.
text
=
"${bean.brand} ${bean.category} ${bean.goodsName}"
holder
.
id_tv_vip_goods_price
?.
text
=
"¥${bean.salePrice}"
holder
.
id_tv_vip_goods_price
?.
text
=
"¥${bean.salePrice}"
// holder.id_tv_vip_goods_num?.text = "${bean.salePrice}"
// holder.id_tv_vip_goods_num?.text = "${bean.salePrice}"
...
@@ -40,6 +47,7 @@ class ItemVipOrderAdapter :
...
@@ -40,6 +47,7 @@ class ItemVipOrderAdapter :
}
}
class
ViewHolder
:
RecyclerView
.
ViewHolder
{
class
ViewHolder
:
RecyclerView
.
ViewHolder
{
var
id_img_rights_bg
:
ImageView
?
var
id_img_rights_icon
:
RecycleImageView
?
var
id_img_rights_icon
:
RecycleImageView
?
var
id_tv_vip_goods_name
:
TextView
?
var
id_tv_vip_goods_name
:
TextView
?
var
id_tv_vip_goods_price
:
TextView
?
var
id_tv_vip_goods_price
:
TextView
?
...
@@ -48,6 +56,7 @@ class ItemVipOrderAdapter :
...
@@ -48,6 +56,7 @@ class ItemVipOrderAdapter :
constructor
(
constructor
(
itemView
:
View
itemView
:
View
)
:
super
(
itemView
)
{
)
:
super
(
itemView
)
{
id_img_rights_bg
=
itemView
.
findViewById
<
ImageView
>(
R
.
id
.
id_img_rights_bg
)
id_img_rights_icon
=
itemView
.
findViewById
<
RecycleImageView
>(
R
.
id
.
id_img_rights_icon
)
id_img_rights_icon
=
itemView
.
findViewById
<
RecycleImageView
>(
R
.
id
.
id_img_rights_icon
)
id_tv_vip_goods_name
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_vip_goods_name
)
id_tv_vip_goods_name
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_vip_goods_name
)
id_tv_vip_goods_price
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_vip_goods_price
)
id_tv_vip_goods_price
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_vip_goods_price
)
...
...
moduleMain/src/main/java/com/zxbw/modulemain/adapter/MyOrderAdapter.kt
View file @
58bc56a7
...
@@ -38,7 +38,7 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
...
@@ -38,7 +38,7 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
}
else
if
(
mList
[
position
].
orderType
==
"99"
)
{
}
else
if
(
mList
[
position
].
orderType
==
"99"
)
{
return
VIEW_TYPE_GOODS_VIEW
return
VIEW_TYPE_GOODS_VIEW
}
else
{
}
else
{
return
VIEW_TYPE_
CARD
_VIEW
return
VIEW_TYPE_
GOODS
_VIEW
}
}
}
}
...
@@ -51,8 +51,13 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
...
@@ -51,8 +51,13 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
copy
(
holder
.
id_tv_order_no
?.
text
.
toString
())
copy
(
holder
.
id_tv_order_no
?.
text
.
toString
())
}
}
holder
.
id_tv_total_price
?.
text
=
"¥${bean.cash}"
holder
.
id_tv_total_price
?.
text
=
"¥${bean.cash}"
if
(
bean
.
orderType
==
"99"
){
holder
.
id_tv_pricedesc
?.
text
=
"总价:|"
}
else
{
holder
.
id_tv_pricedesc
?.
text
=
holder
.
id_tv_pricedesc
?.
text
=
"总价:¥${bean.totalPrice}|优惠:¥${bean.discount}|运费:¥${bean.freight}|"
"总价:¥${bean.totalPrice}|优惠:¥${bean.discount}|运费:¥${bean.freight}|"
}
holder
.
id_tv_order_no
?.
text
=
bean
.
orderNo
holder
.
id_tv_order_no
?.
text
=
bean
.
orderNo
holder
.
id_tv_pay_time
?.
text
=
bean
.
payTime
holder
.
id_tv_pay_time
?.
text
=
bean
.
payTime
if
(!
bean
.
goodsList
.
isNullOrEmpty
())
{
if
(!
bean
.
goodsList
.
isNullOrEmpty
())
{
...
@@ -105,9 +110,9 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
...
@@ -105,9 +110,9 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
.
inflate
(
R
.
layout
.
items_layout_box_order
,
parent
,
false
)
.
inflate
(
R
.
layout
.
items_layout_box_order
,
parent
,
false
)
)
)
}
else
{
}
else
{
return
CardRight
sOrderViewHolder
(
return
Good
sOrderViewHolder
(
LayoutInflater
.
from
(
AppContext
.
get
())
LayoutInflater
.
from
(
AppContext
.
get
())
.
inflate
(
R
.
layout
.
items_layout_
card_rights
_order
,
parent
,
false
)
.
inflate
(
R
.
layout
.
items_layout_
box
_order
,
parent
,
false
)
)
)
}
}
...
...
moduleMain/src/main/res/layout/items_item_vip_rights_order.xml
View file @
58bc56a7
...
@@ -12,8 +12,12 @@
...
@@ -12,8 +12,12 @@
<RelativeLayout
<RelativeLayout
android:layout_width=
"70dp"
android:layout_width=
"70dp"
android:layout_height=
"52dp"
android:layout_height=
"52dp"
android:layout_marginRight=
"10dp"
android:layout_marginRight=
"10dp"
>
android:background=
"@drawable/img_vip_rights_bg"
>
<ImageView
android:id=
"@+id/id_img_rights_bg"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<com.zxhl.cms.widget.RecycleImageView
<com.zxhl.cms.widget.RecycleImageView
android:id=
"@+id/id_img_rights_icon"
android:id=
"@+id/id_img_rights_icon"
...
...
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