|
@@ -3,6 +3,7 @@ package com.kx.liedouYX.ui.adapter;
|
3
|
3
|
import android.content.Context;
|
4
|
4
|
import android.graphics.Paint;
|
5
|
5
|
import android.graphics.drawable.Drawable;
|
|
6
|
+import android.text.TextUtils;
|
6
|
7
|
import android.view.LayoutInflater;
|
7
|
8
|
import android.view.View;
|
8
|
9
|
import android.view.ViewGroup;
|
|
@@ -25,6 +26,7 @@ import com.kx.liedouYX.ui.activity.detail.DetailsActivity;
|
25
|
26
|
import com.kx.liedouYX.utils.IntentUtils;
|
26
|
27
|
import com.kx.liedouYX.utils.NumberUtils;
|
27
|
28
|
import com.kx.liedouYX.utils.Textutils;
|
|
29
|
+import com.kx.liedouYX.utils.ToastUtils;
|
28
|
30
|
|
29
|
31
|
import java.util.List;
|
30
|
32
|
|
|
@@ -95,15 +97,19 @@ public class MyScAdpter extends RecyclerView.Adapter<MyScAdpter.MyViewHolder> {
|
95
|
97
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
96
|
98
|
@Override
|
97
|
99
|
public void onClick(View v) {
|
98
|
|
- StockBean stockBean = new StockBean();
|
99
|
|
- stockBean.setGoods_id(dataBean.getGoods_id());
|
100
|
|
- stockBean.setCoupon_price(dataBean.getCoupon_price());
|
101
|
|
- stockBean.setDiscount_price(dataBean.getDiscount_price() + "");
|
102
|
|
- stockBean.setPrice(dataBean.getPrice() + "");
|
103
|
|
- stockBean.setIs_coupon((int) dataBean.getIs_coupon());
|
104
|
|
- stockBean.setCommission_price(dataBean.getCommission_rate() + "");
|
105
|
|
- stockBean.setShop_type(dataBean.getShop_type());
|
106
|
|
- IntentUtils.getInstance().toJumpDetailsUI(context, DetailsActivity.class, stockBean, Constants.collectAction, dataBean.getId() + "");
|
|
100
|
+ if (!TextUtils.isEmpty(dataBean.getFull_goods_id())) {
|
|
101
|
+ StockBean stockBean = new StockBean();
|
|
102
|
+ stockBean.setGoods_id(dataBean.getGoods_id());
|
|
103
|
+ stockBean.setCoupon_price(dataBean.getCoupon_price());
|
|
104
|
+ stockBean.setDiscount_price(dataBean.getDiscount_price() + "");
|
|
105
|
+ stockBean.setPrice(dataBean.getPrice() + "");
|
|
106
|
+ stockBean.setIs_coupon((int) dataBean.getIs_coupon());
|
|
107
|
+ stockBean.setCommission_price(dataBean.getCommission_rate() + "");
|
|
108
|
+ stockBean.setShop_type(dataBean.getShop_type());
|
|
109
|
+ IntentUtils.getInstance().toJumpDetailsUI(context, DetailsActivity.class, stockBean, Constants.collectAction, dataBean.getId() + "");
|
|
110
|
+ } else {
|
|
111
|
+ ToastUtils.showToast(context, "该商品已下架!");
|
|
112
|
+ }
|
107
|
113
|
}
|
108
|
114
|
});
|
109
|
115
|
}
|