Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
24bb902b
Commit
24bb902b
authored
Sep 02, 2021
by
chengkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加载商品网络图片
parent
95d8cf1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
OrderListAdapter.kt
...idian/shenghuoquan/buserorder/adapter/OrderListAdapter.kt
+6
-6
OrderWebData.kt
...va/com/yidian/shenghuoquan/buserorder/dto/OrderWebData.kt
+3
-1
Utils.kt
...in/java/com/yidian/shenghuoquan/buserorder/utils/Utils.kt
+3
-0
No files found.
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/adapter/OrderListAdapter.kt
View file @
24bb902b
...
@@ -38,28 +38,28 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
...
@@ -38,28 +38,28 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image2
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image2
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image3
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image3
).
visibility
=
View
.
GONE
/*
if (Utils.isWebUrl(data.order_item_list[0].desc_pic_url)) {
if
(
Utils
.
isWebUrl
(
data
.
order_item_list
[
0
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
0
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
0
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
}
*/
}
}
}
2
->
{
2
->
{
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog2_name
).
text
=
data
.
order_item_list
[
1
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog2_name
).
text
=
data
.
order_item_list
[
1
].
goods_name
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image3
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image3
).
visibility
=
View
.
GONE
/*
if (Utils.isWebUrl(data.order_item_list[0].desc_pic_url) && Utils.isWebUrl(data.order_item_list[1].desc_pic_url)) {
if
(
Utils
.
isWebUrl
(
data
.
order_item_list
[
0
].
desc_pic_url
)
&&
Utils
.
isWebUrl
(
data
.
order_item_list
[
1
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
0
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
0
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
1
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
1
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
}
*/
}
}
}
else
->
{
else
->
{
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog2_name
).
text
=
data
.
order_item_list
[
1
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog2_name
).
text
=
data
.
order_item_list
[
1
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_good3_name
).
text
=
data
.
order_item_list
[
2
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_good3_name
).
text
=
data
.
order_item_list
[
2
].
goods_name
/*
if (Utils.isWebUrl(data.order_item_list[0].desc_pic_url) && Utils.isWebUrl(data.order_item_list[1].desc_pic_url) && Utils.isWebUrl(data.order_item_list[2].desc_pic_url)) {
if
(
Utils
.
isWebUrl
(
data
.
order_item_list
[
0
].
desc_pic_url
)
&&
Utils
.
isWebUrl
(
data
.
order_item_list
[
1
].
desc_pic_url
)
&&
Utils
.
isWebUrl
(
data
.
order_item_list
[
2
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
0
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
0
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
1
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
1
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
2
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image3
))
Glide
.
with
(
context
).
load
(
data
.
order_item_list
[
2
].
desc_pic_url
).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image3
))
}
*/
}
}
}
}
}
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_order_goods_count
).
text
=
"共${data.goods_num}件"
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_order_goods_count
).
text
=
"共${data.goods_num}件"
...
...
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/dto/OrderWebData.kt
View file @
24bb902b
...
@@ -82,7 +82,9 @@ data class OrderItem(
...
@@ -82,7 +82,9 @@ data class OrderItem(
@SerializedName
(
value
=
"goods_sku_id"
)
@SerializedName
(
value
=
"goods_sku_id"
)
val
goods_sku_id
:
String
,
val
goods_sku_id
:
String
,
@SerializedName
(
value
=
"price"
)
@SerializedName
(
value
=
"price"
)
val
price
:
Double
val
price
:
Double
,
@SerializedName
(
value
=
"desc_pic_url"
)
var
desc_pic_url
:
String
?
=
null
)
)
data class
PlaceList
(
data class
PlaceList
(
...
...
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/utils/Utils.kt
View file @
24bb902b
...
@@ -9,6 +9,9 @@ object Utils {
...
@@ -9,6 +9,9 @@ object Utils {
"top"
,
"com.cn"
,
"com"
,
"net"
,
"cn"
,
"cc"
,
"gov"
,
"cn"
,
"hk"
"top"
,
"com.cn"
,
"com"
,
"net"
,
"cn"
,
"cc"
,
"gov"
,
"cn"
,
"hk"
)
)
fun
isWebUrl
(
url
:
String
?):
Boolean
{
fun
isWebUrl
(
url
:
String
?):
Boolean
{
if
(
url
==
null
)
{
return
false
}
val
sb
=
StringBuilder
()
val
sb
=
StringBuilder
()
sb
.
append
(
"("
)
sb
.
append
(
"("
)
for
(
anExt
in
come
)
{
for
(
anExt
in
come
)
{
...
...
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