2 次代碼提交 a38c649a13 ... e90e6f955c

作者 SHA1 備註 提交日期
  kaijia e90e6f955c 收藏浏览 屏蔽已下架的商品和已失效的商品 6 月之前
  kaijia b5c201d697 屏蔽抖音 唯品会 6 月之前

+ 2 - 2
app/build.gradle

@@ -17,8 +17,8 @@ android {
17 17
         applicationId "com.kx.liedouYX"
18 18
         minSdkVersion 19
19 19
         targetSdkVersion 30
20
-        versionCode 113
21
-        versionName "1.0.13"
20
+        versionCode 115
21
+        versionName "1.0.15"
22 22
 
23 23
         ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
24 24
         multiDexEnabled true

+ 7 - 0
app/src/main/java/com/kx/liedouYX/entity/StockBean.java

@@ -428,6 +428,13 @@ public class StockBean implements Serializable {
428 428
         public void setUrl(String url) {
429 429
             this.url = url;
430 430
         }
431
+
432
+        @Override
433
+        public String toString() {
434
+            return "ImgListBean{" +
435
+                    "url='" + url + '\'' +
436
+                    '}';
437
+        }
431 438
     }
432 439
 
433 440
     public static class VideoListBean {

+ 7 - 7
app/src/main/java/com/kx/liedouYX/ui/activity/mine/MyOrderActivity.java

@@ -184,7 +184,7 @@ public class MyOrderActivity extends BaseActivity implements IOrderView {
184 184
     }
185 185
 
186 186
     private void initScrollTab() {
187
-        String[] strings = new String[]{"全部", "淘宝",  "拼多多", "抖音", "唯品会"};
187
+        String[] strings = new String[]{"全部", "淘宝", "京东", "拼多多", "抖音", "唯品会"};
188 188
         TabCreateUtils.setOrangeTab(this, indicator, strings, new TabCreateUtils.onTitleClickListener() {
189 189
             @Override
190 190
             public void onTitleClick(int index) {
@@ -198,19 +198,19 @@ public class MyOrderActivity extends BaseActivity implements IOrderView {
198 198
                         pType = 1;
199 199
                         pIndex = 1;
200 200
                         break;
201
-//                    case 2:
202
-//                        pType = 4;
203
-//                        pIndex = 2;
204
-//                        break;
205 201
                     case 2:
202
+                        pType = 4;
203
+                        pIndex = 2;
204
+                        break;
205
+                    case 3:
206 206
                         pType = 6;
207 207
                         pIndex = 4;
208 208
                         break;
209
-                    case 3:
209
+                    case 4:
210 210
                         pType = 5;
211 211
                         pIndex = 3;
212 212
                         break;
213
-                    case 4:
213
+                    case 5:
214 214
                         pType = 7;
215 215
                         pIndex = 5;
216 216
                         break;

+ 1 - 1
app/src/main/java/com/kx/liedouYX/ui/activity/search/SearchShopActivity.java

@@ -102,7 +102,7 @@ public class SearchShopActivity extends BaseActivity implements ISearchView, Fra
102 102
 
103 103
     @Override
104 104
     protected void initData() {
105
-        String[] strings = new String[]{"全部", "淘宝", "拼多多", "抖音", "唯品会"};
105
+        String[] strings = new String[]{"全部", "淘宝", "拼多多"};
106 106
         TabCreateUtils.setOrangeTab(this, indicatorSearch, strings, new TabCreateUtils.onTitleClickListener() {
107 107
             @Override
108 108
             public void onTitleClick(int index) {

+ 15 - 9
app/src/main/java/com/kx/liedouYX/ui/adapter/MyScAdpter.java

@@ -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
     }

+ 8 - 0
app/src/main/java/com/kx/liedouYX/ui/adapter/RecordDateAdapter.java

@@ -1,6 +1,7 @@
1 1
 package com.kx.liedouYX.ui.adapter;
2 2
 
3 3
 import android.content.Context;
4
+import android.text.TextUtils;
4 5
 import android.view.LayoutInflater;
5 6
 import android.view.View;
6 7
 import android.view.ViewGroup;
@@ -10,6 +11,7 @@ import androidx.annotation.NonNull;
10 11
 import androidx.recyclerview.widget.LinearLayoutManager;
11 12
 import androidx.recyclerview.widget.RecyclerView;
12 13
 
14
+import com.kx.lib_core.utils.LogUtil;
13 15
 import com.kx.liedouYX.R;
14 16
 import com.kx.liedouYX.entity.StockBean;
15 17
 import com.kx.liedouYX.utils.RecycleViewUtils;
@@ -46,6 +48,12 @@ public class RecordDateAdapter extends RecyclerView.Adapter<RecordDateAdapter.My
46 48
     public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
47 49
         RecycleViewUtils.setListRecycleGood(context, holder.recordList);
48 50
         List<StockBean> stockBeans = data.get(position);
51
+        for (StockBean stockBean : stockBeans) {
52
+            if (TextUtils.isEmpty(stockBean.getGoods_id())) {
53
+//                stockBeans.remove(stockBean);
54
+                LogUtil.e("失效的商品:" + stockBean.toString());
55
+            }
56
+        }
49 57
         holder.recordDate.setText(stockBeans.get(0).getAdd_time());
50 58
         LinearLayoutManager manager = new LinearLayoutManager(context);
51 59
         manager.setOrientation(RecyclerView.VERTICAL);

+ 12 - 7
app/src/main/java/com/kx/liedouYX/ui/adapter/RecordListAdapter.java

@@ -24,6 +24,7 @@ import com.kx.liedouYX.ui.activity.detail.DetailsActivity;
24 24
 import com.kx.liedouYX.utils.IntentUtils;
25 25
 import com.kx.liedouYX.utils.NumberUtils;
26 26
 import com.kx.liedouYX.utils.Textutils;
27
+import com.kx.liedouYX.utils.ToastUtils;
27 28
 
28 29
 import java.util.List;
29 30
 
@@ -80,7 +81,7 @@ public class RecordListAdapter extends RecyclerView.Adapter<RecordListAdapter.My
80 81
                 Drawable drawable = context.getResources().getDrawable(R.mipmap.wph_icon);
81 82
                 Textutils.setDrawableText(holder.shopTitle, " " + goods.getTitle(), drawable);
82 83
             }
83
-            holder.discountPrice.setText("¥" +NumberUtils.formatStringNumber( goods.getDiscount_price()));
84
+            holder.discountPrice.setText("¥" + NumberUtils.formatStringNumber(goods.getDiscount_price()));
84 85
             //给文字中间画条横线
85 86
             holder.price.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG | Paint.ANTI_ALIAS_FLAG);
86 87
             holder.price.setText("¥" + NumberUtils.formatStringNumber(goods.getPrice()));
@@ -93,13 +94,17 @@ public class RecordListAdapter extends RecyclerView.Adapter<RecordListAdapter.My
93 94
             holder.itemView.setOnClickListener(new View.OnClickListener() {
94 95
                 @Override
95 96
                 public void onClick(View v) {
97
+                    if (goods.getShop_type() == 0 || goods.getShop_type() == 1 || goods.getShop_type() == 6) {
96 98
 //                    goods_id, coupon_price, discount_price, price, is_coupon, commission_rate
97
-                    /**
98
-                     * @auth lkj
99
-                     * @Date 2023/7/20 14:06
100
-                     * @Describe 跳转到商品详情界面
101
-                     */
102
-                    IntentUtils.getInstance().toJumpDetailsUI(context, DetailsActivity.class, goods, Constants.HistoryAction, goods.getId() + "");
99
+                        /**
100
+                         * @auth lkj
101
+                         * @Date 2023/7/20 14:06
102
+                         * @Describe 跳转到商品详情界面
103
+                         */
104
+                        IntentUtils.getInstance().toJumpDetailsUI(context, DetailsActivity.class, goods, Constants.HistoryAction, goods.getId() + "");
105
+                    } else {
106
+                        ToastUtils.showToast(context, "该商品已下架!");
107
+                    }
103 108
                 }
104 109
             });
105 110
         } else {

+ 2 - 2
app/src/main/java/com/kx/liedouYX/ui/fragment/home_page/HomePageFragment.java

@@ -251,8 +251,8 @@ public class HomePageFragment extends LazyFragment {
251 251
         strings.add(strTB);
252 252
 //        strings.add(strJD);
253 253
         strings.add(strPDD);
254
-        strings.add(strDY);
255
-        strings.add(strWPH);
254
+//        strings.add(strDY);
255
+//        strings.add(strWPH);
256 256
         LinearLayoutManager manager = new LinearLayoutManager(getActivity());
257 257
         manager.setOrientation(RecyclerView.HORIZONTAL);
258 258
         HomePageCenterTabAdapter centerTabAdapter = new HomePageCenterTabAdapter(getActivity(), strings);

+ 18 - 18
app/src/main/java/com/kx/liedouYX/ui/fragment/home_page/home_page_sub/jd/JDFragment.java

@@ -63,12 +63,12 @@ public class JDFragment extends LazyFragment implements ITBView {
63 63
             case 1:
64 64
                 jdPresenter.pddGoodsRecommend("", 1, 10);
65 65
                 break;
66
-            case 2:
67
-                jdPresenter.dyGoodsList("", "", "", 1, 10);
68
-                break;
69
-            case 3:
70
-                jdPresenter.wphGoodsList(1, 10);
71
-                break;
66
+//            case 2:
67
+//                jdPresenter.dyGoodsList("", "", "", 1, 10);
68
+//                break;
69
+//            case 3:
70
+//                jdPresenter.wphGoodsList(1, 10);
71
+//                break;
72 72
         }
73 73
     }
74 74
 
@@ -104,12 +104,12 @@ public class JDFragment extends LazyFragment implements ITBView {
104 104
                 case 1:
105 105
                     jdPresenter.pddGoodsRecommend("", 1, 10);
106 106
                     break;
107
-                case 2:
108
-                    jdPresenter.dyGoodsList("", "", "", page, 10);
109
-                    break;
110
-                case 3:
111
-                    jdPresenter.wphGoodsList(page, 10);
112
-                    break;
107
+//                case 2:
108
+//                    jdPresenter.dyGoodsList("", "", "", page, 10);
109
+//                    break;
110
+//                case 3:
111
+//                    jdPresenter.wphGoodsList(page, 10);
112
+//                    break;
113 113
             }
114 114
         }
115 115
     }
@@ -131,12 +131,12 @@ public class JDFragment extends LazyFragment implements ITBView {
131 131
                 case 1:
132 132
                     jdPresenter.pddGoodsRecommend("", page, 10);
133 133
                     break;
134
-                case 2:
135
-                    jdPresenter.dyGoodsList("", "", "", page, 10);
136
-                    break;
137
-                case 3:
138
-                    jdPresenter.wphGoodsList(page, 10);
139
-                    break;
134
+//                case 2:
135
+//                    jdPresenter.dyGoodsList("", "", "", page, 10);
136
+//                    break;
137
+//                case 3:
138
+//                    jdPresenter.wphGoodsList(page, 10);
139
+//                    break;
140 140
             }
141 141
         }
142 142
     }

+ 14 - 1
app/src/main/java/com/kx/liedouYX/ui/fragment/mine/scll/LljlFragment.java

@@ -2,6 +2,7 @@ package com.kx.liedouYX.ui.fragment.mine.scll;
2 2
 
3 3
 import android.content.Context;
4 4
 import android.os.Bundle;
5
+import android.text.TextUtils;
5 6
 import android.view.View;
6 7
 
7 8
 import androidx.recyclerview.widget.LinearLayoutManager;
@@ -24,6 +25,8 @@ import com.kx.liedouYX.ui.fragment.mine.yhfk.YhfkPresenter;
24 25
 import com.kx.liedouYX.utils.FloatBtnCtrlUtil;
25 26
 import com.kx.liedouYX.utils.RecycleViewUtils;
26 27
 
28
+import java.util.ArrayList;
29
+import java.util.Iterator;
27 30
 import java.util.List;
28 31
 
29 32
 import butterknife.BindView;
@@ -99,8 +102,18 @@ public class LljlFragment extends LazyFragment implements IYhfkView {
99 102
                 if (recordListBean.getErrno().equals("0") && recordListBean.getErr().equals("成功")) {
100 103
                     RecordListBean.RstBean rst = recordListBean.getRst();
101 104
                     if (rst != null) {
105
+                        List<List<StockBean>> beanList1 = new ArrayList<>();
106
+                        List<StockBean> beanList2 = new ArrayList<>();
102 107
                         List<List<StockBean>> data = rst.getData();
103
-                        initAdapter(data);
108
+                        for (List<StockBean> datum : data) {
109
+                            for (StockBean stockBean : datum) {
110
+                                if (!TextUtils.isEmpty(stockBean.getGoods_id())) {
111
+                                    beanList2.add(stockBean);
112
+                                }
113
+                            }
114
+                            beanList1.add(beanList2);
115
+                        }
116
+                        initAdapter(beanList1);
104 117
                     }
105 118
                 }
106 119
             }

+ 2 - 2
magicindicator/magicindicator.iml

@@ -31,10 +31,10 @@
31 31
     <output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/classes" />
32 32
     <exclude-output />
33 33
     <content url="file://$MODULE_DIR$">
34
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/out" isTestSource="false" generated="true" />
34
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
35 35
       <sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/out" isTestSource="false" generated="true" />
36 36
       <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
37
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
37
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/out" isTestSource="false" generated="true" />
38 38
       <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" generated="true" />
39 39
       <sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debugAndroidTest/out" isTestSource="true" generated="true" />
40 40
       <sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />