Commit 01a9b9bb authored by chengkun's avatar chengkun

order_item_list -> merger_order_item_list

parent 44f6c7ae
...@@ -40,7 +40,7 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout ...@@ -40,7 +40,7 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
} }
holder.itemView.findViewById<TextView>(R.id.tv_market_name).text = data.marketing_name holder.itemView.findViewById<TextView>(R.id.tv_market_name).text = data.marketing_name
holder.itemView.findViewById<TextView>(R.id.tv_pay_status).text = data.online_status holder.itemView.findViewById<TextView>(R.id.tv_pay_status).text = data.online_status
when(data.order_item_list.size) { when(data.merge_order_item_list.size) {
0 -> { 0 -> {
holder.itemView.findViewById<LinearLayout>(R.id.ll_order_image1).visibility = View.GONE holder.itemView.findViewById<LinearLayout>(R.id.ll_order_image1).visibility = View.GONE
holder.itemView.findViewById<LinearLayout>(R.id.ll_order_image2).visibility = View.GONE holder.itemView.findViewById<LinearLayout>(R.id.ll_order_image2).visibility = View.GONE
...@@ -50,8 +50,8 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout ...@@ -50,8 +50,8 @@ 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.merge_order_item_list[0].desc_pic_url)) {
Glide.with(context).load(Uri.parse(data.order_item_list[0].desc_pic_url)).apply(RequestOptions().transform( Glide.with(context).load(Uri.parse(data.merge_order_item_list[0].desc_pic_url)).apply(RequestOptions().transform(
CenterCrop(), RoundedCorners( CenterCrop(), RoundedCorners(
DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image1)) DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image1))
} }
...@@ -60,11 +60,13 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout ...@@ -60,11 +60,13 @@ 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<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.merge_order_item_list[0].desc_pic_url)) {
Glide.with(context).load(Uri.parse(data.order_item_list[0].desc_pic_url)).apply(RequestOptions().transform( Glide.with(context).load(Uri.parse(data.merge_order_item_list[0].desc_pic_url)).apply(RequestOptions().transform(
CenterCrop(), RoundedCorners( CenterCrop(), RoundedCorners(
DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image1)) DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image1))
Glide.with(context).load(Uri.parse( data.order_item_list[1].desc_pic_url)).apply(RequestOptions().transform( }
if (Utils.isWebUrl(data.merge_order_item_list[1].desc_pic_url)) {
Glide.with(context).load(Uri.parse(data.merge_order_item_list[1].desc_pic_url)).apply(RequestOptions().transform(
CenterCrop(), RoundedCorners( CenterCrop(), RoundedCorners(
DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image2)) DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image2))
} }
...@@ -73,14 +75,18 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout ...@@ -73,14 +75,18 @@ 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<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.merge_order_item_list[0].desc_pic_url)) {
Glide.with(context).load(Uri.parse(data.order_item_list[0].desc_pic_url)).apply(RequestOptions().transform( Glide.with(context).load(Uri.parse(data.merge_order_item_list[0].desc_pic_url)).apply(RequestOptions().transform(
CenterCrop(), RoundedCorners( CenterCrop(), RoundedCorners(
DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image1)) DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image1))
Glide.with(context).load(Uri.parse(data.order_item_list[1].desc_pic_url)).apply(RequestOptions().transform( }
if (Utils.isWebUrl(data.merge_order_item_list[1].desc_pic_url)) {
Glide.with(context).load(Uri.parse(data.merge_order_item_list[1].desc_pic_url)).apply(RequestOptions().transform(
CenterCrop(), RoundedCorners( CenterCrop(), RoundedCorners(
DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image2)) DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image2))
Glide.with(context).load(Uri.parse(data.order_item_list[2].desc_pic_url)).apply(RequestOptions().transform( }
if (Utils.isWebUrl(data.merge_order_item_list[2].desc_pic_url)) {
Glide.with(context).load(Uri.parse(data.merge_order_item_list[2].desc_pic_url)).apply(RequestOptions().transform(
CenterCrop(), RoundedCorners( CenterCrop(), RoundedCorners(
DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image3)) DensityUtil.dp2px(roundRadus)))).into(holder.itemView.findViewById(R.id.round_image3))
} }
......
...@@ -71,7 +71,9 @@ data class MergeOrderItem( ...@@ -71,7 +71,9 @@ data class MergeOrderItem(
@SerializedName(value = "goods_num") @SerializedName(value = "goods_num")
val goods_num: Int, val goods_num: Int,
@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 OrderItem( data class OrderItem(
......
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