Quellcode durchsuchen

2024-2-22 代码备份
我的佣金页面及子页面基本开发完成,接口调试完成

zhangbing vor 2 Jahren
Ursprung
Commit
17bf74687a
30 geänderte Dateien mit 1639 neuen und 124 gelöschten Zeilen
  1. 11 2
      app/src/main/AndroidManifest.xml
  2. 10 0
      app/src/main/java/com/yihucha/hbyhc/callback/OnRvItemClickListener.kt
  3. 3 1
      app/src/main/java/com/yihucha/hbyhc/config/Constants.java
  4. 10 0
      app/src/main/java/com/yihucha/hbyhc/network/service/UserService.java
  5. 7 2
      app/src/main/java/com/yihucha/hbyhc/presentation/annuity/adapter/ItemAnnuitySelectorAdapter.kt
  6. 12 1
      app/src/main/java/com/yihucha/hbyhc/presentation/invitation/model/WithdrawalBean.java
  7. 71 34
      app/src/main/java/com/yihucha/hbyhc/presentation/invitation/view_model/InviteViewModel.java
  8. 201 0
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/CommissionDetailActivity.kt
  9. 42 31
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/MyCommissionActivity.kt
  10. 4 0
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/MyTeamActivity.kt
  11. 7 2
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/TiXianRecordActivity.kt
  12. 89 0
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/TixianDetailActivity.kt
  13. 130 0
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/adapter/CommissionDetailAdapter.java
  14. 13 1
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/adapter/TixianRecordAdapter.java
  15. 182 0
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/model/BankInfoBean.java
  16. 170 0
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/model/CommissionBean.java
  17. 3 3
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/view_model/MineSpreadInfo.java
  18. 2 1
      app/src/main/java/com/yihucha/hbyhc/presentation/order/SubmitOrderActivity.java
  19. 15 1
      app/src/main/java/com/yihucha/hbyhc/utils/StringUtils.kt
  20. 88 42
      app/src/main/java/com/yihucha/hbyhc/utils/StringsUtil.java
  21. 2 2
      app/src/main/java/com/yihucha/hbyhc/view/PopAnnuitySelector.java
  22. 108 0
      app/src/main/java/com/yihucha/hbyhc/view/PopCommissionSelector.java
  23. 96 0
      app/src/main/res/layout/activity_commission_detail.xml
  24. 1 1
      app/src/main/res/layout/activity_my_commission.xml
  25. 238 0
      app/src/main/res/layout/activity_tixian_detail.xml
  26. 59 0
      app/src/main/res/layout/item_commission_detail.xml
  27. 1 0
      app/src/main/res/layout/item_tixian_records.xml
  28. 63 0
      app/src/main/res/layout/popwindow_commission_selector.xml
  29. BIN
      app/src/main/res/mipmap-xxxhdpi/icon_withdraw.png
  30. 1 0
      app/src/main/res/values/colors.xml

+ 11 - 2
app/src/main/AndroidManifest.xml

@@ -78,9 +78,18 @@
78 78
         tools:replace="android:theme"
79 79
         tools:targetApi="31">
80 80
         <activity
81
+            android:name=".presentation.mine.TixianDetailActivity"
82
+            android:exported="false"
83
+            android:label="详情"
84
+            />
85
+        <activity
86
+            android:name=".presentation.mine.CommissionDetailActivity"
87
+            android:exported="false"
88
+            android:label="收益详情" />
89
+        <activity
81 90
             android:name=".presentation.mine.FansDetailActivity"
82
-            android:label="粉丝详情"
83
-            android:exported="false" />
91
+            android:exported="false"
92
+            android:label="粉丝详情" />
84 93
         <activity
85 94
             android:name=".presentation.mine.MyTeamActivity"
86 95
             android:exported="false"

+ 10 - 0
app/src/main/java/com/yihucha/hbyhc/callback/OnRvItemClickListener.kt

@@ -0,0 +1,10 @@
1
+package com.yihucha.hbyhc.callback
2
+
3
+/**
4
+ *  author : zhangbing
5
+ *  time   : 2024/2/22 14:25
6
+ *  com.yihucha.hbyhc.callback
7
+ */
8
+interface OnRvItemClickListener {
9
+    fun onItemClick(position:Int)
10
+}

+ 3 - 1
app/src/main/java/com/yihucha/hbyhc/config/Constants.java

@@ -98,6 +98,8 @@ public class Constants {
98 98
      * 协议链接
99 99
      */
100 100
     public static final String PROTOCOL = "http://vod.bjtdba.com/agreement/";
101
+    //佣金规则
102
+    public static final String PROTOCOL_YHC_YONGJIN = "https://app.bjtdba.com/api/agreement?type=3";
101 103
     /**
102 104
      *
103 105
      */
@@ -107,7 +109,7 @@ public class Constants {
107 109
      */
108 110
     public static final String PRIVACY_AGREEMENT = "1";//隐私政策
109 111
     public static final String SERVICE_AGREEMENT = "2";//服务协议
110
-    public static final String MERCHANT_SETTLEMENT_AGREEMENT = "3";//商家入驻协议
112
+    public static final String SHANGHU_PINGTAI = "3";//商户平台协议
111 113
     public static final String AGENCY_APPLICATION_AGREEMENT = "4";//代理申请协议
112 114
     public static final String JINGDONG_REFUND_RULES = "5";//京东返金规则
113 115
     public static final String WITHDRAWAL_RULES = "6";//提现规则

+ 10 - 0
app/src/main/java/com/yihucha/hbyhc/network/service/UserService.java

@@ -35,6 +35,7 @@ import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalServiceBean;
35 35
 import com.yihucha.hbyhc.presentation.mine.model.AddressListBean;
36 36
 import com.yihucha.hbyhc.presentation.mine.model.BangfuBean;
37 37
 import com.yihucha.hbyhc.presentation.mine.model.BindingStateBean;
38
+import com.yihucha.hbyhc.presentation.mine.model.CommissionBean;
38 39
 import com.yihucha.hbyhc.presentation.mine.model.FansDetailBean;
39 40
 import com.yihucha.hbyhc.presentation.mine.model.JiangjinBean;
40 41
 import com.yihucha.hbyhc.presentation.mine.model.MyEvaluateBean;
@@ -372,6 +373,15 @@ public interface UserService {
372 373
     Observable<DataJavaResponse<AccumulatedincomeBean>> getUserInviteProfitList(@QueryMap Map<String, Object> request);
373 374
 
374 375
     /**
376
+     * 收益详情页
377
+     * @param request
378
+     * @return
379
+     */
380
+    @GET("api/user/user_invite_profit_list")
381
+    Observable<DataJavaResponse<CommissionBean>> getCommissionDetail(@QueryMap Map<String, Object> request);
382
+
383
+
384
+    /**
375 385
      * 佣金信息
376 386
      *
377 387
      * @param

+ 7 - 2
app/src/main/java/com/yihucha/hbyhc/presentation/annuity/adapter/ItemAnnuitySelectorAdapter.kt

@@ -21,7 +21,11 @@ import com.yihucha.hbyhc.utils.ScreenUtils
21 21
  *  time   : 2024/1/30 20:44
22 22
  *  com.yihucha.hbyhc.presentation.annuity.adapter
23 23
  */
24
-class ItemAnnuitySelectorAdapter(var context: Context, var searchDatas: List<SelectorBean>) :
24
+class ItemAnnuitySelectorAdapter(
25
+    var context: Context,
26
+    var searchDatas: List<SelectorBean>,
27
+    var collomCount: Int = 3
28
+) :
25 29
     Adapter<ItemAnnuitySelectorAdapter.IASHolder>() {
26 30
     override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): IASHolder {
27 31
         return IASHolder(
@@ -70,7 +74,8 @@ class ItemAnnuitySelectorAdapter(var context: Context, var searchDatas: List<Sel
70 74
         init {
71 75
             binding.apply {
72 76
                 var params = tvItemName.layoutParams as RelativeLayout.LayoutParams
73
-                params.width = (ScreenUtils.getScreenWidth() - DensityUtils.dip2px(58f)) / 3
77
+                params.width =
78
+                    (ScreenUtils.getScreenWidth() - DensityUtils.dip2px(58f)) / collomCount
74 79
                 tvItemName.layoutParams = params
75 80
             }
76 81
 

+ 12 - 1
app/src/main/java/com/yihucha/hbyhc/presentation/invitation/model/WithdrawalBean.java

@@ -1,11 +1,13 @@
1 1
 package com.yihucha.hbyhc.presentation.invitation.model;
2 2
 
3
+import java.io.Serializable;
4
+
3 5
 /**
4 6
  * @author qmzh
5 7
  * @date 2022/8/4
6 8
  * note:
7 9
  */
8
-public class WithdrawalBean {
10
+public class WithdrawalBean implements Serializable {
9 11
     private String extract_id;
10 12
     private String uid;
11 13
     private String real_name;//名称
@@ -17,6 +19,7 @@ public class WithdrawalBean {
17 19
     private String extract_pic;
18 20
     private String extract_price;//提现金额
19 21
     private String balance;
22
+    private String bank_info;
20 23
     private String mark;
21 24
     private String admin_id;
22 25
     private String fail_msg;
@@ -30,6 +33,14 @@ public class WithdrawalBean {
30 33
     private String service_money;//提现手续费
31 34
     private String title;//说明
32 35
 
36
+    public String getBankInfo() {
37
+        return bank_info;
38
+    }
39
+
40
+    public void setBankInfo(String bank_info) {
41
+        this.bank_info = bank_info;
42
+    }
43
+
33 44
     public String getExtract_id() {
34 45
         return extract_id == null ? "" : extract_id;
35 46
     }

+ 71 - 34
app/src/main/java/com/yihucha/hbyhc/presentation/invitation/view_model/InviteViewModel.java

@@ -32,10 +32,12 @@ import com.yihucha.hbyhc.presentation.invitation.model.UserShareProductListBean;
32 32
 import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalBean;
33 33
 import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalConfigurationBean;
34 34
 import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalServiceBean;
35
+import com.yihucha.hbyhc.presentation.mine.model.CommissionBean;
35 36
 import com.yihucha.hbyhc.presentation.mine.model.UpdateAccountBean;
36 37
 import com.yihucha.hbyhc.presentation.mine.model.UserAnnuityInfoBean;
37 38
 import com.yihucha.hbyhc.presentation.mine.model.UserInfoModel;
38 39
 import com.yihucha.hbyhc.presentation.mine.repository.UserRepository;
40
+import com.yihucha.hbyhc.utils.EmptyCheckUtils;
39 41
 import com.yihucha.hbyhc.utils.LogUtil;
40 42
 import com.yihucha.hbyhc.utils.MVUtils;
41 43
 
@@ -84,12 +86,12 @@ public class InviteViewModel extends BaseViewModel {
84 86
 
85 87
     public MutableLiveData<String> mSpreadNumberSucceed = new MutableLiveData<>();//绑定消息
86 88
 
87
-    public MutableLiveData<SpreadImageBean> mSpreadImageData=new MutableLiveData<>();//分享二维码图片
88
-
89
-    public MutableLiveData<List<SharePostersClassifyList>> mSharePostersClassifyListData=new MutableLiveData<>();//邀请好友分类
90
-    public MutableLiveData<List<InviteFriendsPicBean.PageInfo.PicList>> mPicListData=new MutableLiveData<>();//每条分类列表图片
91
-    public MutableLiveData<String> mShareImgsData=new MutableLiveData<>();//生成的图片
89
+    public MutableLiveData<SpreadImageBean> mSpreadImageData = new MutableLiveData<>();//分享二维码图片
92 90
 
91
+    public MutableLiveData<List<SharePostersClassifyList>> mSharePostersClassifyListData = new MutableLiveData<>();//邀请好友分类
92
+    public MutableLiveData<List<InviteFriendsPicBean.PageInfo.PicList>> mPicListData = new MutableLiveData<>();//每条分类列表图片
93
+    public MutableLiveData<String> mShareImgsData = new MutableLiveData<>();//生成的图片
94
+    public MutableLiveData<CommissionBean> commissionDetail = new MutableLiveData<>();//收益详情
93 95
 
94 96
 
95 97
 //    /**
@@ -137,7 +139,7 @@ public class InviteViewModel extends BaseViewModel {
137 139
 
138 140
             @Override
139 141
             public void onFailure(Throwable e) {
140
-               // failed.postValue(getString(R.string.failed_string));
142
+                // failed.postValue(getString(R.string.failed_string));
141 143
             }
142 144
         }));
143 145
     }
@@ -160,7 +162,7 @@ public class InviteViewModel extends BaseViewModel {
160 162
 
161 163
             @Override
162 164
             public void onFailure(Throwable e) {
163
-              //  failed.postValue(getString(R.string.failed_string));
165
+                //  failed.postValue(getString(R.string.failed_string));
164 166
             }
165 167
         }));
166 168
     }
@@ -174,7 +176,7 @@ public class InviteViewModel extends BaseViewModel {
174 176
         map.put("uid", MVUtils.getString(Constants.USER_ID));
175 177
         map.put("pageSize", pageSize);
176 178
         map.put("pageNum", page);
177
-        if (!TextUtils.isEmpty(nickname)){
179
+        if (!TextUtils.isEmpty(nickname)) {
178 180
             map.put("nickname", nickname);
179 181
         }
180 182
         UserService userService = NetworkApi.createService(UserService.class);
@@ -190,8 +192,8 @@ public class InviteViewModel extends BaseViewModel {
190 192
 
191 193
             @Override
192 194
             public void onFailure(Throwable e) {
193
-                LogUtil.LogInfo("Throwable",e.getMessage());
194
-            //    failed.postValue(getString(R.string.failed_string));
195
+                LogUtil.LogInfo("Throwable", e.getMessage());
196
+                //    failed.postValue(getString(R.string.failed_string));
195 197
                 failed.postValue(e.getMessage());
196 198
             }
197 199
         }));
@@ -211,7 +213,7 @@ public class InviteViewModel extends BaseViewModel {
211 213
             @Override
212 214
             public void onSuccess(DataResponse dataResponse) {
213 215
                 if (dataResponse.responseCode == 200) {
214
-                   mSpreadNumberSucceed.postValue(dataResponse.responseError);
216
+                    mSpreadNumberSucceed.postValue(dataResponse.responseError);
215 217
                 } else {
216 218
                     ToastUtils.showLong(dataResponse.responseError);
217 219
                 }
@@ -219,7 +221,7 @@ public class InviteViewModel extends BaseViewModel {
219 221
 
220 222
             @Override
221 223
             public void onFailure(Throwable e) {
222
-              //  failed.postValue(getString(R.string.failed_string));
224
+                //  failed.postValue(getString(R.string.failed_string));
223 225
             }
224 226
         }));
225 227
     }
@@ -243,7 +245,7 @@ public class InviteViewModel extends BaseViewModel {
243 245
 
244 246
             @Override
245 247
             public void onFailure(Throwable e) {
246
-              //  failed.postValue(getString(R.string.failed_string));
248
+                //  failed.postValue(getString(R.string.failed_string));
247 249
             }
248 250
         }));
249 251
     }
@@ -294,11 +296,45 @@ public class InviteViewModel extends BaseViewModel {
294 296
             @Override
295 297
             public void onFailure(Throwable e) {
296 298
                 LogUtil.LogInfo("Throwable", e.getMessage());
297
-              //  failed.postValue(getString(R.string.failed_string));
299
+                //  failed.postValue(getString(R.string.failed_string));
298 300
             }
299 301
         }));
300 302
     }
301 303
 
304
+    /**
305
+     * 收益详情
306
+     */
307
+    @SuppressLint("CheckResult")
308
+    public void getCommissionDetail(String uid, String month, String commissionType) {
309
+        Map<String, Object> map = new HashMap<>();
310
+        map.put("uid", uid);
311
+        map.put("limit", 1000);
312
+        if (EmptyCheckUtils.isNotEmpty(month)) {
313
+            map.put("month", month);
314
+        }
315
+        if (EmptyCheckUtils.isNotEmpty(commissionType)) {
316
+            map.put("commission_type", commissionType);
317
+        }
318
+
319
+        NetworkApi.createService(UserService.class)
320
+                .getCommissionDetail(map)
321
+                .compose(NetworkApi.applySchedulers(new BaseObserver<DataJavaResponse<CommissionBean>>() {
322
+                    @Override
323
+                    public void onSuccess(DataJavaResponse<CommissionBean> response) {
324
+                        if (response.responseCode == 200) {
325
+                            commissionDetail.postValue(response.getData());
326
+                        } else {
327
+                            failed.postValue(response.responseError);
328
+                        }
329
+                    }
330
+
331
+                    @Override
332
+                    public void onFailure(Throwable e) {
333
+                        failed.postValue("");
334
+                    }
335
+                }));
336
+    }
337
+
302 338
     //提现佣金信息
303 339
     @SuppressLint("CheckResult")
304 340
     public void getSpreadInfo() {
@@ -315,7 +351,7 @@ public class InviteViewModel extends BaseViewModel {
315 351
 
316 352
             @Override
317 353
             public void onFailure(Throwable e) {
318
-             //   failed.postValue(getString(R.string.failed_string));
354
+                //   failed.postValue(getString(R.string.failed_string));
319 355
             }
320 356
         }));
321 357
     }
@@ -338,7 +374,7 @@ public class InviteViewModel extends BaseViewModel {
338 374
 
339 375
             @Override
340 376
             public void onFailure(Throwable e) {
341
-            //    failed.postValue(getString(R.string.failed_string));
377
+                //    failed.postValue(getString(R.string.failed_string));
342 378
             }
343 379
         }));
344 380
     }
@@ -353,9 +389,9 @@ public class InviteViewModel extends BaseViewModel {
353 389
             @Override
354 390
             public void onSuccess(DataResponse dataResponse) {
355 391
 //                if (dataResponse.responseCode ==200){
356
-                    if (TextUtils.isEmpty(flag)) {
357
-                        mBandAccountInfoSucceed.postValue(dataResponse.responseCode + "");
358
-                    }
392
+                if (TextUtils.isEmpty(flag)) {
393
+                    mBandAccountInfoSucceed.postValue(dataResponse.responseCode + "");
394
+                }
359 395
 //                    else {
360 396
 //                        ToastUtils.showLong(dataResponse.responseError);
361 397
 //                    }
@@ -367,7 +403,7 @@ public class InviteViewModel extends BaseViewModel {
367 403
 
368 404
             @Override
369 405
             public void onFailure(Throwable e) {
370
-              //  failed.postValue(getString(R.string.failed_string));
406
+                //  failed.postValue(getString(R.string.failed_string));
371 407
             }
372 408
         }));
373 409
     }
@@ -421,7 +457,7 @@ public class InviteViewModel extends BaseViewModel {
421 457
 
422 458
             @Override
423 459
             public void onFailure(Throwable e) {
424
-             //   failed.postValue(getString(R.string.failed_string));
460
+                //   failed.postValue(getString(R.string.failed_string));
425 461
             }
426 462
         }));
427 463
     }
@@ -433,12 +469,12 @@ public class InviteViewModel extends BaseViewModel {
433 469
      * @param extract_type
434 470
      */
435 471
     @SuppressLint("CheckResult")
436
-    public void getApplicationWithdrawal(String extract_price, String extract_type,boolean isRed) {
472
+    public void getApplicationWithdrawal(String extract_price, String extract_type, boolean isRed) {
437 473
         Map<String, Object> map = new HashMap<>();
438 474
         map.put("extract_price", extract_price);
439 475
         map.put("extract_type", extract_type);
440 476
         if (isRed)
441
-            map.put("type",2);
477
+            map.put("type", 2);
442 478
         UserService userService = NetworkApi.createService(UserService.class);
443 479
         userService.getApplicationWithdrawal(map).compose(NetworkApi.applySchedulers(new BaseObserver<DataResponse>() {
444 480
             @Override
@@ -452,7 +488,7 @@ public class InviteViewModel extends BaseViewModel {
452 488
 
453 489
             @Override
454 490
             public void onFailure(Throwable e) {
455
-             //   failed.postValue(getString(R.string.failed_string));
491
+                //   failed.postValue(getString(R.string.failed_string));
456 492
             }
457 493
         }));
458 494
     }
@@ -510,7 +546,7 @@ public class InviteViewModel extends BaseViewModel {
510 546
 
511 547
             @Override
512 548
             public void onFailure(Throwable e) {
513
-              //  failed.postValue(getString(R.string.failed_string));
549
+                //  failed.postValue(getString(R.string.failed_string));
514 550
             }
515 551
         }));
516 552
     }
@@ -541,9 +577,9 @@ public class InviteViewModel extends BaseViewModel {
541 577
         userService.getSpreadImage().compose(NetworkApi.applySchedulers(new BaseObserver<DataResponse<List<SpreadImageBean>>>() {
542 578
             @Override
543 579
             public void onSuccess(DataResponse<List<SpreadImageBean>> listDataResponse) {
544
-                if (listDataResponse.responseCode == 200){
580
+                if (listDataResponse.responseCode == 200) {
545 581
                     mSpreadImageData.postValue(listDataResponse.getData().get(0));
546
-                }else {
582
+                } else {
547 583
                     ToastUtils.showLong(listDataResponse.responseError);
548 584
                 }
549 585
 
@@ -551,8 +587,8 @@ public class InviteViewModel extends BaseViewModel {
551 587
 
552 588
             @Override
553 589
             public void onFailure(Throwable e) {
554
-                LogUtil.LogInfo("Throwable",e.getMessage());
555
-               // failed.postValue(getString(R.string.failed_string));
590
+                LogUtil.LogInfo("Throwable", e.getMessage());
591
+                // failed.postValue(getString(R.string.failed_string));
556 592
             }
557 593
         }));
558 594
     }
@@ -566,7 +602,7 @@ public class InviteViewModel extends BaseViewModel {
566 602
         userService.getClassifyList().compose(NetworkApi.applySchedulers(new BaseObserver<DataResponse<InviteFriendsClassifyBean>>() {
567 603
             @Override
568 604
             public void onSuccess(DataResponse<InviteFriendsClassifyBean> inviteFriendsClassifyBeanDataResponse) {
569
-                if (inviteFriendsClassifyBeanDataResponse.responseCode == 200){
605
+                if (inviteFriendsClassifyBeanDataResponse.responseCode == 200) {
570 606
                     mSharePostersClassifyListData.postValue(inviteFriendsClassifyBeanDataResponse.getData().getSharePostersClassifyList());
571 607
                 }
572 608
             }
@@ -577,6 +613,7 @@ public class InviteViewModel extends BaseViewModel {
577 613
             }
578 614
         }));
579 615
     }
616
+
580 617
     /**
581 618
      * 邀请好友分类
582 619
      */
@@ -586,9 +623,9 @@ public class InviteViewModel extends BaseViewModel {
586 623
         userService.getClassifyImgesList(request).compose(NetworkApi.applySchedulers(new BaseObserver<DataResponse<InviteFriendsPicBean>>() {
587 624
             @Override
588 625
             public void onSuccess(DataResponse<InviteFriendsPicBean> inviteFriendsPicBeanDataResponse) {
589
-            if (inviteFriendsPicBeanDataResponse.responseCode == 200){
590
-                mPicListData.postValue(inviteFriendsPicBeanDataResponse.getData().getPageInfo().getList());
591
-            }
626
+                if (inviteFriendsPicBeanDataResponse.responseCode == 200) {
627
+                    mPicListData.postValue(inviteFriendsPicBeanDataResponse.getData().getPageInfo().getList());
628
+                }
592 629
             }
593 630
 
594 631
             @Override
@@ -607,7 +644,7 @@ public class InviteViewModel extends BaseViewModel {
607 644
         userService.getGenerateImages(request).compose(NetworkApi.applySchedulers(new BaseObserver<DataResponse<ShareImgsBean>>() {
608 645
             @Override
609 646
             public void onSuccess(DataResponse<ShareImgsBean> shareImgsBeanDataResponse) {
610
-                if (shareImgsBeanDataResponse.responseCode==200){
647
+                if (shareImgsBeanDataResponse.responseCode == 200) {
611 648
                     mShareImgsData.postValue(shareImgsBeanDataResponse.getData().getShareImgs());
612 649
                 }
613 650
             }

+ 201 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/mine/CommissionDetailActivity.kt

@@ -0,0 +1,201 @@
1
+package com.yihucha.hbyhc.presentation.mine
2
+
3
+import android.annotation.SuppressLint
4
+import android.app.Activity
5
+import android.app.Dialog
6
+import android.content.Intent
7
+import android.graphics.Color
8
+import android.os.Bundle
9
+import android.util.Log
10
+import android.view.Gravity
11
+import android.view.View
12
+import android.view.ViewGroup
13
+import android.widget.FrameLayout
14
+import androidx.lifecycle.ViewModelProvider
15
+import com.bigkoo.pickerview.R
16
+import com.bigkoo.pickerview.builder.TimePickerBuilder
17
+import com.bigkoo.pickerview.view.TimePickerView
18
+import com.yihucha.hbyhc.base.ViewBindingTitleBaseActivity
19
+import com.yihucha.hbyhc.config.Constants
20
+import com.yihucha.hbyhc.databinding.ActivityCommissionDetailBinding
21
+import com.yihucha.hbyhc.presentation.invitation.view_model.InviteViewModel
22
+import com.yihucha.hbyhc.presentation.mine.adapter.CommissionDetailAdapter
23
+import com.yihucha.hbyhc.presentation.mine.model.CommissionBean
24
+import com.yihucha.hbyhc.utils.DateUtil
25
+import com.yihucha.hbyhc.utils.EmptyCheckUtils
26
+import com.yihucha.hbyhc.utils.MVUtils
27
+import com.yihucha.hbyhc.utils.StringUtils
28
+import com.yihucha.hbyhc.view.PopAnnuitySelector
29
+import com.yihucha.hbyhc.view.PopCommissionSelector
30
+import java.util.*
31
+
32
+/**
33
+ *  Author by 86175
34
+ *  Time is 2024/2/22 9:37
35
+ *  收益详情
36
+ */
37
+class CommissionDetailActivity : ViewBindingTitleBaseActivity<ActivityCommissionDetailBinding>() {
38
+    private var month = ""
39
+    private var dateTime = ""
40
+    private var commissionType = ""
41
+    private lateinit var popWindow: PopCommissionSelector
42
+    private lateinit var pvTime: TimePickerView
43
+    private val mInviteViewModel by lazy {
44
+        ViewModelProvider(this)[InviteViewModel::class.java]
45
+    }
46
+    private var data = mutableListOf<CommissionBean.PageInfoDTO.DataDTO>()
47
+    private lateinit var adapter: CommissionDetailAdapter
48
+    override fun onCreate(savedInstanceState: Bundle?) {
49
+        super.onCreate(savedInstanceState)
50
+        initView()
51
+        initData()
52
+        initListener()
53
+    }
54
+
55
+    private fun initView() {
56
+        adapter = CommissionDetailAdapter(this, data)
57
+        mViewBinding.lvCommission.adapter = adapter
58
+    }
59
+
60
+    @SuppressLint("SetTextI18n")
61
+    private fun initData() {
62
+        var calendar = Calendar.getInstance()
63
+        month =
64
+            "${calendar.get(Calendar.YEAR)}-${StringUtils.formatNumber(calendar.get(Calendar.MONTH) + 1)}"
65
+        dateTime =
66
+            "${calendar.get(Calendar.YEAR)}年${StringUtils.formatNumber(calendar.get(Calendar.MONTH) + 1)}月"
67
+        mViewBinding.tvDate.text = dateTime
68
+        loadCommissionDetail()
69
+        mInviteViewModel.commissionDetail.observe(this) {
70
+            it?.apply {
71
+                data.clear()
72
+                data.addAll(it.pageInfo.data)
73
+                if (EmptyCheckUtils.isNotEmpty(data)) {
74
+                    adapter.setDatas(data)
75
+                    mViewBinding.lvCommission.visibility = View.VISIBLE
76
+                    mViewBinding.layoutNoData.llNotFound.visibility = View.GONE
77
+                } else {
78
+                    mViewBinding.lvCommission.visibility = View.GONE
79
+                    mViewBinding.layoutNoData.llNotFound.visibility = View.VISIBLE
80
+                }
81
+                mViewBinding.tvMoney.text = "¥" + it.totelMoney
82
+            }
83
+
84
+        }
85
+        mInviteViewModel.failed.observe(this) {
86
+            mViewBinding.lvCommission.visibility = View.GONE
87
+            mViewBinding.layoutNoData.llNotFound.visibility = View.VISIBLE
88
+        }
89
+    }
90
+
91
+    private fun initListener() {
92
+        mViewBinding.tvSelector.setOnClickListener(this)
93
+        mViewBinding.tvDate.setOnClickListener(this)
94
+        initSelector()
95
+        initTimePicker()
96
+    }
97
+
98
+    private fun loadCommissionDetail() {
99
+        mInviteViewModel.getCommissionDetail(
100
+            MVUtils.getString(
101
+                Constants.USER_ID
102
+            ),
103
+            month,
104
+            commissionType
105
+        )
106
+    }
107
+
108
+    override fun onClick(v: View) {
109
+        when (v) {
110
+            mViewBinding.tvSelector -> {
111
+                //条件筛选
112
+                popWindow.showAsDropDown(mViewBinding.topLayout)
113
+                mViewBinding.viewBg.visibility = View.VISIBLE
114
+            }
115
+            mViewBinding.tvDate -> {
116
+                //日期筛选
117
+                pvTime.apply {
118
+                    if (!isShowing) {
119
+                        show()
120
+                    }
121
+                }
122
+            }
123
+            else -> {
124
+                super.onClick(v)
125
+            }
126
+        }
127
+
128
+    }
129
+
130
+
131
+    /**
132
+     * 条件选择器
133
+     */
134
+    private fun initSelector() {
135
+        popWindow = PopCommissionSelector(this)
136
+        popWindow.setOnDismissListener {
137
+            mViewBinding.viewBg.visibility = View.GONE
138
+        }
139
+        popWindow.setOnSelectListener { type ->
140
+            run {
141
+                commissionType = type
142
+                loadCommissionDetail()
143
+            }
144
+        }
145
+    }
146
+
147
+    /**
148
+     * 时间选择器
149
+     */
150
+    private fun initTimePicker() { //Dialog 模式下,在底部弹出
151
+        val startDate = Calendar.getInstance()
152
+        startDate[1900, 1] = 1
153
+        val endDate = Calendar.getInstance()
154
+        endDate[DateUtil.getYear().toInt(), DateUtil.getMonth().toInt() - 1] =
155
+            DateUtil.getDay().toInt()
156
+        pvTime = TimePickerBuilder(this) { date, _ ->
157
+            Log.i("pvTime", "onTimeSelect")
158
+            dateTime = DateUtil.getYearMonth(date.time)
159
+            mViewBinding.tvDate.text = dateTime
160
+            month = dateTime.replace("年", "-").replace("月", "")
161
+            loadCommissionDetail()
162
+        }
163
+            .setTimeSelectChangeListener { Log.i("pvTime", "onTimeSelectChanged") }
164
+            .setType(booleanArrayOf(true, true, false, false, false, false))
165
+            .isDialog(true) //默认设置false ,内部实现将DecorView 作为它的父控件。
166
+            .addOnCancelClickListener { Log.i("pvTime", "onCancelClickListener") }
167
+            .setItemVisibleCount(9) //若设置偶数,实际值会加1(比如设置6,则最大可见条目为7)
168
+            .setLineSpacingMultiplier(2.0f)
169
+            .isAlphaGradient(true)
170
+            .setSubmitText("确定")
171
+            .setCancelText("取消")
172
+            .setSubmitColor(Color.parseColor("#fe0032")) //确定按钮文字颜色
173
+            .setCancelColor(Color.parseColor("#333333")) //取消按钮文字颜色
174
+            .setContentTextSize(15)
175
+            .setDate(endDate)
176
+            .setRangDate(startDate, endDate) //起始终止年月日设定
177
+            .setTitleBgColor(Color.parseColor("#FFFFFF")) //标题背景颜色 Night mode
178
+            .build()
179
+        val mDialog: Dialog = pvTime.dialog
180
+        val params = FrameLayout.LayoutParams(
181
+            ViewGroup.LayoutParams.MATCH_PARENT,
182
+            ViewGroup.LayoutParams.WRAP_CONTENT,
183
+            Gravity.BOTTOM
184
+        )
185
+        params.leftMargin = 0
186
+        params.rightMargin = 0
187
+        pvTime.dialogContainerLayout.layoutParams = params
188
+        mDialog.window?.apply {
189
+            setWindowAnimations(R.style.picker_view_slide_anim) //修改动画样式
190
+            setGravity(Gravity.BOTTOM) //改成Bottom,底部显示
191
+            setDimAmount(0.3f)
192
+        }
193
+    }
194
+
195
+    companion object {
196
+        @JvmStatic
197
+        fun launch(activity: Activity) {
198
+            activity.startActivity(Intent(activity, CommissionDetailActivity::class.java))
199
+        }
200
+    }
201
+}

+ 42 - 31
app/src/main/java/com/yihucha/hbyhc/presentation/mine/MyCommissionActivity.kt

@@ -5,16 +5,17 @@ import android.content.Intent
5 5
 import android.os.Bundle
6 6
 import android.view.View
7 7
 import androidx.lifecycle.ViewModelProvider
8
-import com.blankj.utilcode.util.ToastUtils
9 8
 import com.bumptech.glide.Glide
10
-import com.yihucha.hbyhc.base.ViewBindingChangeTitleColorTitleBaseActivity
11 9
 import com.yihucha.hbyhc.base.ViewBindingTitleBaseActivity
10
+import com.yihucha.hbyhc.base.WebViewTitleBaseActivity
11
+import com.yihucha.hbyhc.config.Constants
12 12
 import com.yihucha.hbyhc.databinding.ActivityMyCommissionBinding
13
-import com.yihucha.hbyhc.presentation.invitation.AccumulatedincomeActivity
13
+import com.yihucha.hbyhc.presentation.annuity.RealNameAuthenticationActivity
14
+import com.yihucha.hbyhc.presentation.invitation.ImmediateWithdrawalActivity
15
+import com.yihucha.hbyhc.presentation.invitation.InviteFriendsActivity
14 16
 import com.yihucha.hbyhc.presentation.invitation.view_model.InviteViewModel
15 17
 import com.yihucha.hbyhc.presentation.mine.view_model.MineViewModel
16 18
 import com.yihucha.hbyhc.utils.StringsUtil
17
-import org.jsoup.helper.StringUtil
18 19
 
19 20
 /**
20 21
  *  Author by zhangbing
@@ -23,6 +24,7 @@ import org.jsoup.helper.StringUtil
23 24
  */
24 25
 class MyCommissionActivity :
25 26
     ViewBindingTitleBaseActivity<ActivityMyCommissionBinding>(){
27
+    private var isCertification = "0" //是否实名人证  1表示实名认证
26 28
     private val mInviteViewModel by lazy {
27 29
         ViewModelProvider(this)[InviteViewModel::class.java]
28 30
     }
@@ -42,46 +44,39 @@ class MyCommissionActivity :
42 44
     }
43 45
 
44 46
     private fun initData() {
45
-        mInviteViewModel.selectUserInviteProfit()
46
-        mInviteViewModel.mInviteJavaData.observe(this) {
47
-            //未结算收益
48
-            mViewBinding.tvIncomeWjsValue.text = StringsUtil.getNumber(
49
-                it.userUnsettledInviteProfit
50
-            )
51
-        }
47
+        /* TODO 不确定该接口是否还有用
52 48
         mInviteViewModel.getAgentInfo()
53
-        mInviteViewModel.mInvitePHPBean.observe(this) { invitePHPBean ->
54
-            //当前
55
-            mViewBinding.tvIncomeYueValue.text =
56
-                StringsUtil.getNumber(invitePHPBean.brokerage_price)
57
-            //已提现
58
-            var extract = invitePHPBean.extract
59
-            if (StringUtil.isBlank(extract) || "0" == extract) {
60
-                extract = "0.00"
61
-            }
62
-            mViewBinding.tvIncomeYtxValue.text = "+" + StringsUtil.getNumber(extract)
49
+        mInviteViewModel.mInvitePHPBean.observe(this) {
63 50
 
64
-            //累计收益
65
-            mViewBinding.tvIncomeTotalValue.text = StringsUtil.getNumber(invitePHPBean.cumulative)
66 51
         }
52
+        mInviteViewModel.failed.observe(this) {
53
+            ToastUtils.showLong(it)
54
+        }
55
+        */
56
+        mInviteViewModel.getYanglaojinInfo()
57
+        mInviteViewModel.userAnnuityInfoBeanMutableLiveData.observe(
58
+            this
59
+        ) { userAnnuityInfoBean -> isCertification = userAnnuityInfoBean.is_certification }
67 60
 
68
-
69
-        //用户信息
70
-        mMineViewModel.getUserInfo()
71
-        mMineViewModel.userModel.observe(this) {
61
+        mMineViewModel.getSpreadInfoYhc()
62
+        mMineViewModel.spreadInfo.observe(this){
63
+            mViewBinding.tvIncomeTotalValue.text = StringsUtil.getNumber(it.totalBalance)
64
+            mViewBinding.tvIncomeYtxValue.text = StringsUtil.getNumber(it.withdrawnBalance)
65
+            mViewBinding.tvIncomeWjsValue.text = StringsUtil.getNumber(it.unsettledBalance)
66
+            mViewBinding.tvIncomeYueValue.text = StringsUtil.getNumber(it.currentBalance)
72 67
             Glide.with(this).load(it.avatar).into(mViewBinding.imgvHeadCommission)
73 68
             mViewBinding.tvNicknameCommission.text = it.nickname
74 69
         }
75 70
 
76
-        mInviteViewModel.failed.observe(this) {
77
-            ToastUtils.showLong(it)
78
-        }
71
+
79 72
     }
80 73
 
81 74
     private fun initListener() {
82 75
         mViewBinding.llInvitePartners.setOnClickListener(this)
83 76
         mViewBinding.llTixianRecords.setOnClickListener(this)
84 77
         mViewBinding.tvRules.setOnClickListener(this)
78
+        mViewBinding.tvInvitateFriends.setOnClickListener(this)
79
+        mViewBinding.tvGoTixian.setOnClickListener(this)
85 80
     }
86 81
 
87 82
 
@@ -90,7 +85,7 @@ class MyCommissionActivity :
90 85
         when (v) {
91 86
             mViewBinding.llInvitePartners -> {
92 87
                 //收益详情
93
-                AccumulatedincomeActivity.launch(this)
88
+                CommissionDetailActivity.launch(this)
94 89
             }
95 90
             mViewBinding.llTixianRecords -> {
96 91
                 //提现记录
@@ -98,6 +93,22 @@ class MyCommissionActivity :
98 93
             }
99 94
             mViewBinding.tvRules -> {
100 95
                 //规则
96
+                WebViewTitleBaseActivity.launch(this,"佣金规则",
97
+                    Constants.PROTOCOL_YHC_YONGJIN)
98
+            }
99
+            mViewBinding.tvInvitateFriends ->{
100
+                //邀请好友
101
+                InviteFriendsActivity.launch(this)
102
+            }
103
+            mViewBinding.tvGoTixian ->{
104
+                //去提现
105
+                if ("1" != isCertification) {
106
+                    //未实名认证
107
+                    RealNameAuthenticationActivity.launch(context)
108
+                } else {
109
+                    //已经实名
110
+                    ImmediateWithdrawalActivity.launch(context)
111
+                }
101 112
             }
102 113
         }
103 114
     }

+ 4 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/mine/MyTeamActivity.kt

@@ -11,6 +11,7 @@ import com.lcodecore.tkrefreshlayout.RefreshListenerAdapter
11 11
 import com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout
12 12
 import com.yihucha.hbyhc.base.ViewBindingTitleBaseActivity
13 13
 import com.yihucha.hbyhc.databinding.ActivityMyTeamBinding
14
+import com.yihucha.hbyhc.presentation.invitation.InviteFriendsActivity
14 15
 import com.yihucha.hbyhc.presentation.mine.adapter.TeamListAdapter
15 16
 import com.yihucha.hbyhc.presentation.mine.model.TeamBean
16 17
 import com.yihucha.hbyhc.presentation.mine.model.TeamViewModel
@@ -90,6 +91,9 @@ class MyTeamActivity : ViewBindingTitleBaseActivity<ActivityMyTeamBinding>() {
90 91
                 teamViewModel.requestTeamList(page)
91 92
             }
92 93
         })
94
+        mViewBinding.llTeamInvitate.setOnClickListener{
95
+            InviteFriendsActivity.launch(this)
96
+        }
93 97
     }
94 98
 
95 99
     companion object {

+ 7 - 2
app/src/main/java/com/yihucha/hbyhc/presentation/mine/TiXianRecordActivity.kt

@@ -2,11 +2,10 @@ package com.yihucha.hbyhc.presentation.mine
2 2
 
3 3
 import android.app.Activity
4 4
 import android.content.Intent
5
-import androidx.appcompat.app.AppCompatActivity
6 5
 import android.os.Bundle
7 6
 import androidx.lifecycle.ViewModelProvider
8
-import com.yihucha.hbyhc.base.ViewBindingChangeTitleColorTitleBaseActivity
9 7
 import com.yihucha.hbyhc.base.ViewBindingTitleBaseActivity
8
+import com.yihucha.hbyhc.callback.OnRvItemClickListener
10 9
 import com.yihucha.hbyhc.databinding.ActivityTiXianRecordBinding
11 10
 import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalBean
12 11
 import com.yihucha.hbyhc.presentation.invitation.view_model.InviteViewModel
@@ -38,6 +37,12 @@ class TiXianRecordActivity :
38 37
     private fun initView() {
39 38
         adapter = TixianRecordAdapter(this, datas);
40 39
         mViewBinding.rvTixianRecords.adapter = adapter
40
+        adapter.setOnItemClickListener(object : OnRvItemClickListener{
41
+            override fun onItemClick(position: Int) {
42
+                TixianDetailActivity.launch(this@TiXianRecordActivity, datas[position])
43
+            }
44
+
45
+        })
41 46
     }
42 47
 
43 48
     companion object {

+ 89 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/mine/TixianDetailActivity.kt

@@ -0,0 +1,89 @@
1
+package com.yihucha.hbyhc.presentation.mine
2
+
3
+import android.app.Activity
4
+import android.content.Intent
5
+import android.os.Bundle
6
+import android.view.View
7
+import androidx.core.content.ContextCompat
8
+import com.google.gson.Gson
9
+import com.yihucha.hbyhc.R
10
+import com.yihucha.hbyhc.base.ViewBindingTitleBaseActivity
11
+import com.yihucha.hbyhc.databinding.ActivityTixianDetailBinding
12
+import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalBean
13
+import com.yihucha.hbyhc.presentation.mine.model.BankInfoBean
14
+import com.yihucha.hbyhc.utils.StringsUtil
15
+
16
+class TixianDetailActivity : ViewBindingTitleBaseActivity<ActivityTixianDetailBinding>() {
17
+    private var data: WithdrawalBean? = null
18
+    override fun onCreate(savedInstanceState: Bundle?) {
19
+        super.onCreate(savedInstanceState)
20
+        initData()
21
+    }
22
+
23
+    private fun initData() {
24
+        data = intent.getSerializableExtra("data") as WithdrawalBean
25
+        data?.apply {
26
+            mViewBinding.apply {
27
+                tvTimeValue.text = create_time
28
+                tvPaytimeValue.text = status_time
29
+                tvTitle.text = title
30
+                tvMoney.text = extract_price
31
+                if (title.contains("银行卡")) {
32
+                    val gsonStr = bankInfo.replace("\\", "").toString()
33
+                    println(gsonStr)
34
+                    var gson = Gson()
35
+                    val bankInfo = gson.fromJson(gsonStr, BankInfoBean::class.java)
36
+                    layoutBankInfo.visibility = View.VISIBLE
37
+                    tvBankTitle.text = bankInfo.bankName
38
+                    tvBankValue.text = StringsUtil.formatBankCard(bankInfo.account)
39
+                    tvUserTitle.text = bankInfo.userName
40
+                    tvUserValue.text = StringsUtil.encodeIdCard2(bankInfo.userCard)
41
+                }
42
+                when (status) {
43
+                    "-1" -> {
44
+                        //提现失败
45
+                        tvFailedTitle.visibility = View.VISIBLE
46
+                        tvFailedValue.visibility = View.VISIBLE
47
+                        tvStatusValue.text = "提现失败"
48
+                        tvStatusValue.setTextColor(
49
+                            ContextCompat.getColor(
50
+                                context,
51
+                                R.color.red_fe0032
52
+                            )
53
+                        )
54
+                        tvFailedValue.text = fail_msg
55
+                    }
56
+                    "0" -> {
57
+                        //提现中
58
+                        tvStatusValue.text = "提现中"
59
+                        tvStatusValue.setTextColor(
60
+                            ContextCompat.getColor(
61
+                                context,
62
+                                R.color.org_f88726
63
+                            )
64
+                        )
65
+                    }
66
+                    "1" -> {
67
+                        //已完成
68
+                        tvStatusValue.text = "已完成"
69
+                        tvStatusValue.setTextColor(
70
+                            ContextCompat.getColor(
71
+                                context,
72
+                                R.color.black_333333
73
+                            )
74
+                        )
75
+                    }
76
+                }
77
+            }
78
+        }
79
+    }
80
+
81
+    companion object {
82
+        @JvmStatic
83
+        fun launch(activity: Activity, data: WithdrawalBean) {
84
+            val intent = Intent(activity, TixianDetailActivity::class.java)
85
+            intent.putExtra("data", data)
86
+            activity.startActivity(intent)
87
+        }
88
+    }
89
+}

+ 130 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/mine/adapter/CommissionDetailAdapter.java

@@ -0,0 +1,130 @@
1
+package com.yihucha.hbyhc.presentation.mine.adapter;
2
+
3
+import android.content.Context;
4
+import android.view.LayoutInflater;
5
+import android.view.View;
6
+import android.view.ViewGroup;
7
+import android.widget.BaseAdapter;
8
+import android.widget.TextView;
9
+
10
+import androidx.core.content.ContextCompat;
11
+
12
+import com.yihucha.hbyhc.R;
13
+import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalBean;
14
+import com.yihucha.hbyhc.presentation.mine.model.CommissionBean;
15
+import com.yihucha.hbyhc.utils.EmptyCheckUtils;
16
+import com.yihucha.hbyhc.utils.StringUtils;
17
+
18
+import java.util.ArrayList;
19
+import java.util.List;
20
+
21
+/**
22
+ * author : zhangbing
23
+ * time   : 2024/2/1 23:16
24
+ * com.yihucha.hbyhc.presentation.mine.adapter
25
+ */
26
+public class CommissionDetailAdapter extends BaseAdapter {
27
+    List<String> typeArr = new ArrayList<>();
28
+    private Context context;
29
+    private List<CommissionBean.PageInfoDTO.DataDTO> datas;
30
+
31
+    public CommissionDetailAdapter(Context context, List<CommissionBean.PageInfoDTO.DataDTO> datas) {
32
+        this.context = context;
33
+        this.datas = datas;
34
+        //1代理费 2 消费佣金 3推广佣金 4辖区佣金5 养老金 6 广告费 7 商户跨店收入8平台奖励 9渠道商、
35
+        // 10 推广商户流水佣金 11分红 12区域管理收益 13消费循环佣金  14-会员专区管理奖,市场管理分红'
36
+        typeArr.add("");
37
+        typeArr.add("分享奖");
38
+        typeArr.add("业绩奖");
39
+        typeArr.add("代理商分红");
40
+        typeArr.add("推荐代理商收益");
41
+        typeArr.add("消费增值系统收益");
42
+        typeArr.add("运营中心收益");
43
+//        typeArr.add("代理费");
44
+//        typeArr.add("消费佣金");
45
+//        typeArr.add("推广佣金");
46
+//        typeArr.add("辖区佣金");
47
+//        typeArr.add("养老金");
48
+//        typeArr.add("广告费");
49
+//        typeArr.add("商户跨店收入");
50
+//        typeArr.add("平台奖励");
51
+//        typeArr.add("渠道商");
52
+//        typeArr.add("推广商户流水佣金");
53
+//        typeArr.add("分红");
54
+//        typeArr.add("区域管理收益");
55
+//        typeArr.add("消费循环佣金");
56
+//        typeArr.add("会员专区管理奖,市场管理分红");
57
+    }
58
+
59
+    public void setDatas(List<CommissionBean.PageInfoDTO.DataDTO> datas) {
60
+        this.datas = datas;
61
+        notifyDataSetChanged();
62
+    }
63
+
64
+    @Override
65
+    public int getCount() {
66
+        return EmptyCheckUtils.isEmpty(datas) ? 0 : datas.size();
67
+    }
68
+
69
+    @Override
70
+    public CommissionBean.PageInfoDTO.DataDTO getItem(int position) {
71
+        return datas.get(position);
72
+    }
73
+
74
+    @Override
75
+    public long getItemId(int position) {
76
+        return 0;
77
+    }
78
+
79
+    @Override
80
+    public View getView(int position, View convertView, ViewGroup parent) {
81
+        TXRecordHolder holder = null;
82
+        if (convertView == null) {
83
+            convertView = LayoutInflater.from(context).inflate(R.layout.item_commission_detail, parent, false);
84
+            holder = new TXRecordHolder(convertView);
85
+            convertView.setTag(holder);
86
+        } else {
87
+            holder = (TXRecordHolder) convertView.getTag();
88
+        }
89
+        //此处设置数据
90
+        CommissionBean.PageInfoDTO.DataDTO item = getItem(position);
91
+        String commissionType = item.getType();
92
+        holder.tvName.setText(item.getTitle());
93
+        holder.tvTime.setText("结算时间:"+item.getCreateTime());
94
+        holder.tvMoney.setText(item.getMoney());
95
+        TextView tvStatus = holder.tvStatus;
96
+        TextView tvTitle = holder.tvTitle;
97
+        if (StringUtils.isNumber(commissionType)) {
98
+            int i = Integer.parseInt(commissionType);
99
+            if (i > 0) tvTitle.setText(typeArr.get(i));
100
+        }
101
+        if ("0".equals(item.getStatus())) {
102
+            //未结算
103
+            tvStatus.setText("未结算");
104
+            tvStatus.setTextColor(ContextCompat.getColor(context, R.color.red_fe0032));
105
+            holder.tvTime.setVisibility(View.GONE);
106
+        } else if ("1".equals(item.getStatus())) {
107
+            //已结算
108
+            tvStatus.setText("已结算");
109
+            tvStatus.setTextColor(ContextCompat.getColor(context, R.color.black_333333));
110
+        }
111
+        return convertView;
112
+    }
113
+
114
+
115
+    static class TXRecordHolder {
116
+        public TextView tvName;
117
+        public TextView tvTime;
118
+        public TextView tvMoney;
119
+        public TextView tvStatus;
120
+        public TextView tvTitle;
121
+
122
+        public TXRecordHolder(View itemView) {
123
+            tvName = itemView.findViewById(R.id.tv_name);
124
+            tvTime = itemView.findViewById(R.id.t_time);
125
+            tvMoney = itemView.findViewById(R.id.tv_money);
126
+            tvStatus = itemView.findViewById(R.id.tv_status);
127
+            tvTitle = itemView.findViewById(R.id.tv_title);
128
+        }
129
+    }
130
+}

+ 13 - 1
app/src/main/java/com/yihucha/hbyhc/presentation/mine/adapter/TixianRecordAdapter.java

@@ -10,7 +10,7 @@ import android.widget.TextView;
10 10
 import androidx.core.content.ContextCompat;
11 11
 
12 12
 import com.yihucha.hbyhc.R;
13
-import com.yihucha.hbyhc.databinding.ItemTixianRecordsBinding;
13
+import com.yihucha.hbyhc.callback.OnRvItemClickListener;
14 14
 import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalBean;
15 15
 import com.yihucha.hbyhc.utils.EmptyCheckUtils;
16 16
 
@@ -25,6 +25,7 @@ public class TixianRecordAdapter extends BaseAdapter {
25 25
     private Context context;
26 26
     private List<WithdrawalBean> datas;
27 27
 
28
+    private OnRvItemClickListener onRvItemClickListener;
28 29
     public TixianRecordAdapter(Context context, List<WithdrawalBean> datas) {
29 30
         this.context = context;
30 31
         this.datas = datas;
@@ -35,6 +36,10 @@ public class TixianRecordAdapter extends BaseAdapter {
35 36
         notifyDataSetChanged();
36 37
     }
37 38
 
39
+    public void setOnItemClickListener(OnRvItemClickListener onRvItemClickListener) {
40
+        this.onRvItemClickListener = onRvItemClickListener;
41
+    }
42
+
38 43
     @Override
39 44
     public int getCount() {
40 45
         return EmptyCheckUtils.isEmpty(datas) ? 0 : datas.size();
@@ -79,6 +84,11 @@ public class TixianRecordAdapter extends BaseAdapter {
79 84
             tvStatus.setText("已完成");
80 85
             tvStatus.setTextColor(ContextCompat.getColor(context, R.color.black_333333));
81 86
         }
87
+        holder.parent.setOnClickListener(v->{
88
+            if (EmptyCheckUtils.isNotEmpty(onRvItemClickListener)) {
89
+                onRvItemClickListener.onItemClick(position);
90
+            }
91
+        });
82 92
         return convertView;
83 93
     }
84 94
 
@@ -88,11 +98,13 @@ public class TixianRecordAdapter extends BaseAdapter {
88 98
         public TextView tvTime;
89 99
         public TextView tvMoney;
90 100
         public TextView tvStatus;
101
+        public ViewGroup parent;
91 102
         public TXRecordHolder(View itemView) {
92 103
             tvName = itemView.findViewById(R.id.tv_name);
93 104
             tvTime = itemView.findViewById(R.id.tv_time);
94 105
             tvMoney = itemView.findViewById(R.id.tv_money);
95 106
             tvStatus = itemView.findViewById(R.id.tv_status);
107
+            parent = itemView.findViewById(R.id.parent);
96 108
         }
97 109
     }
98 110
 }

+ 182 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/mine/model/BankInfoBean.java

@@ -0,0 +1,182 @@
1
+package com.yihucha.hbyhc.presentation.mine.model;
2
+
3
+import com.google.gson.annotations.SerializedName;
4
+
5
+/**
6
+ * author : zhangbing
7
+ * time   : 2024/2/22 15:36
8
+ * com.yihucha.hbyhc.presentation.mine.model
9
+ */
10
+public class BankInfoBean {
11
+
12
+    @SerializedName("id")
13
+    private String id;
14
+    @SerializedName("user_id")
15
+    private String userId;
16
+    @SerializedName("account_type")
17
+    private String accountType;
18
+    @SerializedName("account")
19
+    private String account;
20
+    @SerializedName("is_default")
21
+    private String isDefault;
22
+    @SerializedName("create_time")
23
+    private String createTime;
24
+    @SerializedName("info")
25
+    private String info;
26
+    @SerializedName("update_time")
27
+    private String updateTime;
28
+    @SerializedName("status")
29
+    private String status;
30
+    @SerializedName("valid_date")
31
+    private String validDate;
32
+    @SerializedName("bank_name")
33
+    private String bankName;
34
+    @SerializedName("phone")
35
+    private String phone;
36
+    @SerializedName("bank_card_type")
37
+    private String bankCardType;
38
+    @SerializedName("user_name")
39
+    private String userName;
40
+    @SerializedName("user_card")
41
+    private String userCard;
42
+    @SerializedName("bank_open_name")
43
+    private String bankOpenName;
44
+    @SerializedName("pic")
45
+    private String pic;
46
+
47
+    public String getId() {
48
+        return id;
49
+    }
50
+
51
+    public void setId(String id) {
52
+        this.id = id;
53
+    }
54
+
55
+    public String getUserId() {
56
+        return userId;
57
+    }
58
+
59
+    public void setUserId(String userId) {
60
+        this.userId = userId;
61
+    }
62
+
63
+    public String getAccountType() {
64
+        return accountType;
65
+    }
66
+
67
+    public void setAccountType(String accountType) {
68
+        this.accountType = accountType;
69
+    }
70
+
71
+    public String getAccount() {
72
+        return account;
73
+    }
74
+
75
+    public void setAccount(String account) {
76
+        this.account = account;
77
+    }
78
+
79
+    public String getIsDefault() {
80
+        return isDefault;
81
+    }
82
+
83
+    public void setIsDefault(String isDefault) {
84
+        this.isDefault = isDefault;
85
+    }
86
+
87
+    public String getCreateTime() {
88
+        return createTime;
89
+    }
90
+
91
+    public void setCreateTime(String createTime) {
92
+        this.createTime = createTime;
93
+    }
94
+
95
+    public String getInfo() {
96
+        return info;
97
+    }
98
+
99
+    public void setInfo(String info) {
100
+        this.info = info;
101
+    }
102
+
103
+    public String getUpdateTime() {
104
+        return updateTime;
105
+    }
106
+
107
+    public void setUpdateTime(String updateTime) {
108
+        this.updateTime = updateTime;
109
+    }
110
+
111
+    public String getStatus() {
112
+        return status;
113
+    }
114
+
115
+    public void setStatus(String status) {
116
+        this.status = status;
117
+    }
118
+
119
+    public String getValidDate() {
120
+        return validDate;
121
+    }
122
+
123
+    public void setValidDate(String validDate) {
124
+        this.validDate = validDate;
125
+    }
126
+
127
+    public String getBankName() {
128
+        return bankName;
129
+    }
130
+
131
+    public void setBankName(String bankName) {
132
+        this.bankName = bankName;
133
+    }
134
+
135
+    public String getPhone() {
136
+        return phone;
137
+    }
138
+
139
+    public void setPhone(String phone) {
140
+        this.phone = phone;
141
+    }
142
+
143
+    public String getBankCardType() {
144
+        return bankCardType;
145
+    }
146
+
147
+    public void setBankCardType(String bankCardType) {
148
+        this.bankCardType = bankCardType;
149
+    }
150
+
151
+    public String getUserName() {
152
+        return userName;
153
+    }
154
+
155
+    public void setUserName(String userName) {
156
+        this.userName = userName;
157
+    }
158
+
159
+    public String getUserCard() {
160
+        return userCard;
161
+    }
162
+
163
+    public void setUserCard(String userCard) {
164
+        this.userCard = userCard;
165
+    }
166
+
167
+    public String getBankOpenName() {
168
+        return bankOpenName;
169
+    }
170
+
171
+    public void setBankOpenName(String bankOpenName) {
172
+        this.bankOpenName = bankOpenName;
173
+    }
174
+
175
+    public String getPic() {
176
+        return pic;
177
+    }
178
+
179
+    public void setPic(String pic) {
180
+        this.pic = pic;
181
+    }
182
+}

+ 170 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/mine/model/CommissionBean.java

@@ -0,0 +1,170 @@
1
+package com.yihucha.hbyhc.presentation.mine.model;
2
+
3
+import com.google.gson.annotations.SerializedName;
4
+
5
+import java.util.List;
6
+
7
+/**
8
+ * author : zhangbing
9
+ * time   : 2024/2/22 10:14
10
+ * com.yihucha.hbyhc.presentation.mine.model
11
+ */
12
+public class CommissionBean {
13
+
14
+    @SerializedName("totel_money")
15
+    private Double totelMoney;
16
+    @SerializedName("pageInfo")
17
+    private PageInfoDTO pageInfo;
18
+
19
+    public Double getTotelMoney() {
20
+        return totelMoney;
21
+    }
22
+
23
+    public void setTotelMoney(Double totelMoney) {
24
+        this.totelMoney = totelMoney;
25
+    }
26
+
27
+    public PageInfoDTO getPageInfo() {
28
+        return pageInfo;
29
+    }
30
+
31
+    public void setPageInfo(PageInfoDTO pageInfo) {
32
+        this.pageInfo = pageInfo;
33
+    }
34
+
35
+    public static class PageInfoDTO {
36
+        @SerializedName("current_page")
37
+        private Integer currentPage;
38
+        @SerializedName("last_page")
39
+        private Integer lastPage;
40
+        @SerializedName("data")
41
+        private List<DataDTO> data;
42
+
43
+        public Integer getCurrentPage() {
44
+            return currentPage;
45
+        }
46
+
47
+        public void setCurrentPage(Integer currentPage) {
48
+            this.currentPage = currentPage;
49
+        }
50
+
51
+        public Integer getLastPage() {
52
+            return lastPage;
53
+        }
54
+
55
+        public void setLastPage(Integer lastPage) {
56
+            this.lastPage = lastPage;
57
+        }
58
+
59
+        public List<DataDTO> getData() {
60
+            return data;
61
+        }
62
+
63
+        public void setData(List<DataDTO> data) {
64
+            this.data = data;
65
+        }
66
+
67
+        public static class DataDTO {
68
+            @SerializedName("enterprise_user_bill")
69
+            private String enterpriseUserBill;
70
+            @SerializedName("mer_id")
71
+            private String merId;
72
+            @SerializedName("uid")
73
+            private String uid;
74
+            @SerializedName("money")
75
+            private String money;
76
+            @SerializedName("pm")
77
+            private String pm;
78
+            @SerializedName("title")
79
+            private String title;
80
+            @SerializedName("create_time")
81
+            private String createTime;
82
+            @SerializedName("type")
83
+            private String type;
84
+            @SerializedName("status")
85
+            private String status;
86
+            @SerializedName("order_sn")
87
+            private String orderSn;
88
+
89
+            public String getEnterpriseUserBill() {
90
+                return enterpriseUserBill;
91
+            }
92
+
93
+            public void setEnterpriseUserBill(String enterpriseUserBill) {
94
+                this.enterpriseUserBill = enterpriseUserBill;
95
+            }
96
+
97
+            public String getMerId() {
98
+                return merId;
99
+            }
100
+
101
+            public void setMerId(String merId) {
102
+                this.merId = merId;
103
+            }
104
+
105
+            public String getUid() {
106
+                return uid;
107
+            }
108
+
109
+            public void setUid(String uid) {
110
+                this.uid = uid;
111
+            }
112
+
113
+            public String getMoney() {
114
+                return money;
115
+            }
116
+
117
+            public void setMoney(String money) {
118
+                this.money = money;
119
+            }
120
+
121
+            public String getPm() {
122
+                return pm;
123
+            }
124
+
125
+            public void setPm(String pm) {
126
+                this.pm = pm;
127
+            }
128
+
129
+            public String getTitle() {
130
+                return title;
131
+            }
132
+
133
+            public void setTitle(String title) {
134
+                this.title = title;
135
+            }
136
+
137
+            public String getCreateTime() {
138
+                return createTime;
139
+            }
140
+
141
+            public void setCreateTime(String createTime) {
142
+                this.createTime = createTime;
143
+            }
144
+
145
+            public String getType() {
146
+                return type;
147
+            }
148
+
149
+            public void setType(String type) {
150
+                this.type = type;
151
+            }
152
+
153
+            public String getStatus() {
154
+                return status;
155
+            }
156
+
157
+            public void setStatus(String status) {
158
+                this.status = status;
159
+            }
160
+
161
+            public String getOrderSn() {
162
+                return orderSn;
163
+            }
164
+
165
+            public void setOrderSn(String orderSn) {
166
+                this.orderSn = orderSn;
167
+            }
168
+        }
169
+    }
170
+}

+ 3 - 3
app/src/main/java/com/yihucha/hbyhc/presentation/mine/view_model/MineSpreadInfo.java

@@ -12,7 +12,7 @@ public class MineSpreadInfo {
12 12
     @SerializedName("current_balance")
13 13
     private String currentBalance;
14 14
     @SerializedName("unsettled_balance")
15
-    private Integer unsettledBalance;
15
+    private String unsettledBalance;
16 16
     @SerializedName("withdrawn_balance")
17 17
     private String withdrawnBalance;
18 18
     @SerializedName("total_balance")
@@ -46,11 +46,11 @@ public class MineSpreadInfo {
46 46
         this.currentBalance = currentBalance;
47 47
     }
48 48
 
49
-    public Integer getUnsettledBalance() {
49
+    public String getUnsettledBalance() {
50 50
         return unsettledBalance;
51 51
     }
52 52
 
53
-    public void setUnsettledBalance(Integer unsettledBalance) {
53
+    public void setUnsettledBalance(String unsettledBalance) {
54 54
         this.unsettledBalance = unsettledBalance;
55 55
     }
56 56
 

+ 2 - 1
app/src/main/java/com/yihucha/hbyhc/presentation/order/SubmitOrderActivity.java

@@ -31,6 +31,7 @@ import com.yihucha.hbyhc.presentation.order.model.OrderCreateBean;
31 31
 import com.yihucha.hbyhc.presentation.order.view_model.OrderViewModel;
32 32
 import com.yihucha.hbyhc.presentation.pay.PayActivity;
33 33
 import com.yihucha.hbyhc.utils.DoubleFormatTool;
34
+import com.yihucha.hbyhc.utils.EmptyCheckUtils;
34 35
 import com.yihucha.hbyhc.utils.LogUtil;
35 36
 import com.yihucha.hbyhc.utils.NumberUtil;
36 37
 import com.yihucha.hbyhc.utils.StringsUtil;
@@ -319,7 +320,7 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
319 320
             CreateOrderRequest createOrderRequest = new CreateOrderRequest();
320 321
             createOrderRequest.setPay_type("1");
321 322
             if (isChecked) {
322
-                if (!StringsUtil.isTel(account)) {
323
+                if (EmptyCheckUtils.isEmpty(account) || !StringsUtil.isTel(account)) {
323 324
                     Toast.makeText(context, "请正确输入开通账号", Toast.LENGTH_SHORT).show();
324 325
                     return;
325 326
                 } else {

+ 15 - 1
app/src/main/java/com/yihucha/hbyhc/utils/StringUtils.kt

@@ -105,6 +105,21 @@ class StringUtils {
105 105
         }
106 106
 
107 107
         /**
108
+         * 判断字符串是否是数字
109
+         */
110
+        @JvmStatic
111
+        fun isNumber(number: String?): Boolean {
112
+            return number?.let {
113
+                try {
114
+                    Integer.parseInt(it)
115
+                    true
116
+                } catch (e: NumberFormatException) {
117
+                    false
118
+                }
119
+            } ?: false
120
+        }
121
+
122
+        /**
108 123
          * URL移除 http或https头部信息
109 124
          */
110 125
         @JvmStatic
@@ -205,5 +220,4 @@ class StringUtils {
205 220
     }
206 221
 
207 222
 
208
-
209 223
 }

+ 88 - 42
app/src/main/java/com/yihucha/hbyhc/utils/StringsUtil.java

@@ -22,54 +22,58 @@ import anet.channel.util.StringUtils;
22 22
 @SuppressLint("SimpleDateFormat")
23 23
 public class StringsUtil {
24 24
 
25
-    public static boolean isEmpty(String str){
26
-        return str==null || "".equals(str);
25
+    public static boolean isEmpty(String str) {
26
+        return str == null || "".equals(str);
27 27
     }
28
-    public static boolean isEmpty(List lst){
29
-        return lst==null || lst.size()==0;
28
+
29
+    public static boolean isEmpty(List lst) {
30
+        return lst == null || lst.size() == 0;
30 31
     }
31
-    public static String getAllNumber(String str){
32
+
33
+    public static String getAllNumber(String str) {
32 34
         if (isEmpty(str)) {
33 35
             return "0";
34 36
         }
35 37
         if (str.contains("¥")) {
36
-            str = str.replace("¥","").trim();
38
+            str = str.replace("¥", "").trim();
37 39
         }
38 40
         try {
39 41
             double aFloat = Double.parseDouble(str);
40 42
             int num = (int) aFloat;
41
-            if (aFloat>num){
43
+            if (aFloat > num) {
42 44
                 return str;
43 45
             }
44
-            return num+"";
45
-        }catch (NumberFormatException e){
46
+            return num + "";
47
+        } catch (NumberFormatException e) {
46 48
             e.printStackTrace();
47 49
             return "0";
48 50
         }
49 51
     }
50
-    public static String getNumber(String str){
52
+
53
+    public static String getNumber(String str) {
51 54
         if (isEmpty(str)) {
52 55
             return "0.00";
53 56
         }
54 57
         try {
55 58
             double aFloat = Double.parseDouble(str);
56
-            if (aFloat>=10000&&false){
57
-                if (aFloat%10000==0){
58
-                    return (int)(aFloat / 10000)+"万";
59
+            if (aFloat >= 10000 && false) {
60
+                if (aFloat % 10000 == 0) {
61
+                    return (int) (aFloat / 10000) + "万";
59 62
                 }
60
-                return String.format("%.2f万",aFloat / 10000);
61
-            }else {
63
+                return String.format("%.2f万", aFloat / 10000);
64
+            } else {
62 65
                 int num = (int) aFloat;
63
-                if (aFloat>num){
66
+                if (aFloat > num) {
64 67
                     return str;
65 68
                 }
66
-                return num+"";
69
+                return num + "";
67 70
             }
68
-        }catch (NumberFormatException e){
71
+        } catch (NumberFormatException e) {
69 72
             e.printStackTrace();
70 73
             return "0.00";
71 74
         }
72 75
     }
76
+
73 77
     /**
74 78
      * 获取当前应用程序的版本号
75 79
      */
@@ -86,6 +90,7 @@ public class StringsUtil {
86 90
             return "1";
87 91
         }
88 92
     }
93
+
89 94
     /**
90 95
      * 如果版本1 大于 版本2 返回true 否则返回fasle 支持 2.2 2.2.1 比较
91 96
      * 支持不同位数的比较  2.0.0.0.0.1  2.0 对比
@@ -161,6 +166,7 @@ public class StringsUtil {
161 166
         }
162 167
         return false;
163 168
     }
169
+
164 170
     /**
165 171
      * 是否为电话号
166 172
      */
@@ -197,7 +203,7 @@ public class StringsUtil {
197 203
                     temp.append("*");
198 204
                 }
199 205
                 temp.append(string.subSequence(start_size, string.length()));
200
-            } else if (string.length() > 3){
206
+            } else if (string.length() > 3) {
201 207
                 int start_size = string.length() - 3;
202 208
                 for (int i = 0; i < start_size; i++) {
203 209
                     temp.append("*");
@@ -213,14 +219,29 @@ public class StringsUtil {
213 219
     }
214 220
 
215 221
     /**
222
+     * 身份证加密显示
223
+     */
224
+    public static String encodeIdCard2(String string) {
225
+        StringBuilder temp = new StringBuilder();
226
+        if (!TextUtils.isEmpty(string)) {
227
+            temp.append(string.substring(0,1));
228
+            temp.append("****************");
229
+            temp.append(string.substring(string.length()-1,string.length()));
230
+        } else {
231
+            return "";
232
+        }
233
+        return temp.toString();
234
+    }
235
+
236
+
237
+    /**
216 238
      * 银行卡取后4位
217 239
      */
218 240
     public static String getBankCard4(String string) {
219 241
         StringBuffer temp = new StringBuffer("");
220
-        if(string!=null && string.length() >= 4)
221
-        {
222
-        	temp.append(string.subSequence(string.length() - 4, string.length()));
223
-        } else if (string != null){
242
+        if (string != null && string.length() >= 4) {
243
+            temp.append(string.subSequence(string.length() - 4, string.length()));
244
+        } else if (string != null) {
224 245
             temp.append(string);
225 246
         }
226 247
         return temp.toString();
@@ -258,6 +279,26 @@ public class StringsUtil {
258 279
     }
259 280
 
260 281
     /**
282
+     * 银行卡格式化
283
+     */
284
+    public static String formatBankCard(String card) {
285
+        if (EmptyCheckUtils.isEmpty(card)) {
286
+            return card + "";
287
+        }
288
+        StringBuffer sb = new StringBuffer();
289
+        char[] chars = card.toCharArray();
290
+        int count = 1;
291
+        for (int i = 0; i < chars.length; i++) {
292
+            sb.append(chars[i]);
293
+            if (count % 4 == 0 && i != chars.length - 1) {
294
+                sb.append(" ");
295
+            }
296
+            count++;
297
+        }
298
+        return sb.toString();
299
+    }
300
+
301
+    /**
261 302
      * 银行卡加密显示
262 303
      */
263 304
     public static String longEncodeBankCard(String string) {
@@ -277,7 +318,7 @@ public class StringsUtil {
277 318
 
278 319
         String result = "";
279 320
         String origin = temp.toString();
280
-        for (int i = 0; i < origin.length(); i ++) {
321
+        for (int i = 0; i < origin.length(); i++) {
281 322
             result += temp.charAt(i);
282 323
             if ((i + 1) % 4 == 0) {
283 324
                 result += "  ";
@@ -289,7 +330,8 @@ public class StringsUtil {
289 330
 
290 331
     /**
291 332
      * 银行卡加密显示
292
-     * @param string 银行卡号
333
+     *
334
+     * @param string    银行卡号
293 335
      * @param eightFlag 是否展示8位,1-是,其他-否
294 336
      */
295 337
     public static String longEncodeBankCard(String string, String eightFlag) {
@@ -314,7 +356,7 @@ public class StringsUtil {
314 356
 
315 357
         String result = "";
316 358
         String origin = temp.toString();
317
-        for (int i = 0; i < origin.length(); i ++) {
359
+        for (int i = 0; i < origin.length(); i++) {
318 360
             result += temp.charAt(i);
319 361
             if ((i + 1) % 4 == 0) {
320 362
                 result += "  ";
@@ -323,7 +365,7 @@ public class StringsUtil {
323 365
 
324 366
         return result;
325 367
     }
326
-    
368
+
327 369
 //    /**
328 370
 //     * 银行卡加密显示
329 371
 //     */
@@ -524,13 +566,13 @@ public class StringsUtil {
524 566
             }
525 567
             if (sbstr.length() > 8) {
526 568
                 sbstr.insert(8, " ");
527
-            }            
569
+            }
528 570
             return sbstr.toString();
529 571
         } else {
530 572
             return "";
531 573
         }
532 574
     }
533
-    
575
+
534 576
     public static String getBankCard(String string) {
535 577
         if (string != null && string.length() > 0) {
536 578
             StringBuilder sbstr = new StringBuilder(string);
@@ -563,7 +605,7 @@ public class StringsUtil {
563 605
 
564 606
     /**
565 607
      * 计算剩余时间
566
-     * 
608
+     *
567 609
      * @param temp1:开盘时间
568 610
      * @param temp2:系统时间
569 611
      * @return
@@ -585,33 +627,35 @@ public class StringsUtil {
585 627
         }
586 628
         return date1 - date2;
587 629
     }
630
+
588 631
     //根据时间戳字符串获取格式化时间
589
-    public static String getTime(String time){
590
-        if (time == null||"".equals(time)) {
632
+    public static String getTime(String time) {
633
+        if (time == null || "".equals(time)) {
591 634
             return "";
592 635
         }
593 636
         try {
594 637
             long ltime = Long.parseLong(time);
595 638
             return dateFormater.format(ltime);
596
-        }catch (Exception e){
639
+        } catch (Exception e) {
597 640
             return "";
598 641
         }
599 642
     }
600 643
 
601
-    public static long getEndTime(String timeStr){
644
+    public static long getEndTime(String timeStr) {
602 645
         if (StringUtils.isBlank(timeStr)) {
603 646
             return 0;
604 647
         }
605 648
         try {
606 649
             long endTime = dateFormater.parse(timeStr).getTime();
607 650
             long curr = System.currentTimeMillis();
608
-            return endTime-curr;
609
-        }catch (Exception e){
651
+            return endTime - curr;
652
+        } catch (Exception e) {
610 653
             return 0;
611 654
         }
612 655
 
613 656
     }
614
-    public static String getTimeNoYear(long time){
657
+
658
+    public static String getTimeNoYear(long time) {
615 659
         if (time <= 0) {
616 660
             return "";
617 661
         }
@@ -620,16 +664,17 @@ public class StringsUtil {
620 664
     }
621 665
 
622 666
     //根据时间字符串获取时间值
623
-    public static long getLongTime(String timeStr){
624
-    	long time = 0;
625
-    	try {
626
-    		time = dateFormater.parse(timeStr).getTime();
667
+    public static long getLongTime(String timeStr) {
668
+        long time = 0;
669
+        try {
670
+            time = dateFormater.parse(timeStr).getTime();
627 671
         } catch (Exception e) {
628 672
             e.printStackTrace();
629 673
         }
630 674
         return time;
631 675
     }
632
-    public static long getLongTime2(String timeStr){
676
+
677
+    public static long getLongTime2(String timeStr) {
633 678
         long time = 0;
634 679
         try {
635 680
             time = dateFormater2.parse(timeStr).getTime();
@@ -638,6 +683,7 @@ public class StringsUtil {
638 683
         }
639 684
         return time;
640 685
     }
686
+
641 687
     public static long getHour(long tempTime) {
642 688
         long timeCount = tempTime / (1000 * 60 * 60);
643 689
         return timeCount;

+ 2 - 2
app/src/main/java/com/yihucha/hbyhc/view/PopAnnuitySelector.java

@@ -80,8 +80,8 @@ public class PopAnnuitySelector extends PopupWindow implements View.OnClickListe
80 80
         GridLayoutManager statusManager = new GridLayoutManager(context, 3);
81 81
         binding.rvSourceItem.setLayoutManager(sourceManager);
82 82
         binding.rvStatusItem.setLayoutManager(statusManager);
83
-        sourceAdapter = new ItemAnnuitySelectorAdapter(context, sourceBeans);
84
-        statusAdapter = new ItemAnnuitySelectorAdapter(context, statusBeans);
83
+        sourceAdapter = new ItemAnnuitySelectorAdapter(context, sourceBeans,3);
84
+        statusAdapter = new ItemAnnuitySelectorAdapter(context, statusBeans,3);
85 85
 //        binding.rvSourceItem.addItemDecoration(new SpaceItemDecoration(DensityUtil.dp2px(context, 13)));
86 86
 //        binding.rvStatusItem.addItemDecoration(new SpaceItemDecoration(DensityUtil.dp2px(context, 13)));
87 87
         binding.rvSourceItem.setAdapter(sourceAdapter);

+ 108 - 0
app/src/main/java/com/yihucha/hbyhc/view/PopCommissionSelector.java

@@ -0,0 +1,108 @@
1
+package com.yihucha.hbyhc.view;
2
+
3
+import android.content.Context;
4
+import android.graphics.drawable.ColorDrawable;
5
+import android.view.LayoutInflater;
6
+import android.view.View;
7
+import android.view.WindowManager;
8
+import android.widget.PopupWindow;
9
+
10
+import androidx.recyclerview.widget.GridLayoutManager;
11
+
12
+import com.yihucha.hbyhc.R;
13
+import com.yihucha.hbyhc.databinding.PopwindowAnnuityRecordsSelectorBinding;
14
+import com.yihucha.hbyhc.databinding.PopwindowCommissionSelectorBinding;
15
+import com.yihucha.hbyhc.presentation.annuity.adapter.ItemAnnuitySelectorAdapter;
16
+import com.yihucha.hbyhc.presentation.annuity.model.SelectorBean;
17
+import com.yihucha.hbyhc.utils.EmptyCheckUtils;
18
+
19
+import java.util.ArrayList;
20
+import java.util.List;
21
+
22
+/**
23
+ * author : zhangbing
24
+ * time   : 2023/10/21 20:47
25
+ * com.laolaixiang.bjtdba.view
26
+ */
27
+public class PopCommissionSelector extends PopupWindow implements View.OnClickListener {
28
+    private PopwindowCommissionSelectorBinding binding;
29
+    private List<SelectorBean> sourceBeans = new ArrayList<>();
30
+    private List<SelectorBean> statusBeans = new ArrayList<>();
31
+    private Context context;
32
+    private ItemAnnuitySelectorAdapter sourceAdapter;
33
+
34
+    private int sourcePos = 0;
35
+    private int sourcePosL = 0;
36
+    public PopCommissionSelector(Context context) {
37
+        super(context);
38
+        this.context = context;
39
+        View view = LayoutInflater.from(context).inflate(R.layout.popwindow_commission_selector, null);
40
+        binding = PopwindowCommissionSelectorBinding.bind(view);
41
+        //设置SelectPicPopupWindow的View
42
+        this.setContentView(view);
43
+        //设置SelectPicPopupWindow弹出窗体的宽
44
+        this.setWidth(WindowManager.LayoutParams.MATCH_PARENT);
45
+        //设置SelectPicPopupWindow弹出窗体的高
46
+        this.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
47
+        //设置SelectPicPopupWindow弹出窗体可点击
48
+        this.setFocusable(true);
49
+
50
+        //设置SelectPicPopupWindow弹出窗体动画效果
51
+//        this.setAnimationStyle(R.style.mystyle);
52
+        //实例化一个ColorDrawable颜色为半透明
53
+        ColorDrawable dw = new ColorDrawable(0x00000000);
54
+        //设置SelectPicPopupWindow弹出窗体的背景
55
+        this.setBackgroundDrawable(dw);
56
+        initView();
57
+        initClick();
58
+    }
59
+
60
+    private void initView() {
61
+        sourceBeans.add(new SelectorBean("全部", "", true));
62
+        sourceBeans.add(new SelectorBean("分享奖", "1", false));
63
+        sourceBeans.add(new SelectorBean("业绩奖", "2", false));
64
+        sourceBeans.add(new SelectorBean("代理商分红", "3", false));
65
+        sourceBeans.add(new SelectorBean("推荐代理商收益", "4", false));
66
+        sourceBeans.add(new SelectorBean("消费增值系统收益", "5", false));
67
+        sourceBeans.add(new SelectorBean("运营中心收益", "5", false));
68
+        GridLayoutManager sourceManager = new GridLayoutManager(context, 2);
69
+        binding.rvTypeItem.setLayoutManager(sourceManager);
70
+        sourceAdapter = new ItemAnnuitySelectorAdapter(context, sourceBeans,2);
71
+        binding.rvTypeItem.setAdapter(sourceAdapter);
72
+        sourceAdapter.setOnItemClickListener(itemPos -> {
73
+            sourcePosL = itemPos;
74
+        });
75
+    }
76
+
77
+    private void initClick() {
78
+        binding.tvReset.setOnClickListener(this::onClick);
79
+        binding.tvConfirm.setOnClickListener(this::onClick);
80
+        binding.viewBg.setOnClickListener(this::onClick);
81
+    }
82
+
83
+    @Override
84
+    public void onClick(View view) {
85
+        if (view == binding.tvReset) {
86
+            sourcePos = sourcePosL = 0;
87
+            sourceAdapter.onClick(sourcePos);
88
+        } else if (view == binding.tvConfirm) {
89
+            sourcePos = sourcePosL;
90
+            if (EmptyCheckUtils.isNotEmpty(onSelectListener)) {
91
+                onSelectListener.onSelect(sourceBeans.get(sourcePos).getKey());
92
+            }
93
+            dismiss();
94
+        } else if (view == binding.viewBg) {
95
+            dismiss();
96
+        }
97
+    }
98
+
99
+    private OnSelectListener onSelectListener;
100
+
101
+    public void setOnSelectListener(OnSelectListener onSelectListener) {
102
+        this.onSelectListener = onSelectListener;
103
+    }
104
+
105
+    public interface OnSelectListener {
106
+        void onSelect(String type);
107
+    }
108
+}

+ 96 - 0
app/src/main/res/layout/activity_commission_detail.xml

@@ -0,0 +1,96 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+    xmlns:app="http://schemas.android.com/apk/res-auto"
4
+    xmlns:tools="http://schemas.android.com/tools"
5
+    android:layout_width="match_parent"
6
+    android:layout_height="match_parent"
7
+    android:background="@color/white_f7f7f7"
8
+    tools:context=".presentation.mine.CommissionDetailActivity">
9
+
10
+    <LinearLayout
11
+        android:id="@+id/top_layout"
12
+        android:layout_width="match_parent"
13
+        android:layout_height="40dp"
14
+        android:background="@color/yellow_fff9ed"
15
+        android:orientation="horizontal">
16
+
17
+        <TextView
18
+            android:layout_width="wrap_content"
19
+            android:layout_height="wrap_content"
20
+            android:layout_gravity="center_vertical"
21
+            android:layout_weight="1"
22
+            android:paddingLeft="16dp"
23
+            android:text="当日分红奖次日1时结算,推荐奖实时结算"
24
+            android:textColor="@color/red_ff6010" />
25
+
26
+        <View
27
+            android:layout_width="1dp"
28
+            android:layout_height="match_parent"
29
+            android:layout_marginTop="10dp"
30
+            android:layout_marginBottom="10dp"
31
+            android:background="@color/gray_e5e5e5" />
32
+
33
+        <TextView
34
+            android:id="@+id/tv_selector"
35
+            android:layout_width="wrap_content"
36
+            android:layout_height="match_parent"
37
+            android:drawableRight="@mipmap/tuijian_xiala"
38
+            android:drawablePadding="5dp"
39
+            android:gravity="center_vertical"
40
+            android:paddingLeft="16dp"
41
+            android:paddingRight="16dp"
42
+            android:text="筛选"
43
+            android:textColor="@color/black_333333"
44
+            android:textSize="13sp" />
45
+    </LinearLayout>
46
+
47
+    <TextView
48
+        android:id="@+id/tv_date"
49
+        android:layout_width="wrap_content"
50
+        android:layout_height="wrap_content"
51
+        android:layout_below="@+id/top_layout"
52
+        android:layout_marginLeft="16dp"
53
+        android:layout_marginTop="16dp"
54
+        android:layout_marginBottom="16dp"
55
+        android:drawableRight="@mipmap/tuijian_xiala"
56
+        android:drawablePadding="5dp"
57
+        android:text="2023年12月"
58
+        android:textColor="@color/black_333333"
59
+        android:textSize="15sp" />
60
+
61
+    <TextView
62
+        android:id="@+id/tv_money"
63
+        android:layout_width="wrap_content"
64
+        android:layout_height="wrap_content"
65
+        android:layout_alignTop="@+id/tv_date"
66
+        android:layout_alignBottom="@+id/tv_date"
67
+        android:layout_alignParentRight="true"
68
+        android:layout_marginRight="16dp"
69
+        android:text="¥123.45" />
70
+
71
+    <ListView
72
+        android:id="@+id/lv_commission"
73
+        android:layout_width="match_parent"
74
+        android:layout_height="wrap_content"
75
+        android:background="@color/white"
76
+        android:layout_below="@+id/tv_date"
77
+        android:scrollbars="none"
78
+        android:paddingLeft="16dp"
79
+        android:paddingRight="16dp" />
80
+    <View
81
+        android:id="@+id/view_bg"
82
+        android:layout_width="match_parent"
83
+        android:layout_height="match_parent"
84
+        android:background="@color/black"
85
+        android:alpha="0.5"
86
+        android:visibility="gone"
87
+        android:layout_below="@+id/tv_date"
88
+        />
89
+    <include
90
+        android:id="@+id/layout_no_data"
91
+        layout="@layout/search_not_found"
92
+        android:layout_width="wrap_content"
93
+        android:layout_height="wrap_content"
94
+        android:layout_centerInParent="true"
95
+        android:visibility="gone" />
96
+</RelativeLayout>

+ 1 - 1
app/src/main/res/layout/activity_my_commission.xml

@@ -176,7 +176,7 @@
176 176
         android:layout_height="wrap_content"
177 177
         android:drawableLeft="@mipmap/icon_invitate_friends"
178 178
         android:drawablePadding="5dp"
179
-        android:text="申请提现"
179
+        android:text="邀请好友"
180 180
         android:textColor="@color/black_333333"
181 181
         android:textSize="15sp"
182 182
         app:layout_constraintBottom_toBottomOf="@+id/tv_go_tixian"

+ 238 - 0
app/src/main/res/layout/activity_tixian_detail.xml

@@ -0,0 +1,238 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+    xmlns:tools="http://schemas.android.com/tools"
4
+    android:layout_width="match_parent"
5
+    android:layout_height="match_parent"
6
+    android:background="@color/white_f8f8f8"
7
+    android:orientation="vertical"
8
+    tools:context=".presentation.mine.TixianDetailActivity">
9
+
10
+    <ScrollView
11
+        android:layout_width="match_parent"
12
+        android:layout_height="match_parent">
13
+
14
+        <LinearLayout
15
+            android:layout_width="match_parent"
16
+            android:layout_height="match_parent"
17
+            android:orientation="vertical">
18
+
19
+            <RelativeLayout
20
+                android:layout_width="match_parent"
21
+                android:layout_height="wrap_content"
22
+                android:background="@color/white"
23
+                android:padding="16dp">
24
+
25
+                <ImageView
26
+                    android:id="@+id/imgv_withdraw"
27
+                    android:layout_width="wrap_content"
28
+                    android:layout_height="wrap_content"
29
+                    android:layout_centerHorizontal="true"
30
+                    android:layout_marginTop="20dp"
31
+                    android:src="@mipmap/icon_withdraw" />
32
+
33
+                <TextView
34
+                    android:id="@+id/tv_title"
35
+                    android:layout_width="wrap_content"
36
+                    android:layout_height="wrap_content"
37
+                    android:layout_below="@+id/imgv_withdraw"
38
+                    android:layout_centerHorizontal="true"
39
+                    android:layout_marginTop="10dp"
40
+                    android:text="提现至微信"
41
+                    android:textColor="@color/black_333333"
42
+                    android:textSize="16sp" />
43
+
44
+                <com.yihucha.hbyhc.view.BoldText
45
+                    android:id="@+id/tv_money"
46
+                    android:layout_width="wrap_content"
47
+                    android:layout_height="wrap_content"
48
+                    android:layout_below="@+id/tv_title"
49
+                    android:layout_centerHorizontal="true"
50
+                    android:layout_marginTop="10dp"
51
+                    android:text="200"
52
+                    android:textColor="@color/black_333333"
53
+                    android:textSize="30sp" />
54
+
55
+                <View
56
+                    android:id="@+id/view_line"
57
+                    android:layout_width="match_parent"
58
+                    android:layout_height="1dp"
59
+                    android:layout_below="@+id/tv_money"
60
+                    android:layout_marginTop="45dp"
61
+                    android:background="@color/gray_e5e5e5" />
62
+
63
+                <com.yihucha.hbyhc.view.BoldText
64
+                    android:id="@+id/tv_info_title"
65
+                    android:layout_width="wrap_content"
66
+                    android:layout_height="wrap_content"
67
+                    android:layout_below="@+id/view_line"
68
+                    android:layout_marginTop="16dp"
69
+                    android:text="交易信息"
70
+                    android:textColor="@color/black_333333"
71
+                    android:textSize="15sp" />
72
+
73
+                <TextView
74
+                    android:id="@+id/tv_status_title"
75
+                    android:layout_width="wrap_content"
76
+                    android:layout_height="wrap_content"
77
+                    android:layout_below="@+id/tv_info_title"
78
+                    android:layout_marginTop="16dp"
79
+                    android:text="提现状态"
80
+                    android:textColor="@color/black_333333"
81
+                    android:textSize="15sp" />
82
+
83
+                <TextView
84
+                    android:id="@+id/tv_status_value"
85
+                    android:layout_width="wrap_content"
86
+                    android:layout_height="wrap_content"
87
+                    android:layout_below="@+id/tv_info_title"
88
+                    android:layout_alignParentRight="true"
89
+                    android:layout_marginTop="16dp"
90
+                    android:text="已完成"
91
+                    android:textColor="@color/black_333333"
92
+                    android:textSize="15sp" />
93
+
94
+                <TextView
95
+                    android:id="@+id/tv_time_title"
96
+                    android:layout_width="wrap_content"
97
+                    android:layout_height="wrap_content"
98
+                    android:layout_below="@+id/tv_status_title"
99
+                    android:layout_marginTop="16dp"
100
+                    android:text="提现时间"
101
+                    android:textColor="@color/black_333333"
102
+                    android:textSize="15sp" />
103
+
104
+                <TextView
105
+                    android:id="@+id/tv_time_value"
106
+                    android:layout_width="wrap_content"
107
+                    android:layout_height="wrap_content"
108
+                    android:layout_below="@+id/tv_status_title"
109
+                    android:layout_alignParentRight="true"
110
+                    android:layout_marginTop="16dp"
111
+                    android:text="2023-11-15 18:30:00"
112
+                    android:textColor="@color/black_333333"
113
+                    android:textSize="15sp" />
114
+
115
+                <TextView
116
+                    android:id="@+id/tv_paytime_title"
117
+                    android:layout_width="wrap_content"
118
+                    android:layout_height="wrap_content"
119
+                    android:layout_below="@+id/tv_time_title"
120
+                    android:layout_marginTop="16dp"
121
+                    android:text="打款时间"
122
+                    android:textColor="@color/black_333333"
123
+                    android:textSize="15sp" />
124
+
125
+                <TextView
126
+                    android:id="@+id/tv_paytime_value"
127
+                    android:layout_width="wrap_content"
128
+                    android:layout_height="wrap_content"
129
+                    android:layout_below="@+id/tv_time_title"
130
+                    android:layout_alignParentRight="true"
131
+                    android:layout_marginTop="16dp"
132
+                    android:text="2023-11-15 18:30:00"
133
+                    android:textColor="@color/black_333333"
134
+                    android:textSize="15sp" />
135
+
136
+                <TextView
137
+                    android:id="@+id/tv_failed_title"
138
+                    android:layout_width="wrap_content"
139
+                    android:layout_height="wrap_content"
140
+                    android:layout_below="@+id/tv_paytime_title"
141
+                    android:layout_marginTop="16dp"
142
+                    android:text="失败原因"
143
+                    android:textColor="@color/black_333333"
144
+                    android:textSize="15sp"
145
+                    android:visibility="gone"
146
+                    />
147
+
148
+                <TextView
149
+                    android:id="@+id/tv_failed_value"
150
+                    android:layout_width="match_parent"
151
+                    android:layout_height="wrap_content"
152
+                    android:layout_below="@+id/tv_failed_title"
153
+                    android:layout_marginTop="16dp"
154
+                    android:background="@color/white_f8f8f8"
155
+                    android:minLines="5"
156
+                    android:padding="5dp"
157
+                    android:text="此处显示失败原因,有后台大款人员备注的信息,有多少展示多少此处显示失败原因,有后台大款人员备注的信息,有多少展示多少此处显示失败原因,有后台大款人员备注的信息,有多少展示多少"
158
+                    android:textColor="@color/gray_999999"
159
+                    android:textSize="15sp"
160
+                    android:visibility="gone"
161
+                    android:layout_marginBottom="12dp"
162
+                    />
163
+            </RelativeLayout>
164
+
165
+            <RelativeLayout
166
+                android:id="@+id/layout_bank_info"
167
+                android:layout_width="match_parent"
168
+                android:layout_height="wrap_content"
169
+                android:background="@color/white"
170
+                android:padding="16dp"
171
+                android:visibility="gone"
172
+                android:layout_marginTop="10dp"
173
+                >
174
+
175
+                <com.yihucha.hbyhc.view.BoldText
176
+                    android:id="@+id/tv_bank_info_title"
177
+                    android:layout_width="wrap_content"
178
+                    android:layout_height="wrap_content"
179
+                    android:text="银行卡信息"
180
+                    android:textColor="@color/black_333333"
181
+                    android:textSize="15sp" />
182
+
183
+                <TextView
184
+                    android:id="@+id/tv_bank_title"
185
+                    android:layout_width="wrap_content"
186
+                    android:layout_height="wrap_content"
187
+                    android:layout_below="@+id/tv_bank_info_title"
188
+                    android:layout_marginTop="16dp"
189
+                    android:text="中国银行"
190
+                    android:textColor="@color/black_333333"
191
+                    android:textSize="15sp" />
192
+
193
+                <TextView
194
+                    android:id="@+id/tv_bank_value"
195
+                    android:layout_width="wrap_content"
196
+                    android:layout_height="wrap_content"
197
+                    android:layout_below="@+id/tv_bank_info_title"
198
+                    android:layout_alignParentRight="true"
199
+                    android:layout_marginTop="16dp"
200
+                    android:text="6227 0002 1005 0777 888"
201
+                    android:textColor="@color/black_333333"
202
+                    android:textSize="15sp" />
203
+
204
+                <TextView
205
+                    android:id="@+id/tv_user_title"
206
+                    android:layout_width="wrap_content"
207
+                    android:layout_height="wrap_content"
208
+                    android:layout_below="@+id/tv_bank_title"
209
+                    android:layout_marginTop="16dp"
210
+                    android:text="打款时间"
211
+                    android:textColor="@color/black_333333"
212
+                    android:textSize="15sp" />
213
+
214
+                <TextView
215
+                    android:id="@+id/tv_user_value"
216
+                    android:layout_width="wrap_content"
217
+                    android:layout_height="wrap_content"
218
+                    android:layout_below="@+id/tv_bank_title"
219
+                    android:layout_alignParentRight="true"
220
+                    android:layout_marginTop="16dp"
221
+                    android:text="2023-11-15 18:30:00"
222
+                    android:textColor="@color/black_333333"
223
+                    android:textSize="15sp" />
224
+            </RelativeLayout>
225
+
226
+            <TextView
227
+                android:layout_width="wrap_content"
228
+                android:layout_height="wrap_content"
229
+                android:layout_gravity="center_horizontal"
230
+                android:layout_marginTop="30dp"
231
+                android:layout_marginBottom="30dp"
232
+                android:text="客服电话:400-600-8888"
233
+                android:textColor="@color/gray_999999"
234
+                android:textSize="12sp" />
235
+        </LinearLayout>
236
+    </ScrollView>
237
+
238
+</LinearLayout>

+ 59 - 0
app/src/main/res/layout/item_commission_detail.xml

@@ -0,0 +1,59 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+    android:layout_width="match_parent"
4
+    android:layout_height="wrap_content"
5
+    android:paddingTop="16dp"
6
+    android:paddingBottom="16dp">
7
+
8
+    <com.yihucha.hbyhc.view.BoldText
9
+        android:id="@+id/tv_title"
10
+        android:layout_width="wrap_content"
11
+        android:layout_height="wrap_content"
12
+        android:text="推荐奖"
13
+        android:textColor="@color/black_333333"
14
+        android:textSize="14sp" />
15
+
16
+    <TextView
17
+        android:id="@+id/tv_status"
18
+        android:layout_width="wrap_content"
19
+        android:layout_height="wrap_content"
20
+        android:layout_alignTop="@+id/tv_title"
21
+        android:layout_alignBottom="@+id/tv_title"
22
+        android:layout_alignParentRight="true"
23
+        android:text="已结算"
24
+        android:textColor="@color/black_333333"
25
+        android:textSize="12sp" />
26
+
27
+    <TextView
28
+        android:id="@+id/tv_name"
29
+        android:layout_width="wrap_content"
30
+        android:layout_height="wrap_content"
31
+        android:layout_below="@+id/tv_title"
32
+        android:layout_marginTop="4dp"
33
+        android:text="光头强购买微电商品"
34
+        android:textColor="@color/black_333333"
35
+        android:textSize="12sp" />
36
+
37
+    <TextView
38
+        android:id="@+id/tv_money"
39
+        android:layout_width="wrap_content"
40
+        android:layout_height="wrap_content"
41
+        android:layout_alignTop="@+id/tv_name"
42
+        android:layout_alignBottom="@+id/tv_name"
43
+        android:layout_alignParentRight="true"
44
+        android:text="¥200.00"
45
+        android:textColor="@color/black_333333"
46
+        android:textSize="15sp" />
47
+
48
+    <TextView
49
+        android:id="@+id/t_time"
50
+        android:layout_width="wrap_content"
51
+        android:layout_height="wrap_content"
52
+        android:text="2023-08-26 18:30:30"
53
+        android:textColor="@color/gray_999999"
54
+        android:textSize="12sp"
55
+        android:layout_below="@+id/tv_name"
56
+        android:layout_marginTop="4dp"
57
+        />
58
+
59
+</RelativeLayout>

+ 1 - 0
app/src/main/res/layout/item_tixian_records.xml

@@ -6,6 +6,7 @@
6 6
     android:background="@color/white"
7 7
     android:paddingLeft="16dp"
8 8
     android:paddingRight="16dp"
9
+    android:id="@+id/parent"
9 10
     >
10 11
     <TextView
11 12
         android:id="@+id/tv_name"

+ 63 - 0
app/src/main/res/layout/popwindow_commission_selector.xml

@@ -0,0 +1,63 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+    xmlns:app="http://schemas.android.com/apk/res-auto"
4
+    android:layout_width="match_parent"
5
+    android:layout_height="match_parent"
6
+    android:background="@color/white"
7
+    android:paddingTop="16dp">
8
+
9
+    <androidx.recyclerview.widget.RecyclerView
10
+        android:id="@+id/rv_type_item"
11
+        android:layout_width="match_parent"
12
+        android:layout_height="wrap_content"
13
+        android:layout_marginLeft="16dp"
14
+        android:layout_marginRight="16dp"
15
+        app:layout_constraintLeft_toLeftOf="parent"
16
+        app:layout_constraintTop_toTopOf="parent" />
17
+
18
+    <TextView
19
+        android:id="@+id/tv_reset"
20
+        android:layout_width="0dp"
21
+        android:layout_height="wrap_content"
22
+        android:layout_marginLeft="16dp"
23
+        android:layout_marginTop="20dp"
24
+        android:layout_marginRight="3dp"
25
+        android:background="@drawable/shape_line_999999_50dp"
26
+        android:gravity="center"
27
+        android:paddingTop="10dp"
28
+        android:paddingBottom="10dp"
29
+        android:text="重置"
30
+        android:textColor="@color/black_333333"
31
+        android:textSize="17sp"
32
+        app:layout_constraintLeft_toLeftOf="parent"
33
+        app:layout_constraintRight_toLeftOf="@+id/tv_confirm"
34
+        app:layout_constraintTop_toBottomOf="@+id/rv_type_item" />
35
+
36
+    <TextView
37
+        android:id="@+id/tv_confirm"
38
+        android:layout_width="0dp"
39
+        android:layout_height="wrap_content"
40
+        android:layout_marginLeft="3dp"
41
+        android:layout_marginRight="16dp"
42
+        android:background="@drawable/shape_fe0032_50dp"
43
+        android:gravity="center"
44
+        android:paddingTop="10dp"
45
+        android:paddingBottom="10dp"
46
+        android:text="确定"
47
+        android:textColor="@color/white"
48
+        android:textSize="17sp"
49
+        app:layout_constraintLeft_toRightOf="@+id/tv_reset"
50
+        app:layout_constraintRight_toRightOf="parent"
51
+        app:layout_constraintTop_toTopOf="@+id/tv_reset" />
52
+
53
+    <View
54
+        android:id="@+id/view_bg"
55
+        android:layout_width="match_parent"
56
+        android:layout_height="0dp"
57
+        android:layout_marginTop="25dp"
58
+        android:alpha="0.5"
59
+        android:background="@color/black"
60
+        app:layout_constraintBottom_toBottomOf="parent"
61
+        app:layout_constraintTop_toBottomOf="@+id/tv_reset"
62
+        app:layout_constraintVertical_weight="1" />
63
+</androidx.constraintlayout.widget.ConstraintLayout>

BIN
app/src/main/res/mipmap-xxxhdpi/icon_withdraw.png


+ 1 - 0
app/src/main/res/values/colors.xml

@@ -17,6 +17,7 @@
17 17
     <color name="black_737373">#737373</color>
18 18
     <color name="white">#FFFFFFFF</color>
19 19
     <color name="white_f8f8f8">#F8F8F8</color>
20
+    <color name="white_f7f7f7">#F7F7F7</color>
20 21
     <color name="org_f88726">#f88726</color>
21 22
 
22 23
     <color name="translate">#00000000</color>