Browse Source

修改产品列表标签

小狼 5 years ago
parent
commit
50ee691212

+ 16 - 122
app/build.gradle

@@ -58,151 +58,45 @@ android {
58 58
     }
59 59
 
60 60
     productFlavors {
61
-        z30033 {
62
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30001"]
63
-            buildConfigField 'String', 'CHANNLE', '"30001"'
64
-        }
61
+
65 62
 
66 63
         aoppo {
67
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30074"]
68
-            buildConfigField 'String', 'CHANNLE', '"30074"'
64
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1006"]
65
+            buildConfigField 'String', 'CHANNLE', '"1006"'
69 66
         }
70 67
 
71 68
         a360 {
72
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30071"]
73
-            buildConfigField 'String', 'CHANNLE', '"30071"'
69
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1002"]
70
+            buildConfigField 'String', 'CHANNLE', '"1002"'
74 71
         }
75 72
 
76 73
         ayingyongbao {
77
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30070"]
78
-            buildConfigField 'String', 'CHANNLE', '"30070"'
74
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1001"]
75
+            buildConfigField 'String', 'CHANNLE', '"1001"'
79 76
         }
80 77
 
81 78
         axiaomi {
82
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30075"]
83
-            buildConfigField 'String', 'CHANNLE', '"30075"'
79
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1004"]
80
+            buildConfigField 'String', 'CHANNLE', '"1004"'
84 81
         }
85 82
 
86 83
         ahuawei {
87
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30076"]
88
-            buildConfigField 'String', 'CHANNLE', '"30076"'
84
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1005"]
85
+            buildConfigField 'String', 'CHANNLE', '"1005"'
89 86
         }
90 87
 
91
-        abaidu {
92
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30072"]
93
-            buildConfigField 'String', 'CHANNLE', '"30072"'
94
-        }
88
+
95 89
         ameizu {
96
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1001"]
97
-            buildConfigField 'String', 'CHANNLE', '"1001"'
90
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1007"]
91
+            buildConfigField 'String', 'CHANNLE', '"1007"'
98 92
         }
99 93
         avivo {
100
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1002"]
101
-            buildConfigField 'String', 'CHANNLE', '"1002"'
102
-        }
103
-        aqqlibray {
104
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30063"]
105
-            buildConfigField 'String', 'CHANNLE', '"30063"'
106
-        }
107
-
108
-        axunfei {
109
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30068"]
110
-            buildConfigField 'String', 'CHANNLE', '"30068"'
111
-        }
112
-
113
-
114
-        bvivo {
115
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30057"]
116
-            buildConfigField 'String', 'CHANNLE', '"30057"'
117
-        }
118
-
119
-        bxiaomi {
120
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30058"]
121
-            buildConfigField 'String', 'CHANNLE', '"30058"'
122
-        }
123
-
124
-        byingyongbao {
125
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30059"]
126
-            buildConfigField 'String', 'CHANNLE', '"30059"'
94
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1003"]
95
+            buildConfigField 'String', 'CHANNLE', '"1003"'
127 96
         }
128 97
 
129
-        bhuawei {
130
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "30060"]
131
-            buildConfigField 'String', 'CHANNLE', '"30060"'
132
-        }
133
-        qutoutiao01 {
134
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40014"]
135
-            buildConfigField 'String', 'CHANNLE', '"40014"'
136
-        }
137
-        qutoutiao02 {
138
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40015"]
139
-            buildConfigField 'String', 'CHANNLE', '"40015"'
140
-        }
141
-        qutoutiao03 {
142
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40016"]
143
-            buildConfigField 'String', 'CHANNLE', '"40016"'
144
-        }
145
-        qutoutiao04 {
146
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40017"]
147
-            buildConfigField 'String', 'CHANNLE', '"40017"'
148
-        }
149
-        qutoutiao05 {
150
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40018"]
151
-            buildConfigField 'String', 'CHANNLE', '"40018"'
152
-        }
153
-        qutoutiao06 {
154
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40019"]
155
-            buildConfigField 'String', 'CHANNLE', '"40019"'
156
-        }
157 98
 
158
-        qutoutiao07 {
159
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40020"]
160
-            buildConfigField 'String', 'CHANNLE', '"40020"'
161
-        }
162
-        qutoutiao08 {
163
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40021"]
164
-            buildConfigField 'String', 'CHANNLE', '"40021"'
165
-        }
166
-        qutoutiao09 {
167
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40022"]
168
-            buildConfigField 'String', 'CHANNLE', '"40022"'
169
-        }
170
-        qutoutiao10 {
171
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40023"]
172
-            buildConfigField 'String', 'CHANNLE', '"40023"'
173
-        }
174
-        qutoutiao11 {
175
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40024"]
176
-            buildConfigField 'String', 'CHANNLE', '"40024"'
177
-        }
178
-
179
-
180
-        shenmashousuo01 {
181
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40026"]
182
-            buildConfigField 'String', 'CHANNLE', '"40026"'
183
-        }
184
-        shenmashousuo02 {
185
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40027"]
186
-            buildConfigField 'String', 'CHANNLE', '"40027"'
187
-        }
188
-        shenmashousuo03 {
189
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40028"]
190
-            buildConfigField 'String', 'CHANNLE', '"40028"'
191
-        }
192
-        shenmashousuo04 {
193
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40029"]
194
-            buildConfigField 'String', 'CHANNLE', '"40029"'
195
-        }
196
-        shenmashousuo05 {
197
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40030"]
198
-            buildConfigField 'String', 'CHANNLE', '"40030"'
199
-        }
200
-        shenmashousuo06 {
201
-            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "40031"]
202
-            buildConfigField 'String', 'CHANNLE', '"40031"'
203
-        }
204 99
 
205
-//
206 100
 
207 101
     }
208 102
 }

+ 23 - 3
app/src/main/java/com/smileflowpig/money/moneyplatfrom/Adapter/PlatformAdapter.java

@@ -60,11 +60,29 @@ public class PlatformAdapter extends RecyclerView.Adapter<PlatformAdapter.MyView
60 60
                 getItempostion.success(position);
61 61
             }
62 62
         });
63
-        if (list.get(position).prod_title.get(0).equals("")) {
63
+        if (list.get(position).prod_title == null || list.get(position).prod_title.size() == 0) {
64 64
             holder.title.setVisibility(View.GONE);
65
+            holder.title2.setVisibility(View.GONE);
65 66
         } else {
66
-            holder.title.setVisibility(View.VISIBLE);
67
-            holder.title.setText(list.get(position).prod_title.get(0));
67
+            if(list.get(position).prod_title.size()<3){
68
+                if(list.get(position).prod_title.size()==1){
69
+                    holder.title.setVisibility(View.VISIBLE);
70
+                    holder.title.setText(list.get(position).prod_title.get(0));
71
+                    holder.title2.setVisibility(View.GONE);
72
+                }else if(list.get(position).prod_title.size()==2){
73
+                    holder.title.setVisibility(View.VISIBLE);
74
+                    holder.title.setText(list.get(position).prod_title.get(0));
75
+                    holder.title2.setVisibility(View.VISIBLE);
76
+                    holder.title2.setText(list.get(position).prod_title.get(1));
77
+                }
78
+
79
+            }else {
80
+                holder.title.setVisibility(View.VISIBLE);
81
+                holder.title.setText(list.get(position).prod_title.get(0));
82
+                holder.title2.setVisibility(View.VISIBLE);
83
+                holder.title2.setText(list.get(position).prod_title.get(1));
84
+            }
85
+
68 86
         }
69 87
     }
70 88
 
@@ -83,6 +101,7 @@ public class PlatformAdapter extends RecyclerView.Adapter<PlatformAdapter.MyView
83 101
         private final TextView name;
84 102
         private final ImageView icon;
85 103
         private final TextView title;
104
+        private final TextView title2;
86 105
 
87 106
         public MyViewHolder(View itemView) {
88 107
             super(itemView);
@@ -95,6 +114,7 @@ public class PlatformAdapter extends RecyclerView.Adapter<PlatformAdapter.MyView
95 114
             day = (TextView) itemView.findViewById(R.id.hot_day);
96 115
             people = (TextView) itemView.findViewById(R.id.hot_people);
97 116
             title = (TextView) itemView.findViewById(R.id.pri_title);
117
+            title2 = (TextView) itemView.findViewById(R.id.pri_title2);
98 118
 
99 119
         }
100 120
     }

+ 24 - 4
app/src/main/java/com/smileflowpig/money/moneyplatfrom/Adapter/SerchAdapter.java

@@ -62,11 +62,29 @@ public class SerchAdapter extends RecyclerView.Adapter<SerchAdapter.MyViewHolder
62 62
             }
63 63
         });
64 64
 
65
-        if(list.get(position).prod_title.get(0).equals("")){
65
+        if (list.get(position).prod_title == null || list.get(position).prod_title.size() == 0) {
66 66
             holder.title.setVisibility(View.GONE);
67
-        }else {
68
-            holder.title.setVisibility(View.VISIBLE);
69
-            holder.title.setText(list.get(position).prod_title.get(0));
67
+            holder.title2.setVisibility(View.GONE);
68
+        } else {
69
+            if(list.get(position).prod_title.size()<3){
70
+                if(list.get(position).prod_title.size()==1){
71
+                    holder.title.setVisibility(View.VISIBLE);
72
+                    holder.title.setText(list.get(position).prod_title.get(0));
73
+                    holder.title2.setVisibility(View.GONE);
74
+                }else if(list.get(position).prod_title.size()==2){
75
+                    holder.title.setVisibility(View.VISIBLE);
76
+                    holder.title.setText(list.get(position).prod_title.get(0));
77
+                    holder.title2.setVisibility(View.VISIBLE);
78
+                    holder.title2.setText(list.get(position).prod_title.get(1));
79
+                }
80
+
81
+            }else {
82
+                holder.title.setVisibility(View.VISIBLE);
83
+                holder.title.setText(list.get(position).prod_title.get(0));
84
+                holder.title2.setVisibility(View.VISIBLE);
85
+                holder.title2.setText(list.get(position).prod_title.get(1));
86
+            }
87
+
70 88
         }
71 89
         if(list.get(position).is_quality!=null){
72 90
             if(list.get(position).is_quality.equals("0")){
@@ -95,6 +113,7 @@ public class SerchAdapter extends RecyclerView.Adapter<SerchAdapter.MyViewHolder
95 113
         private final TextView name;
96 114
         private final ImageView icon;
97 115
         private final TextView title;
116
+        private final TextView title2;
98 117
 
99 118
         public MyViewHolder(View itemView) {
100 119
             super(itemView);
@@ -107,6 +126,7 @@ public class SerchAdapter extends RecyclerView.Adapter<SerchAdapter.MyViewHolder
107 126
             day = (TextView) itemView.findViewById(R.id.hot_day);
108 127
             people = (TextView) itemView.findViewById(R.id.hot_people);
109 128
             title = (TextView) itemView.findViewById(R.id.pri_title);
129
+            title2 = (TextView) itemView.findViewById(R.id.pri_title2);
110 130
 
111 131
         }
112 132
     }

+ 24 - 4
app/src/main/java/com/smileflowpig/money/moneyplatfrom/Adapter/TabAdapter.java

@@ -60,11 +60,29 @@ public class TabAdapter extends RecyclerView.Adapter<TabAdapter.MyViewHolder> {
60 60
                 getItempostion.success(position);
61 61
             }
62 62
         });
63
-        if(list.get(position).prod_title.get(0).equals("")){
63
+        if (list.get(position).prod_title == null || list.get(position).prod_title.size() == 0) {
64 64
             holder.title.setVisibility(View.GONE);
65
-        }else {
66
-            holder.title.setVisibility(View.VISIBLE);
67
-            holder.title.setText(list.get(position).prod_title.get(0));
65
+            holder.title2.setVisibility(View.GONE);
66
+        } else {
67
+            if(list.get(position).prod_title.size()<3){
68
+                if(list.get(position).prod_title.size()==1){
69
+                    holder.title.setVisibility(View.VISIBLE);
70
+                    holder.title.setText(list.get(position).prod_title.get(0));
71
+                    holder.title2.setVisibility(View.GONE);
72
+                }else if(list.get(position).prod_title.size()==2){
73
+                    holder.title.setVisibility(View.VISIBLE);
74
+                    holder.title.setText(list.get(position).prod_title.get(0));
75
+                    holder.title2.setVisibility(View.VISIBLE);
76
+                    holder.title2.setText(list.get(position).prod_title.get(1));
77
+                }
78
+
79
+            }else {
80
+                holder.title.setVisibility(View.VISIBLE);
81
+                holder.title.setText(list.get(position).prod_title.get(0));
82
+                holder.title2.setVisibility(View.VISIBLE);
83
+                holder.title2.setText(list.get(position).prod_title.get(1));
84
+            }
85
+
68 86
         }
69 87
     }
70 88
 
@@ -83,6 +101,7 @@ public class TabAdapter extends RecyclerView.Adapter<TabAdapter.MyViewHolder> {
83 101
         private final TextView name;
84 102
         private final ImageView icon;
85 103
         private final TextView title;
104
+        private final TextView title2;
86 105
 
87 106
         public MyViewHolder(View itemView) {
88 107
             super(itemView);
@@ -95,6 +114,7 @@ public class TabAdapter extends RecyclerView.Adapter<TabAdapter.MyViewHolder> {
95 114
             day = (TextView) itemView.findViewById(R.id.hot_day);
96 115
             people = (TextView) itemView.findViewById(R.id.hot_people);
97 116
             title = (TextView) itemView.findViewById(R.id.pri_title);
117
+            title2 = (TextView) itemView.findViewById(R.id.pri_title2);
98 118
 
99 119
         }
100 120
     }

+ 1 - 1
app/src/main/java/com/smileflowpig/money/moneyplatfrom/activities/MessContextActivity.java

@@ -49,7 +49,7 @@ public class MessContextActivity extends PresenterActivity implements View.OnCli
49 49
     }
50 50
     public void getdata(){
51 51
 
52
-        Observable<PushBean> pushBeanObservable = new NetRequestUtils2().bucuo().getbaseretrofit().getpushmess(3).subscribeOn(Schedulers.io())
52
+        Observable<PushBean> pushBeanObservable = new NetRequestUtils2().bucuo().getbaseretrofit().getpushmess(2).subscribeOn(Schedulers.io())
53 53
                 .observeOn(AndroidSchedulers.mainThread());
54 54
         pushBeanObservable.subscribe(new Observer<PushBean>() {
55 55
             @Override

+ 2 - 4
app/src/main/java/com/smileflowpig/money/moneyplatfrom/frags/main/state/PigHomeFragment.java

@@ -155,8 +155,8 @@ public class PigHomeFragment extends PresenterFragment implements View.OnClickLi
155 155
         }
156 156
 
157 157
         //vivo渠道控制信用卡开关
158
-//        if (!TextUtils.isEmpty(BuildConfig.CHANNLE) && BuildConfig.CHANNLE.equals("30073"))
159
-//            cardvisible();
158
+        if (!TextUtils.isEmpty(BuildConfig.CHANNLE) && BuildConfig.CHANNLE.equals("1003"))
159
+            cardvisible();
160 160
         //滚动文字
161 161
         getlapview();
162 162
 //        //banner
@@ -446,12 +446,10 @@ public class PigHomeFragment extends PresenterFragment implements View.OnClickLi
446 446
                 if(o!=null){
447 447
                     final List<Allbanner.RstBean.HomeactBean> homeact = o.rst.homeact;
448 448
                     if(homeact!=null&&homeact.size()>0){
449
-
450 449
                         banner.setData(homeact,null);
451 450
                         banner.loadImage(new XBanner.XBannerAdapter() {
452 451
                             @Override
453 452
                             public void loadBanner(XBanner banner, Object model, View view, int position2) {
454
-
455 453
                                 Glide.with(getActivity()).load(homeact.get(position2).photo).into((ImageView) view);
456 454
                             }
457 455
                         });

+ 14 - 0
app/src/main/res/layout/hot_adapter_layout.xml

@@ -57,6 +57,20 @@
57 57
                     android:gravity="center"
58 58
                     android:visibility="gone"
59 59
                     />
60
+                <TextView
61
+                    android:id="@+id/pri_title2"
62
+                    android:layout_width="wrap_content"
63
+                    android:layout_height="wrap_content"
64
+                    android:paddingLeft="5px"
65
+                    android:paddingRight="5px"
66
+                    android:text="通过率高"
67
+                    android:textColor="#FB4F4F"
68
+                    android:textSize="9px"
69
+                    android:layout_marginLeft="9px"
70
+                    android:background="@drawable/hotback"
71
+                    android:gravity="center"
72
+                    android:visibility="gone"
73
+                    />
60 74
             </LinearLayout>
61 75
             <TextView
62 76
                 android:id="@+id/hot_destory"

+ 14 - 0
app/src/main/res/layout/serch_adapter_layout.xml

@@ -59,6 +59,20 @@
59 59
                     android:paddingRight="5px"
60 60
                     android:visibility="gone"
61 61
                     />
62
+                <TextView
63
+                    android:id="@+id/pri_title2"
64
+                    android:layout_width="wrap_content"
65
+                    android:layout_height="wrap_content"
66
+                    android:text="通过率高"
67
+                    android:textColor="#FB4F4F"
68
+                    android:textSize="9px"
69
+                    android:layout_marginLeft="9px"
70
+                    android:background="@drawable/hotback"
71
+                    android:gravity="center"
72
+                    android:paddingLeft="5px"
73
+                    android:paddingRight="5px"
74
+                    android:visibility="gone"
75
+                    />
62 76
             </LinearLayout>
63 77
             <TextView
64 78
                 android:id="@+id/hot_destory"

+ 4 - 2
factory/src/main/java/com/smileflowpig/money/factory/netword/Baseretrofit.java

@@ -189,6 +189,7 @@ public interface Baseretrofit {
189 189
     @POST("/user/product/addCollection")
190 190
     @FormUrlEncoded
191 191
     Observable<CollectBean> getcollect(@Field("product_id") String id);
192
+
192 193
     //取消收藏
193 194
     @POST("/user/product/cancelCollection")
194 195
     @FormUrlEncoded
@@ -210,6 +211,7 @@ public interface Baseretrofit {
210 211
     Observable<Object> getmemoadd(@Field("platform_id") String platid, @Field("how_to_use") String use,
211 212
                                   @Field("how_much") String much, @Field("how_long") String longer,
212 213
                                   @Field("due_date") String data, @Field("gross_interest") String interest);
214
+
213 215
     //删除备忘录
214 216
     @POST("/user/huaJiangHu/delMemo")
215 217
     @FormUrlEncoded
@@ -277,7 +279,7 @@ public interface Baseretrofit {
277 279
     //完善身份证信息
278 280
     @POST("/user/v2/huaUser/userUpdate")
279 281
     @FormUrlEncoded
280
-    Observable<Object> getalltext(@Field("idcard_no") String idcard,@Field("real_name") String name);
282
+    Observable<Object> getalltext(@Field("idcard_no") String idcard, @Field("real_name") String name);
281 283
 
282 284
     //完善支付宝
283 285
     @POST("/user/v2/huaUser/userUpdate")
@@ -295,7 +297,7 @@ public interface Baseretrofit {
295 297
     //提现操作
296 298
     @POST("/user/v2/huaUser/doWithdrawal")
297 299
     @FormUrlEncoded
298
-    Observable<Object> getmoney(@Field("real_name") String name,@Field("alipay_id") String phone,@Field("money") String money);
300
+    Observable<Object> getmoney(@Field("real_name") String name, @Field("alipay_id") String phone, @Field("money") String money);
299 301
 
300 302
     //提现记录
301 303
     @POST("/user/v2/huaUser/withdrawalList")

+ 1 - 1
factory/src/main/java/com/smileflowpig/money/factory/netword/NetRequestUtils2.java

@@ -66,7 +66,7 @@ public class NetRequestUtils2 {
66 66
 
67 67
         //http://ads.726p.com/api/    //线上
68 68
         //http://182.92.118.1:8070/api/           //测试
69
-                Retrofit.Builder retrofit = new Retrofit.Builder().baseUrl("http://182.92.118.1:8070/api/").client(okHttpClient.build());
69
+                Retrofit.Builder retrofit = new Retrofit.Builder().baseUrl("http://ads.726p.com/api/").client(okHttpClient.build());
70 70
         retrofit.addConverterFactory(GsonConverterFactory.create()).addCallAdapterFactory(RxJava2CallAdapterFactory.create());
71 71
 
72 72
 //        Baseretrofit baseretrofit =