Administrator 2 vuotta sitten
vanhempi
commit
2da2c8e0e0
67 muutettua tiedostoa jossa 877 lisäystä ja 2875 poistoa
  1. 9 0
      .idea/misc.xml
  2. 0 20
      app/src/main/java/com/hdl/xl/bean/AddressListBean.kt
  3. 3 1
      app/src/main/java/com/hdl/xl/bean/BannerBean.kt
  4. 9 0
      app/src/main/java/com/hdl/xl/bean/CalendarListBean.kt
  5. 9 0
      app/src/main/java/com/hdl/xl/bean/CertificateBean.kt
  6. 38 0
      app/src/main/java/com/hdl/xl/bean/CollectionDetailBean.kt
  7. 27 0
      app/src/main/java/com/hdl/xl/bean/CollectionListBean.kt
  8. 13 0
      app/src/main/java/com/hdl/xl/bean/LoginOutEvent.java
  9. 44 7
      app/src/main/java/com/hdl/xl/bean/PersonalBean.kt
  10. 60 114
      app/src/main/java/com/hdl/xl/service/HttpApi_xie.kt
  11. 0 114
      app/src/main/java/com/hdl/xl/ui/activitys/ActivityAddShippingAddress.kt
  12. 121 3
      app/src/main/java/com/hdl/xl/ui/activitys/ActivityCollectionDetail.kt
  13. 0 77
      app/src/main/java/com/hdl/xl/ui/activitys/ActivityDetailsFirst.kt
  14. 0 81
      app/src/main/java/com/hdl/xl/ui/activitys/ActivityEditBankCard.kt
  15. 4 3
      app/src/main/java/com/hdl/xl/ui/activitys/ActivityForgetPassword.kt
  16. 0 81
      app/src/main/java/com/hdl/xl/ui/activitys/ActivityMyBankCard.kt
  17. 0 200
      app/src/main/java/com/hdl/xl/ui/activitys/ActivityProductCategory.kt
  18. 67 22
      app/src/main/java/com/hdl/xl/ui/activitys/ActivityRegistration.kt
  19. 0 73
      app/src/main/java/com/hdl/xl/ui/activitys/ActivityShippingAddress.kt
  20. 36 6
      app/src/main/java/com/hdl/xl/ui/activitys/MainActivity.kt
  21. 2 4
      app/src/main/java/com/hdl/xl/ui/activitys/SplashActivity.kt
  22. 5 3
      app/src/main/java/com/hdl/xl/ui/adapter/CommodityAdapter.kt
  23. 4 4
      app/src/main/java/com/hdl/xl/ui/adapter/CommodityFenAdapter.kt
  24. 1 1
      app/src/main/java/com/hdl/xl/ui/adapter/ImageAdapter.java
  25. 2 6
      app/src/main/java/com/hdl/xl/ui/adapter/InnerSaleAdapter.kt
  26. 2 6
      app/src/main/java/com/hdl/xl/ui/adapter/OutSaleAdapter.kt
  27. 2 6
      app/src/main/java/com/hdl/xl/ui/adapter/RecommendAdapter.kt
  28. 0 27
      app/src/main/java/com/hdl/xl/ui/adapter/ShippingAddressAdapter.kt
  29. 7 11
      app/src/main/java/com/hdl/xl/ui/adapter/holder/CommodityFenHolder.kt
  30. 9 5
      app/src/main/java/com/hdl/xl/ui/adapter/holder/CommodityHolder.kt
  31. 56 10
      app/src/main/java/com/hdl/xl/ui/adapter/holder/InnerSaleHolder.kt
  32. 8 16
      app/src/main/java/com/hdl/xl/ui/adapter/holder/OutSaleHolder.kt
  33. 14 10
      app/src/main/java/com/hdl/xl/ui/adapter/holder/RecommendHolder.kt
  34. 0 65
      app/src/main/java/com/hdl/xl/ui/adapter/holder/ShippingAddressHolder.kt
  35. 0 141
      app/src/main/java/com/hdl/xl/ui/dialogs/DialogSelectProductSpecifications.kt
  36. 0 1
      app/src/main/java/com/hdl/xl/ui/fragments/BrandFragment.kt
  37. 24 24
      app/src/main/java/com/hdl/xl/ui/fragments/FragmentCollection.kt
  38. 0 151
      app/src/main/java/com/hdl/xl/ui/fragments/FragmentCommidity.kt
  39. 0 82
      app/src/main/java/com/hdl/xl/ui/fragments/FragmentDetail.kt
  40. 59 34
      app/src/main/java/com/hdl/xl/ui/fragments/FragmentRecommend.kt
  41. 56 9
      app/src/main/java/com/hdl/xl/ui/fragments/HomeFragment.kt
  42. 12 11
      app/src/main/java/com/hdl/xl/ui/fragments/MineFragment.kt
  43. 16 12
      app/src/main/java/com/hdl/xl/viewModels/LoginViewModel.kt
  44. 5 0
      app/src/main/res/drawable/bg_gray_set.xml
  45. 0 161
      app/src/main/res/layout/activity_add_shipping_address.xml
  46. 35 22
      app/src/main/res/layout/activity_collection_detail.xml
  47. 0 81
      app/src/main/res/layout/activity_details_first.xml
  48. 0 122
      app/src/main/res/layout/activity_edit_bank_card.xml
  49. 0 6
      app/src/main/res/layout/activity_forget_password.xml
  50. 0 87
      app/src/main/res/layout/activity_my_bank_card.xml
  51. 0 262
      app/src/main/res/layout/activity_product_category.xml
  52. 3 1
      app/src/main/res/layout/activity_registration.xml
  53. 0 47
      app/src/main/res/layout/activity_shipping_address.xml
  54. 0 137
      app/src/main/res/layout/dialog_select_product_specifications.xml
  55. 0 334
      app/src/main/res/layout/fragment_commidity.xml
  56. 0 34
      app/src/main/res/layout/fragment_detail.xml
  57. 5 12
      app/src/main/res/layout/home_fragment.xml
  58. 1 0
      app/src/main/res/layout/item_commodity.xml
  59. 93 4
      app/src/main/res/layout/item_inner_sale.xml
  60. 1 0
      app/src/main/res/layout/item_out_sale.xml
  61. 8 4
      app/src/main/res/layout/item_recommend.xml
  62. 0 113
      app/src/main/res/layout/item_shipping_address.xml
  63. 2 2
      app/src/main/res/layout/mine_fragment.xml
  64. 1 1
      app/src/main/res/values/colors.xml
  65. 2 1
      basekt/src/main/java/com/laike/basekt/bean/CommonResultStatusEntity.kt
  66. 1 1
      basekt/src/main/java/com/laike/basekt/coremodel/datemodel/client/RetrofitInitialization.kt
  67. 1 2
      basekt/src/main/java/com/laike/basekt/coremodel/datemodel/common/ApiConstants.java

+ 9 - 0
.idea/misc.xml

@@ -55,6 +55,7 @@
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_consignment.xml" value="0.3605" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_dialog_edit_infor_sel.xml" value="0.3605" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_finish_button.xml" value="0.3605" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_gray_set.xml" value="0.3655" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_home_second_pwd.xml" value="0.3605" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_home_top.xml" value="0.3605" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_input_frame.xml" value="0.347" />
@@ -83,16 +84,20 @@
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_add_shipping_address.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_collection_detail.xml" value="0.3185121846943138" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_details_first.xml" value="0.33133817870884996" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_edit_bank_card.xml" value="0.2599401453612655" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_edit_password.xml" value="0.3828125" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_forget_password.xml" value="0.30055579307396324" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_give_away.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_input_return.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_login.xml" value="0.3317657118426678" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_main.xml" value="0.327445652173913" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_my_bank_card.xml" value="0.2599401453612655" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_product_category.xml" value="0.2599401453612655" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_refund_detail.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_registration.xml" value="0.30055579307396324" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_resale.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_resale_success.xml" value="0.33133817870884996" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_shipping_address.xml" value="0.16502778965369816" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_splash.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/brand_fragment.xml" value="0.2834544677212484" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/dialog_edit_info.xml" value="0.33133817870884996" />
@@ -100,6 +105,8 @@
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/dialog_give_away_success.xml" value="0.3185121846943138" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/dialog_second_password.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/dialog_select_product_specifications.xml" value="0.33133817870884996" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/fragment_commidity.xml" value="0.16502778965369816" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/fragment_detail.xml" value="0.16502778965369816" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/fragment_recommend.xml" value="0.2834544677212484" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/home_fragment.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/include_title_bar.xml" value="0.33133817870884996" />
@@ -108,6 +115,7 @@
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_brand.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_city.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_commodity.xml" value="0.3185121846943138" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_commodity_fen.xml" value="0.2821718683197948" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_commodity_recommend.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_inner_dou_sale.xml" value="0.3185121846943138" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_inner_sale.xml" value="0.3185121846943138" />
@@ -115,6 +123,7 @@
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_order_outer.xml" value="0.3059836808703536" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_out_sale.xml" value="0.3185121846943138" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_recommend.xml" value="0.3185121846943138" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_shipping_address.xml" value="0.16502778965369816" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_voucher_picture.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/mine_fragment.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/sort_fragment.xml" value="0.2834544677212484" />

+ 0 - 20
app/src/main/java/com/hdl/xl/bean/AddressListBean.kt

@@ -1,20 +0,0 @@
-package com.hdl.xl.bean
-
-import java.io.Serializable
-import java.util.*
-
-/**
- * @Description:
- * @Author: wuxing
- * @Date: 2021/3/17 11:51
- */
-class AddressListBean:Serializable,Observable() {
-    var addr: String?=""
-    var address_id: Int?=0
-    var city: String?=""
-    var district: String?=""
-    var is_default: Int?=0
-    var person: String?=""
-    var phone: String?=""
-    var province: String?=""
-}

+ 3 - 1
app/src/main/java/com/hdl/xl/bean/BannerBean.kt

@@ -9,5 +9,7 @@ import java.util.*
  * @Date: 2020/7/16 16:24
  */
 class BannerBean:Serializable,Observable() {
-    var image: String?=""
+    var id:Int?=0
+    var name:String?=""
+    var cover:String?=""
 }

+ 9 - 0
app/src/main/java/com/hdl/xl/bean/CalendarListBean.kt

@@ -0,0 +1,9 @@
+package com.hdl.xl.bean
+
+import java.io.Serializable
+import java.util.*
+
+class CalendarListBean : Serializable, Observable() {
+    var date: String? = ""
+    var list: MutableList<CollectionListBean> ? = null
+}

+ 9 - 0
app/src/main/java/com/hdl/xl/bean/CertificateBean.kt

@@ -0,0 +1,9 @@
+package com.hdl.xl.bean
+
+import java.io.Serializable
+import java.util.*
+
+class CertificateBean : Serializable, Observable() {
+    var link:String?=""
+    var name:String?=""
+}

+ 38 - 0
app/src/main/java/com/hdl/xl/bean/CollectionDetailBean.kt

@@ -0,0 +1,38 @@
+package com.hdl.xl.bean
+
+import java.io.Serializable
+import java.util.*
+
+class CollectionDetailBean : Serializable, Observable() {
+    var id:Int?=0
+    var cover:String?=""
+    var name:String?=""
+    var label:String?=""
+    var type:Int?=0
+    var price:String?=""
+    var inventory:Int?=0
+    var now_inventory:String?=""
+    var state:Int?=0
+    var sell_time:String?=""
+    var describe:MutableList<String>?=null
+    var buy_count:Int?=0
+    var instructions:String?=""
+    var buy_notice:String?=""
+    var warm_prompt:String?=""
+    var auth_img:String?=""
+    var auth_name:String?=""
+    var share_img:String?=""
+    var intro:String?=""
+    var detail_img:String?=""
+    var format:String?=""
+    var advance_info:String?=""
+    var issue_mode:Int?=0
+    var apply_st:String?=""
+    var apply_end:String?=""
+    var is_task:Int?=0
+    var has_apply:Int?=0
+    var apply_code:String?=""
+    var ballot_status:Int?=0
+    var all_apply:Int?=0
+    var is_remind:Boolean?=false
+}

+ 27 - 0
app/src/main/java/com/hdl/xl/bean/CollectionListBean.kt

@@ -0,0 +1,27 @@
+package com.hdl.xl.bean
+
+import java.io.Serializable
+import java.util.*
+
+class CollectionListBean : Serializable, Observable() {
+    var id: Int? = 0
+    var cover: String? = ""
+    var name: String? = ""
+    var label: String? = ""
+    var price: String? = ""
+    var inventory: Int? = 0
+    var now_inventory: String? = ""
+    var state: Int? = 0
+    var sell_time: String? = ""
+    var advance_info: String? = ""
+    var issue_mode: Int? = 0
+    var auth_name: String? = ""
+    var auth_img: String? = ""
+    var apply_st: String? = ""
+    var is_remind: Boolean? = false
+
+
+    var date:String?=""
+    var time:String?=""
+
+}

+ 13 - 0
app/src/main/java/com/hdl/xl/bean/LoginOutEvent.java

@@ -0,0 +1,13 @@
+package com.hdl.xl.bean;
+
+public class LoginOutEvent {
+    public String msg;
+
+    public LoginOutEvent(String msg) {
+        this.msg = msg;
+    }
+
+    public LoginOutEvent() {
+        this.msg = "";
+    }
+}

+ 44 - 7
app/src/main/java/com/hdl/xl/bean/PersonalBean.kt

@@ -8,11 +8,48 @@ import java.util.*
  * @Author: wuxing
  * @Date: 2021/3/10 17:14
  */
-class PersonalBean:Serializable,Observable() {
-    var head: String?=""
-    var id: Int?=0
-    var money: String?=""
-    var money_red: String?=""
-    var name: String?=""
-    var phone: String?=""
+class PersonalBean : Serializable, Observable() {
+    var head: String? = ""
+    var id: Int? = 0
+    var money: String? = ""
+    var money_red: String? = ""
+    var name: String? = ""
+    var phone: String? = ""
+
+
+    var headimg:String?=""
+    var openid:String?=""
+
+    var pid: Int? = 0
+    var status: Int? = 0
+    var accountName:String?=""
+    var wallet_address:String?=""
+    var is_open_official_DDC: Int? = 0
+    var snap_card: Int? = 0
+    var examples_number: Int? = 0
+    var vip: Int? = 0
+    var is_deleted: Int? = 0
+    var create_at:String?=""
+    var offline_account:String?=""
+    var update_at:String?=""
+    var integral: Int? = 0
+    var true_name:String?=""
+    var id_card:String?=""
+    var is_auth: Int? = 0
+    var auth_at:String?=""
+    var group: Int? = 0
+    var invite_img:String?=""
+    var invite_address:String?=""
+    var lottery_number: Int? = 0
+    var zfb_account:String?=""
+    var zfb_real_name:String?=""
+    var buy_time:String?=""
+    var invite_code:String?=""
+    var lock_st: Int? = 0
+    var lock_end:String?=""
+    var vip_name:String?=""
+    var is_order_no_paid:Boolean?=false
+    var is_sign:Boolean?=false
+    var lucky_number: Int? = 0
+
 }

+ 60 - 114
app/src/main/java/com/hdl/xl/service/HttpApi_xie.kt

@@ -1,14 +1,13 @@
 package com.hdl.xl.service
 
-import com.hdl.xl.bean.GoodsBean
+import com.hdl.xl.bean.*
 import com.laike.basekt.bean.CommonResultEntity2
 import com.laike.basekt.bean.CommonResultStatusEntity
-import com.hdl.xl.bean.LoginEntity
-import com.hdl.xl.bean.MiaoshaBean
 import com.laike.basekt.bean.CommonResultEntity
 import io.reactivex.Observable
 import retrofit2.http.Field
 import retrofit2.http.FormUrlEncoded
+import retrofit2.http.Header
 import retrofit2.http.POST
 
 /**
@@ -17,87 +16,86 @@ import retrofit2.http.POST
  * @Date: 2021/1/27 15:15
  */
 interface HttpApi_xie {
+    @POST("api/Index/getBanner")
+    fun getBanner(
+        @Header("Authorization") Authorization: String
+    ): Observable<CommonResultEntity<BannerBean>>
+
     /**
-     * 用户个人中心
+     * 首页藏品列表
      */
     @FormUrlEncoded
-    @POST("api/User/index")
-    fun searchPersonalCenter(
-        @Field("token") token: String
-    ): Observable<CommonResultEntity2<com.hdl.xl.bean.PersonalBean>>
+    @POST("api/Index/indexCollectionList")
+    fun indexCollectionList(
+        @Header("Authorization") Authorization: String,
+        @Field("type") type: Int,
+        @Field("issue_mode") issue_mode: Int
+    ): Observable<CommonResultEntity<CollectionListBean>>
 
     /**
-     * 用户银行卡
+     * 发售日历
      */
     @FormUrlEncoded
-    @POST("api/User/user_bankcark")
-    fun searchBankCard(
-        @Field("token") token: String
-    ): Observable<CommonResultEntity<com.hdl.xl.bean.BankCardBean>>
+    @POST("api/Index/CollectionCalendar")
+    fun CollectionCalendar(
+        @Header("Authorization") Authorization: String,
+        @Field("type") type: Int
+    ): Observable<CommonResultEntity<CalendarListBean>>
 
     /**
-     * 用户添加银行卡
+     * 设置提醒
      */
     @FormUrlEncoded
-    @POST("api/User/user_bankcark_add")
-    fun addBankCard(
-        @Field("token") token: String,
-        @Field("name") name: String,
-        @Field("bankname") bankname: String,
-        @Field("bankcard_number") bankcard_number: String
-    ): Observable<CommonResultStatusEntity>
+    @POST("api/Index/setRemind")
+    fun setRemind(
+        @Header("Authorization") Authorization: String,
+        @Field("id") id: Int
+    ): Observable<CommonResultEntity<CalendarListBean>>
 
     /**
-     * 添加收货地址
+     * 藏品详情
      */
     @FormUrlEncoded
-    @POST("api/User/address_add")
-    fun addAddr(
-        @Field("token") token: String,
-        @Field("person") person: String,
-        @Field("phone") phone: String,
-        @Field("province") province: String,
-        @Field("city") city: String,
-        @Field("district") district: String,
-        @Field("addr") addr: String,
-        @Field("is_default") is_default: Int
-    ): Observable<CommonResultStatusEntity>
+    @POST("api/Index/CollectionDetail")
+    fun CollectionDetail(
+        @Header("Authorization") Authorization: String,
+        @Field("id") id: Int
+    ): Observable<CommonResultEntity2<CollectionDetailBean>>
 
     /**
-     * 收货地址列表
+     * 认证信息
      */
-    @FormUrlEncoded
-    @POST("api/User/address_add")
-    fun addraList(
-        @Field("token") token: String
-    ): Observable<CommonResultEntity<com.hdl.xl.bean.AddressListBean>>
+    @POST("api/Index/certificate")
+    fun certificate(
+        @Header("Authorization") Authorization: String
+    ): Observable<CommonResultEntity2<CertificateBean>>
 
     /**
-     * 删除收货地址
+     * 获取个人信息
      */
-    @FormUrlEncoded
-    @POST("api/User/address_add")
-    fun deleteAddr(
-        @Field("token") token: String,
-        @Field("address_id") address_id: Int
-    ): Observable<CommonResultStatusEntity>
+    @POST("api/User_center/getUserInfo")
+    fun getUserInfo(
+        @Header("Authorization") Authorization: String
+    ): Observable<CommonResultEntity2<PersonalBean>>
+
     /**
      * 登录接口
      */
     @FormUrlEncoded
-    @POST("api/login/login")
+    @POST("api/Login/passwordLogin")
     fun phoneLogin(
         @Field("phone") phone: String,
-        @Field("pwd") pwd: String
-    ): Observable<CommonResultEntity2<LoginEntity>>
+        @Field("password") password: String
+    ): Observable<CommonResultStatusEntity>
 
     /**
-     * 注册发送验证码
+     * 发送验证码
      */
     @FormUrlEncoded
-    @POST("api/Login/register_yzm")
+    @POST("api/Sms/send")
     fun codeRegistered(
-        @Field("phone") phone: String
+        @Field("phone") phone: String,
+        @Field("event") event: String
     ): Observable<CommonResultStatusEntity>
 
     /**
@@ -116,78 +114,26 @@ interface HttpApi_xie {
     @POST("api/Login/register")
     fun registered(
         @Field("phone") phone: String,
-        @Field("pwd") pwd: String,
-        @Field("pwd_cf") pwd_cf: String,
-        @Field("check_code") check_code: String,
-        @Field("code") code: String
+        @Field("ver_code") ver_code: String,
+        @Field("password") password: String,
+        @Field("confirm_password") confirm_password: String,
+        @Field("second_password") second_password: String,
+        @Field("confirm_second_password") confirm_second_password: String,
+        @Field("invite_code") invite_code: String
     ): Observable<CommonResultStatusEntity>
 
     /**
      * 用户忘记密码
      */
     @FormUrlEncoded
-    @POST("api/Login/forget")
+    @POST("api/Login/ForgetPassword")
     fun forgetPassword(
         @Field("phone") phone: String,
-        @Field("pwd") pwd: String,
-        @Field("pwd_cf") pwd_cf: String,
-        @Field("code") code: String
+        @Field("password") password: String,
+        @Field("confirm_password") confirm_password: String,
+        @Field("ver_code") ver_code: String
     ): Observable<CommonResultStatusEntity>
 
-    /**
-     * 用户首页
-     */
-    @FormUrlEncoded
-    @POST("api/Index/index")
-    fun searchHome(
-        @Field("token") token: String
-    ): Observable<CommonResultEntity2<com.hdl.xl.bean.HomeBean>>
-
-    /**
-     * 秒杀商品列表
-     */
-    @FormUrlEncoded
-    @POST("api/Index/miaosha_list")
-    fun searchMiaoSha(
-        @Field("page") page: Int,
-        @Field("limit") limit: Int
-    ): Observable<CommonResultEntity<MiaoshaBean>>
-
-    /**
-     * 商品列表
-     */
-    @FormUrlEncoded
-    @POST("api/Index/goods_list")
-    fun searchGoodsList(
-        @Field("key_word") key_word: String,
-        @Field("category") category: String,
-        @Field("shop_id") shop_id: String,
-        @Field("user_id") user_id: Int,
-        @Field("sort") sort: Int,
-        @Field("page") page: Int,
-        @Field("limit") limit: Int
-    ): Observable<CommonResultEntity<GoodsBean>>
 
-    /**
-     * 商品详情
-     */
-    @FormUrlEncoded
-    @POST("api/Index/goods_info")
-    fun searchGoodsDetail(
-        @Field("goods_id") goods_id: String,
-        @Field("user_id") user_id: Int
-    ): Observable<CommonResultEntity2<com.hdl.xl.bean.GoodsDetailBean>>
-
-    /**
-     * 添加购物车(添加进货单)
-     */
-    @FormUrlEncoded
-    @POST("api/Cart/intocart")
-    fun joinPurchaseOrder(
-        @Field("token") token: String,
-        @Field("goods_id") goods_id: String,
-        @Field("shop_id") shop_id: String,
-        @Field("specs_info") specs_info: String
-    ): Observable<CommonResultStatusEntity>
 
 }

+ 0 - 114
app/src/main/java/com/hdl/xl/ui/activitys/ActivityAddShippingAddress.kt

@@ -1,114 +0,0 @@
-package com.hdl.xl.ui.activitys
-
-import android.annotation.SuppressLint
-import android.os.Bundle
-import android.util.Log
-import android.view.View
-import androidx.databinding.DataBindingUtil
-import cn.leyihang.base.utils.ToastUtils
-import com.hdl.xl.R
-import com.hdl.xl.databinding.ActivityAddShippingAddressBinding
-import com.hdl.xl.service.HttpApi_xie
-import com.laike.basekt.BaseActivity
-import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
-import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
-import com.laike.basekt.utils.DialogUtil
-import com.laike.basekt.utils.HawkConstant
-import com.laike.basekt.utils.StatusBarCommon
-
-
-import com.orhanobut.hawk.Hawk
-
-/**
- * @Description:
- * @Author: wuxing
- * @Date: 2021/1/27 16:42
- */
-
-class ActivityAddShippingAddress : BaseActivity(), View.OnClickListener {
-    var mBinding: ActivityAddShippingAddressBinding? = null
-    var type: Int? = 0
-    var person = ""
-    var phone = ""
-    var province = ""
-    var city = ""
-    var district = ""
-    var addr = ""
-    var is_default = 0
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        type = intent.getIntExtra("type", 0)
-        mBinding = DataBindingUtil.setContentView(mActivity, R.layout.activity_add_shipping_address)
-        mBinding?.run {
-            clickListener = this@ActivityAddShippingAddress
-            includeTitle?.run {
-                if (type == 1) {
-                    textTitleTitle.text = "新增收货地址"
-                } else if (type == 2) {
-                    textTitleTitle.text = "修改收货地址"
-                }
-                layoutTitle.setPadding(0, StatusBarCommon.findStatusBarHeight(mActivity), 0, 0)
-            }
-        }
-    }
-
-    //新增收货地址
-    @SuppressLint("CheckResult")
-    fun addShouAddr() {
-        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .addAddr(
-                Hawk.get(HawkConstant.TOKEN),
-                person,
-                phone,
-                province,
-                city,
-                district,
-                addr,
-                is_default
-            )
-            .compose(RxSchedulers.applySchedulers())
-            .subscribe({
-                ToastUtils.toast(it.msg)
-                if (it.code == 200) {
-                    finish()
-                }
-            }, {
-                Log.e("addShouAddr", it.message.toString())
-            })
-    }
-
-    override fun onClick(v: View?) {
-        if (mBinding?.switchBtn?.isChecked == true){
-            is_default=1
-        }else{
-            is_default=0
-        }
-        person = mBinding?.inputUserName?.text.toString()
-        phone = mBinding?.inputPhone?.text.toString()
-        addr = mBinding?.inputAddress?.text.toString()
-        when (v?.id) {
-            R.id.go_back -> {
-                finish()
-            }
-            R.id.select_address -> {
-                DialogUtil.with(mContext).showCityPicker { citys, _ ->
-                    mBinding?.address?.text =
-                        citys[0].name + "-" + citys[1].name + "-" + citys[2].name
-
-                    province = citys[0].name
-                    city = citys[1].name
-                    district = citys[2].name
-                }
-            }
-            R.id.confirm_button -> {
-                if (person.isNullOrEmpty() || phone.isNullOrEmpty() || addr.isNullOrEmpty() || province.isNullOrEmpty()) {
-                    ToastUtils.toast("请将信息填写完整")
-                }else{
-                    if (type==1){
-                        addShouAddr()
-                    }
-                }
-            }
-        }
-    }
-}

+ 121 - 3
app/src/main/java/com/hdl/xl/ui/activitys/ActivityCollectionDetail.kt

@@ -1,15 +1,31 @@
 package com.hdl.xl.ui.activitys
 
+import android.annotation.SuppressLint
+import android.os.Build
 import android.os.Bundle
+import android.text.ClipboardManager
+import android.util.Log
 import android.view.View
+import android.widget.Toast
 import androidx.databinding.DataBindingUtil
-import androidx.recyclerview.widget.GridLayoutManager
+import com.bumptech.glide.Glide
 import com.hdl.xl.R
+import com.hdl.xl.bean.BannerBean
 import com.hdl.xl.databinding.ActivityCollectionDetailBinding
+import com.hdl.xl.service.HttpApi_xie
+import com.hdl.xl.ui.adapter.ImageAdapter
 import com.hdl.xl.ui.adapter.VoucherPictureAdapter
 import com.laike.basekt.BaseActivity
+import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
+import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
 import com.laike.basekt.extension.startKtActivityOrForResult
+import com.laike.basekt.utils.HawkConstant
 import com.laike.basekt.utils.StatusBarCommon
+import com.orhanobut.hawk.Hawk
+import com.youth.banner.Banner
+import com.youth.banner.indicator.CircleIndicator
+import com.youth.banner.listener.OnBannerListener
+
 
 /**
  * @Description:藏品详情
@@ -17,13 +33,16 @@ import com.laike.basekt.utils.StatusBarCommon
  * @Date: 2022/7/12 19:42
  */
 
-class ActivityCollectionDetail : BaseActivity(), View.OnClickListener {
+class ActivityCollectionDetail : BaseActivity(), View.OnClickListener,
+    OnBannerListener<BannerBean> {
     var mBinding: ActivityCollectionDetailBinding? = null
     var mAdapter = VoucherPictureAdapter()
     var type = ""
+    var id: Int? = 0
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         type = intent?.getStringExtra("type").toString()
+        id = intent?.getIntExtra("id", 0)
         mBinding =
             DataBindingUtil.setContentView(mActivity, R.layout.activity_collection_detail)
         mBinding?.run {
@@ -32,7 +51,8 @@ class ActivityCollectionDetail : BaseActivity(), View.OnClickListener {
                 textTitleTitle.text = "藏品详情"
                 layoutTitle.setPadding(0, StatusBarCommon.findStatusBarHeight(mActivity), 0, 0)
             }
-
+            CollectionCalendar()
+            certificate()
             if ("fragmentCollect" == type) {
                 linearZhuanshou.visibility = View.VISIBLE
             } else if ("fragmentConsignment" == type) {
@@ -43,6 +63,67 @@ class ActivityCollectionDetail : BaseActivity(), View.OnClickListener {
         }
     }
 
+    var link=""
+    @SuppressLint("CheckResult")
+    fun certificate() {
+        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
+            .certificate(Hawk.get(HawkConstant.TOKEN))
+            .compose(RxSchedulers.applySchedulers())
+            .subscribe({
+                if (it.code == 1) {
+                    mBinding?.run {
+                        var bean = it?.data
+                        certiName.text = bean?.name
+                        refundBtn.text = bean?.link
+                        link=bean?.link?:""
+                    }
+                }
+            }, {
+                Log.e("certificate", it.message.toString())
+            })
+    }
+
+    @SuppressLint("CheckResult")
+    fun CollectionCalendar() {
+        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
+            .CollectionDetail(Hawk.get(HawkConstant.TOKEN), id ?: 0)
+            .compose(RxSchedulers.applySchedulers())
+            .subscribe({
+                if (it.code == 1) {
+                    mBinding?.run {
+                        var bean = it?.data
+                        Glide.with(mContext).load(bean?.cover).into(ivCover)
+                        nameText.text = bean?.name
+                        saleNum.text = "发售量 " + bean?.inventory
+
+                        inStockNum.text = "在售量 " + bean?.now_inventory
+
+
+                        var list: MutableList<BannerBean> = ArrayList()
+                        bean?.describe?.forEach {
+                            var be = BannerBean()
+                            be.cover = it
+                            list.add(be)
+
+                        }
+                        makeBannerImages(
+                            list,
+                            mBinding?.bXiangce as Banner<BannerBean, ImageAdapter>
+                        )
+
+                        saleNameText.text = bean?.auth_name
+                        saleTime.text = bean?.sell_time
+                        recordInfoText.text = bean?.instructions
+                        buyNoticeText.text = bean?.buy_notice
+                        priceText.text = "¥" + bean?.price
+                    }
+                }
+            }, {
+                Log.e("CollectionDetail", it.message.toString())
+            })
+    }
+
+
     override fun onClick(v: View?) {
         var bundle = Bundle()
         when (v?.id) {
@@ -55,6 +136,43 @@ class ActivityCollectionDetail : BaseActivity(), View.OnClickListener {
             R.id.resale_button -> {
                 startKtActivityOrForResult<ActivityResale>()
             }
+            R.id.copy_btn->{
+                val sdkInt = Build.VERSION.SDK_INT
+                if (sdkInt > Build.VERSION_CODES.HONEYCOMB) {
+                    val copy = this@ActivityCollectionDetail
+                        .getSystemService(CLIPBOARD_SERVICE) as android.content.ClipboardManager
+                    copy.text = link
+                    Toast.makeText(
+                        this, "成功复制到粘贴板",
+                        Toast.LENGTH_SHORT
+                    ).show()
+                } else if (sdkInt <= Build.VERSION_CODES.HONEYCOMB) {
+                    val copyq = this
+                        .getSystemService(CLIPBOARD_SERVICE) as android.text.ClipboardManager
+                    copyq.text = link
+                    Toast.makeText(
+                        this, "成功复制到粘贴板",
+                        Toast.LENGTH_SHORT
+                    ).show()
+                }
+            }
         }
     }
+
+    /**
+     * 创建轮播图数据
+     */
+    private fun makeBannerImages(
+        info: MutableList<BannerBean>,
+        bXiangce: Banner<BannerBean, ImageAdapter>
+    ) {
+        bXiangce.adapter = ImageAdapter(info)
+        bXiangce.indicator = CircleIndicator(mActivity)
+        bXiangce.setIndicatorNormalColorRes(R.color.white)
+        bXiangce.setIndicatorSelectedColorRes(R.color.white)
+        bXiangce.setOnBannerListener(this)
+        bXiangce.isAutoLoop(true)//自动轮播
+    }
+
+    override fun OnBannerClick(data: BannerBean?, position: Int) {}
 }

+ 0 - 77
app/src/main/java/com/hdl/xl/ui/activitys/ActivityDetailsFirst.kt

@@ -1,77 +0,0 @@
-package com.hdl.xl.ui.activitys
-
-import android.os.Bundle
-import android.view.View
-import androidx.databinding.DataBindingUtil
-import androidx.fragment.app.Fragment
-import com.laike.basekt.BaseActivity
-import com.laike.basekt.FragmentAdapter
-import com.laike.basekt.utils.StatusBarCommon
-import com.hdl.xl.R
-import com.hdl.xl.databinding.ActivityDetailsFirstBinding
-import com.hdl.xl.ui.fragments.FragmentCommidity
-import com.hdl.xl.ui.fragments.FragmentDetail
-
-/**
- * @Description:
- * @Author: wuxing
- * @Date: 2021/1/30 14:42
- */
-
-class ActivityDetailsFirst : BaseActivity(), View.OnClickListener {
-    var mBinding: ActivityDetailsFirstBinding? = null
-    var type = 0  //1限时秒杀   2普通
-    lateinit var titles: Array<String>
-    val fragments: MutableList<Fragment> = ArrayList()
-    var mFragmentOrder = FragmentCommidity()
-    var mFragmentDetail= FragmentDetail()
-
-    var goods_id:String?=""
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        type = intent.getIntExtra("type", 0)
-        goods_id = intent.getStringExtra("goods_id")
-        mBinding = DataBindingUtil.setContentView(mActivity, R.layout.activity_details_first)
-        mBinding?.run {
-            clickListener = this@ActivityDetailsFirst
-            layoutTitle.setPadding(0, StatusBarCommon.findStatusBarHeight(mActivity), 0, 0)
-            titles= arrayOf("商品","详情")
-            loadFragment(type,goods_id?:"")
-            loadFragmentDetail(goods_id?:"")
-            val fragmentAdapter = FragmentAdapter(supportFragmentManager, fragments, titles)
-            viewPagerId.adapter = fragmentAdapter
-            tabLayout.setupWithViewPager(viewPagerId)
-            viewPagerId.offscreenPageLimit = 2
-            viewPagerId.currentItem = 0
-        }
-    }
-
-    fun loadFragmentDetail(id:String) {
-        fragments.add(FragmentDetail().apply {
-            mFragmentDetail=this
-            arguments=Bundle().apply {
-                putString(FragmentDetail.AGRS_GOODS_ID,id)
-            }
-        })
-    }
-
-    fun loadFragment(key:Int,id:String) {
-        fragments.add(FragmentCommidity().apply {
-            mFragmentOrder = this
-            arguments = Bundle().apply {
-                putInt(FragmentCommidity.AGRS_KEY_TYPE, key)
-                putString(FragmentCommidity.AGRS_GOODS_ID,id)
-            }
-        })
-    }
-
-    override fun onClick(v: View?) {
-        when (v?.id) {
-            R.id.go_back -> {
-                finish()
-            }
-        }
-    }
-
-
-}

+ 0 - 81
app/src/main/java/com/hdl/xl/ui/activitys/ActivityEditBankCard.kt

@@ -1,81 +0,0 @@
-package com.hdl.xl.ui.activitys
-
-import android.app.Activity
-import android.content.Intent
-import android.os.Bundle
-import android.util.Log
-import android.view.View
-import androidx.databinding.DataBindingUtil
-import cn.leyihang.base.utils.ToastUtils
-import com.hdl.xl.R
-import com.hdl.xl.databinding.ActivityEditBankCardBinding
-import com.hdl.xl.service.HttpApi_xie
-import com.laike.basekt.BaseActivity
-import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
-import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
-import com.laike.basekt.extension.newKtDialogFragmentAndShow
-import com.laike.basekt.utils.HawkConstant
-import com.laike.basekt.utils.StatusBarCommon
-import com.orhanobut.hawk.Hawk
-
-/**
- * @Description:
- * @Author: wuxing
- * @Date: 2021/1/27 16:42
- */
-
-class ActivityEditBankCard : BaseActivity(), View.OnClickListener {
-    var mBinding: ActivityEditBankCardBinding? = null
-    var bank_name: String? = ""
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        mBinding = DataBindingUtil.setContentView(mActivity, R.layout.activity_edit_bank_card)
-        mBinding?.run {
-            clickListener = this@ActivityEditBankCard
-            includeTitle?.run {
-                textTitleTitle.text = "编辑银行卡"
-                layoutTitle.setPadding(0, StatusBarCommon.findStatusBarHeight(mActivity), 0, 0)
-            }
-        }
-    }
-
-    fun addBankCard() {
-        mBinding?.run {
-            HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-                .addBankCard(
-                    Hawk.get(HawkConstant.TOKEN),
-                    inputUserName?.text.toString(),
-                    bank_name ?: "",
-                    inputBankCardNum?.text.toString()
-                )
-                .compose(RxSchedulers.applySchedulers())
-                .subscribe({
-                    ToastUtils.toast(it.msg)
-                    if (it.code == 200) {
-                        finish()
-                    }
-                }, {
-                    Log.e("addBankCard", it.message.toString())
-                })
-        }
-    }
-
-    override fun onClick(v: View?) {
-        var intent = Intent()
-        when (v?.id) {
-            R.id.go_back -> {
-                finish()
-            }
-            R.id.select_bank -> {
-                newKtDialogFragmentAndShow<com.hdl.xl.ui.dialogs.SelectBankDialog>().onSelected { s, i ->
-                    bank_name = s
-                    mBinding?.bank?.text = s
-                }
-            }
-            R.id.confirm_button -> {
-                this.setResult(Activity.RESULT_OK, intent)
-                addBankCard()
-            }
-        }
-    }
-}

+ 4 - 3
app/src/main/java/com/hdl/xl/ui/activitys/ActivityForgetPassword.kt

@@ -40,6 +40,7 @@ class ActivityForgetPassword : BaseActivity(), View.OnClickListener {
         }
     }
 
+    @SuppressLint("CheckResult")
     override fun onClick(v: View?) {
         phone = mBinding?.inputPhone?.text.toString()
         code = mBinding?.inputCode?.text.toString()
@@ -55,11 +56,11 @@ class ActivityForgetPassword : BaseActivity(), View.OnClickListener {
                     Toast.makeText(mContext, "请输入11位手机号", Toast.LENGTH_SHORT).show()
                 } else {
                     HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-                        .codeForgetPassword(phone)
+                        .codeRegistered(phone,"forgetpwd")
                         .compose(RxSchedulers.applySchedulers())
                         .subscribe({
                             Toast.makeText(mContext, it.msg, Toast.LENGTH_SHORT).show()
-                            if (it.code == 200) {
+                            if (it.code == 1) {
                                 handler.postDelayed(countDown, 0)
                             }
                         }, { error ->
@@ -88,7 +89,7 @@ class ActivityForgetPassword : BaseActivity(), View.OnClickListener {
     @SuppressLint("CheckResult")
     fun editPhone(phone: String,pwd: String,code: String) {
             HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-                .forgetPassword( phone, pwd,pwd,code)
+                .forgetPassword(phone,pwd,pwd,code)
                 .compose(RxSchedulers.applySchedulers())
                 .subscribe({
                     Log.d(TAG,"修改手机号${it}")

+ 0 - 81
app/src/main/java/com/hdl/xl/ui/activitys/ActivityMyBankCard.kt

@@ -1,81 +0,0 @@
-package com.hdl.xl.ui.activitys
-
-import android.annotation.SuppressLint
-import android.content.Intent
-import android.os.Bundle
-import android.util.Log
-import android.view.View
-import androidx.databinding.DataBindingUtil
-import com.hdl.xl.R
-import com.laike.basekt.BaseActivity
-import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
-import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
-import com.laike.basekt.utils.HawkConstant
-import com.laike.basekt.utils.StatusBarCommon
-
-import com.hdl.xl.databinding.ActivityMyBankCardBinding
-import com.hdl.xl.service.HttpApi_xie
-
-import com.orhanobut.hawk.Hawk
-
-/**
- * @Description:
- * @Author: wuxing
- * @Date: 2021/1/27 16:42
- */
-
-class ActivityMyBankCard : BaseActivity(), View.OnClickListener {
-    var mBinding: ActivityMyBankCardBinding? = null
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        mBinding = DataBindingUtil.setContentView(mActivity, R.layout.activity_my_bank_card)
-        mBinding?.run {
-            clickListener = this@ActivityMyBankCard
-            includeTitle?.run {
-                textTitleTitle.text = "银行卡"
-                textSet.text = "编辑"
-                layoutTitle.setPadding(0, StatusBarCommon.findStatusBarHeight(mActivity), 0, 0)
-            }
-            searchBankCard()
-        }
-    }
-
-    @SuppressLint("CheckResult")
-    fun searchBankCard() {
-        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .searchBankCard(Hawk.get(HawkConstant.TOKEN))
-            .compose(RxSchedulers.applySchedulers())
-            .subscribe({
-                if (it.code == 200) {
-                    var data = it.data?.get(0)
-                    mBinding?.run {
-                        userName.text = data?.name
-                        bank.text = data?.bankname
-                        bankCardNum.text = data?.bankcard_number
-                    }
-                }
-            }, {
-                Log.e("searchBankCard", it.message.toString())
-            })
-    }
-
-    override fun onClick(v: View?) {
-        var intent = Intent()
-        when (v?.id) {
-            R.id.go_back -> {
-                finish()
-            }
-            R.id.text_set -> {
-                intent.setClass(mContext, ActivityEditBankCard::class.java)
-                startActivityForResult(intent, 1)
-            }
-        }
-    }
-
-    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
-        super.onActivityResult(requestCode, resultCode, data)
-        if (requestCode == 1) {
-            searchBankCard()
-        }
-    }
-}

+ 0 - 200
app/src/main/java/com/hdl/xl/ui/activitys/ActivityProductCategory.kt

@@ -1,200 +0,0 @@
-package com.hdl.xl.ui.activitys
-
-import android.annotation.SuppressLint
-import android.content.Context
-import android.content.Intent
-import android.os.Bundle
-import android.util.Log
-import android.view.View
-import androidx.databinding.DataBindingUtil
-import androidx.recyclerview.widget.GridLayoutManager
-import cn.leyihang.base.Launcher
-import com.laike.basekt.BaseActivity
-import com.laike.basekt.extension.startKtActivityOrForResult
-import com.bumptech.glide.Glide
-import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
-import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
-import com.laike.basekt.utils.HawkConstant
-import com.laike.basekt.utils.StatusBarCommon
-import com.hdl.xl.R
-import com.hdl.xl.databinding.ActivityProductCategoryBinding
-import com.hdl.xl.service.HttpApi_xie
-import com.hdl.xl.ui.adapter.CommodityRecommendAdapter
-import com.orhanobut.hawk.Hawk
-import com.scwang.smartrefresh.layout.SmartRefreshLayout
-
-/**
- * @Description:
- * @Author: wuxing
- * @Date: 2021/1/26 17:11
- */
-class ActivityProductCategory : BaseActivity(), View.OnClickListener {
-    var mBinding: ActivityProductCategoryBinding? = null
-    var mAdapter = CommodityRecommendAdapter()
-    var intType = 0
-    var type: String? = ""
-    var curPage = 0
-    var category: String? = ""
-    var shop_id: String? = ""
-    var key_word: String? = ""
-    var title:String?=""
-
-    companion object {
-        @JvmStatic
-        fun START(context: Context?,type:String,shop_id:String,title:String?,category_id:String) {
-            Launcher.with(context).add("type",type)
-                .add("shop_id",shop_id)
-                .add("title",title)
-                .add("category_id",category_id)
-                .target(ActivityProductCategory::class.java).go()
-        }
-    }
-
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        type = intent.getStringExtra("type")
-        shop_id= intent.getStringExtra("shop_id")
-        title = intent.getStringExtra("title")
-        category=intent.getStringExtra("category_id")
-        mBinding = DataBindingUtil.setContentView(mActivity, R.layout.activity_product_category)
-        mBinding?.run {
-            clickListener = this@ActivityProductCategory
-            layoutTitle.setPadding(0, StatusBarCommon.findStatusBarHeight(mActivity), 0, 0)
-            if (type == "search") {
-
-            } else if (type == "sort") {
-                layoutTitle.visibility = View.GONE
-                includeTitle.run {
-                    layoutTitle.visibility = View.VISIBLE
-                    textTitleTitle.text = title
-                    layoutTitle.setPadding(0, StatusBarCommon.findStatusBarHeight(mActivity), 0, 0)
-                    Glide.with(mContext).load(R.drawable.ic_search).into(imgSet)
-                }
-            } else if (type == "tuijian_1") {
-                shopName.visibility = View.VISIBLE
-                shopName.text=title
-            } else if (type == "tuijian_2") {
-                shopName.visibility = View.VISIBLE
-                shopName.text=title
-                manJian.visibility = View.VISIBLE
-            }
-
-            recycleView.layoutManager = GridLayoutManager(mActivity, 2)
-            recycleView.adapter = mAdapter
-
-            smart(key_word?:"",0)
-
-            mAdapter.addOnItemClickListener { view, entity, position ->
-                var bundle = Bundle()
-                bundle.putInt("type", 2)
-                startKtActivityOrForResult<ActivityDetailsFirst>(bundle = bundle)
-            }
-        }
-    }
-
-    fun smart(key_wo:String,ty: Int) {
-        mBinding?.run {
-            smartRefreshLayout.setOnRefreshListener {
-                curPage = 0
-                mAdapter.getData().clear()
-                mAdapter.notifyDataSetChanged()
-                searchGoodsList(smartRefreshLayout,key_wo, ty)
-            }
-            smartRefreshLayout.setOnLoadMoreListener {
-                searchGoodsList(smartRefreshLayout,key_wo, ty)
-            }
-            smartRefreshLayout.autoRefresh()
-        }
-    }
-
-    @SuppressLint("CheckResult")
-    fun searchGoodsList(smartRefreshLayout: SmartRefreshLayout,key_wo:String, ty: Int) {
-        curPage++
-        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .searchGoodsList(
-                key_wo,
-                category ?: "",
-                shop_id ?: "",
-                Hawk.get(HawkConstant.USER_ID),
-                ty,
-                curPage,
-                10
-            )
-            .compose(RxSchedulers.applySchedulers())
-            .subscribe({
-                smartRefreshLayout.finishRefresh()
-                smartRefreshLayout.finishLoadMore()
-                if (it.code == 200) {
-                    it.data?.let { it1 -> mAdapter.addDataAll(it1) }
-                    mAdapter.notifyDataSetChanged()
-                }
-            }, {
-                smartRefreshLayout.finishRefresh()
-                smartRefreshLayout.finishLoadMore()
-                Log.e("searchGoodsList", it.message.toString())
-            })
-    }
-
-    override fun onClick(v: View?) {
-        var intent = Intent()
-        mBinding?.run {
-            when (v?.id) {
-                R.id.go_back -> {
-                    finish()
-                }
-                R.id.complex_button -> {
-                    complexView.visibility = View.VISIBLE
-                    priceView.visibility = View.GONE
-                    priceSelect.visibility = View.GONE
-                    salesView.visibility = View.GONE
-                    intType = 0
-                    smart(key_word?:"",intType)
-                }
-                R.id.price_button -> {
-                    complexView.visibility = View.GONE
-                    priceView.visibility = View.VISIBLE
-                    priceSelect.visibility = View.VISIBLE
-                    salesView.visibility = View.GONE
-                    if (intType == 2) {
-                        Glide.with(mContext).load(R.mipmap.xia_sanjiao).into(priceSelect)
-                        intType = 1
-                    } else {
-                        Glide.with(mContext).load(R.mipmap.shang_sanjiao).into(priceSelect)
-                        intType = 2
-                    }
-                    smart(key_word?:"",intType)
-                }
-                R.id.sales_button -> {
-                    complexView.visibility = View.GONE
-                    priceView.visibility = View.GONE
-                    priceSelect.visibility = View.GONE
-                    salesView.visibility = View.VISIBLE
-                    salesSelect.visibility = View.VISIBLE
-                    if (intType == 4) {
-                        Glide.with(mContext).load(R.mipmap.xia_sanjiao).into(salesSelect)
-                        intType = 3
-                    } else {
-                        Glide.with(mContext).load(R.mipmap.shang_sanjiao).into(salesSelect)
-                        intType = 4
-                    }
-                    smart(key_word?:"",intType)
-                }
-                R.id.search_btn -> {
-                    intent.setClass(mContext, ActivitySearchCommdity::class.java)
-                    startActivityForResult(intent, 666)
-                }
-                else -> {
-                }
-            }
-        }
-    }
-
-    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
-        super.onActivityResult(requestCode, resultCode, data)
-        if (requestCode == 666) {
-            key_word = data?.extras?.getString("key_word")
-            mBinding?.searchBtn?.text = key_word
-            smart(key_word?:"",intType)
-        }
-    }
-}

+ 67 - 22
app/src/main/java/com/hdl/xl/ui/activitys/ActivityRegistration.kt

@@ -10,6 +10,8 @@ import android.util.Log
 import android.view.View
 import android.widget.Toast
 import androidx.databinding.DataBindingUtil
+import cn.leyihang.base.utils.ToastUtils
+import com.bumptech.glide.Glide
 import com.laike.basekt.BaseActivity
 import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
 import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
@@ -36,6 +38,8 @@ class ActivityRegistration : BaseActivity(), View.OnClickListener {
     var yao_code: String? = ""
     val handler = Handler()
     var mCountNum = 60
+    var isSelect = false
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         mBinding = DataBindingUtil.setContentView(mActivity, R.layout.activity_registration)
@@ -53,8 +57,12 @@ class ActivityRegistration : BaseActivity(), View.OnClickListener {
 
     private fun setGradientColor() {
         mBinding?.run {
-            val colors = intArrayOf(Color.parseColor("#FFDA4E"), Color.parseColor("#59FFF1"), Color.parseColor("#2BA3FF"))
-            val position = floatArrayOf(0f, 1.0f,2.0f)
+            val colors = intArrayOf(
+                Color.parseColor("#FFDA4E"),
+                Color.parseColor("#59FFF1"),
+                Color.parseColor("#2BA3FF")
+            )
+            val position = floatArrayOf(0f, 1.0f, 2.0f)
             val mLinearGradient = LinearGradient(
                 0f,
                 0f,
@@ -107,11 +115,28 @@ class ActivityRegistration : BaseActivity(), View.OnClickListener {
             R.id.go_back -> {
                 finish()
             }
+            R.id.select_button -> {
+                if (isSelect) {
+                    mBinding?.selectButton?.let {
+                        Glide.with(mContext).load(R.mipmap.selected_img).into(
+                            it
+                        )
+                    }
+                    isSelect = false
+                } else {
+                    mBinding?.selectButton?.let {
+                        Glide.with(mContext).load(R.mipmap.select_no).into(
+                            it
+                        )
+                    }
+                    isSelect = true
+                }
+            }
             R.id.get_captcha -> {
                 if (phone?.length != 11) {
                     Toast.makeText(mContext, "请输入11位手机号", Toast.LENGTH_SHORT).show()
                 } else {
-                    codeRegistered(phone?:"")
+                    codeRegistered(phone ?: "")
                 }
             }
             R.id.button_registered -> {
@@ -121,24 +146,30 @@ class ActivityRegistration : BaseActivity(), View.OnClickListener {
                     Toast.makeText(mContext, "请输入短信验证码", Toast.LENGTH_SHORT).show()
                 } else if (pwd == null || pwd?.length == 0) {
                     Toast.makeText(mContext, "请输入密码", Toast.LENGTH_SHORT).show()
-                }else if (pwdAgain == null || pwdAgain?.length == 0) {
+                } else if (pwdAgain == null || pwdAgain?.length == 0) {
                     Toast.makeText(mContext, "请再次输入密码", Toast.LENGTH_SHORT).show()
-                }
-                else if (pwd!=pwdAgain) {
+                } else if (pwd != pwdAgain) {
                     Toast.makeText(mContext, "两次输入的密码不一样", Toast.LENGTH_SHORT).show()
-                }
-                else if (secondPwd.isNullOrEmpty()) {
+                } else if (secondPwd.isNullOrEmpty()) {
                     Toast.makeText(mContext, "请输入二级密码", Toast.LENGTH_SHORT).show()
-                }else if (secondPwdAgain.isNullOrEmpty()) {
+                } else if (secondPwdAgain.isNullOrEmpty()) {
                     Toast.makeText(mContext, "请再次输入二级密码", Toast.LENGTH_SHORT).show()
-                }
-                else if (secondPwd!=secondPwdAgain) {
+                } else if (secondPwd != secondPwdAgain) {
                     Toast.makeText(mContext, "两次输入二级的密码不一样", Toast.LENGTH_SHORT).show()
-                }
-                else if (yao_code == null || yao_code?.length == 0) {
-                    Toast.makeText(mContext, "请输入注册邀请码", Toast.LENGTH_SHORT).show()
-                }else {
-                    registered(phone?:"", pwd?:"", yao_code?:"",code?:"")
+                } else {
+                    if (isSelect){
+                        registered(
+                            phone ?: "",
+                            code ?: "",
+                            pwd ?: "",
+                            pwd ?: "",
+                            secondPwd ?: "",
+                            secondPwd ?: "",
+                            yao_code ?: ""
+                        )
+                    }else{
+                        ToastUtils.toast("请先选择同意按钮")
+                    }
                 }
             }
         }
@@ -148,11 +179,11 @@ class ActivityRegistration : BaseActivity(), View.OnClickListener {
     @SuppressLint("CheckResult")
     fun codeRegistered(phone: String) {
         HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .codeRegistered(phone)
+            .codeRegistered(phone, "register")
             .compose(RxSchedulers.applySchedulers())
             .subscribe({
                 Toast.makeText(application, it.msg, Toast.LENGTH_SHORT).show()
-                if (it.code==200){
+                if (it.code == 1) {
                     handler.postDelayed(countDown, 0)
                 }
             }, { error ->
@@ -164,18 +195,32 @@ class ActivityRegistration : BaseActivity(), View.OnClickListener {
     //--注册
     @SuppressLint("CheckResult")
     fun registered(
-        phone: String, password: String, yao:String,code: String
+        phone: String,
+        code: String,
+        password: String,
+        confirm_password: String,
+        second_password: String,
+        confirm_second_password: String,
+        yao: String
     ) {
         HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .registered(phone, password,password, yao,code)
+            .registered(
+                phone,
+                code,
+                password,
+                confirm_password,
+                second_password,
+                confirm_second_password,
+                yao
+            )
             .compose(RxSchedulers.applySchedulers())
             .subscribe({
                 Toast.makeText(application, it.msg, Toast.LENGTH_SHORT).show()
-                if (it.code == 0) {
+                if (it.code == 1) {
                     finish()
                 }
             }, { error ->
-                Log.d("registered" ,"注册:${error.message}")
+                Log.d("registered", "注册:${error.message}")
                 Toast.makeText(application, "注册失败!", Toast.LENGTH_SHORT).show()
             })
     }

+ 0 - 73
app/src/main/java/com/hdl/xl/ui/activitys/ActivityShippingAddress.kt

@@ -1,73 +0,0 @@
-package com.hdl.xl.ui.activitys
-
-import android.annotation.SuppressLint
-import android.os.Bundle
-import android.util.Log
-import android.view.View
-import androidx.databinding.DataBindingUtil
-import androidx.recyclerview.widget.LinearLayoutManager
-import com.hdl.xl.R
-import com.laike.basekt.BaseActivity
-import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
-import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
-import com.laike.basekt.extension.startKtActivityOrForResult
-import com.laike.basekt.utils.HawkConstant
-import com.laike.basekt.utils.StatusBarCommon
-
-import com.hdl.xl.databinding.ActivityShippingAddressBinding
-import com.hdl.xl.service.HttpApi_xie
-
-import com.orhanobut.hawk.Hawk
-
-/**
- * @Description:
- * @Author: wuxing
- * @Date: 2021/1/27 16:42
- */
-
-class ActivityShippingAddress : BaseActivity(), View.OnClickListener {
-    var mBinding: ActivityShippingAddressBinding? = null
-    var mAdapter= com.hdl.xl.ui.adapter.ShippingAddressAdapter()
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        mBinding = DataBindingUtil.setContentView(mActivity, R.layout.activity_shipping_address)
-        mBinding?.run {
-            clickListener = this@ActivityShippingAddress
-            includeTitle?.run {
-                textTitleTitle.text = "我的地址"
-                layoutTitle.setPadding(0, StatusBarCommon.findStatusBarHeight(mActivity), 0, 0)
-            }
-            recycleView.layoutManager=LinearLayoutManager(mContext)
-            recycleView.adapter=mAdapter
-            searchAddress()
-        }
-    }
-
-    @SuppressLint("CheckResult")
-    fun searchAddress(){
-        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .addraList(Hawk.get(HawkConstant.TOKEN))
-            .compose(RxSchedulers.applySchedulers())
-            .subscribe({
-                if (it.code==200){
-                    it.data?.let { it1 -> mAdapter.addDataAll(it1) }
-                    mAdapter.notifyDataSetChanged()
-                }
-            },{
-                Log.e("searchAddress", it.message.toString())
-            })
-    }
-
-    override fun onClick(v: View?) {
-        var bundle=Bundle()
-        when (v?.id) {
-            R.id.go_back -> {
-                finish()
-            }
-            R.id.add_address->{
-                bundle.putInt("type",1)
-                startKtActivityOrForResult<ActivityAddShippingAddress>(bundle = bundle)
-            }
-        }
-    }
-}

+ 36 - 6
app/src/main/java/com/hdl/xl/ui/activitys/MainActivity.kt

@@ -9,7 +9,9 @@ import android.widget.RadioGroup
 import androidx.databinding.DataBindingUtil
 import androidx.fragment.app.FragmentManager
 import androidx.fragment.app.FragmentTransaction
+import cn.leyihang.base.utils.ToastUtils
 import com.hdl.xl.R
+import com.hdl.xl.bean.LoginOutEvent
 import com.hdl.xl.databinding.ActivityMainBinding
 import com.hdl.xl.ui.fragments.BrandFragment
 import com.laike.basekt.BaseActivity
@@ -18,6 +20,9 @@ import com.hdl.xl.ui.fragments.HomeFragment
 import com.hdl.xl.ui.fragments.MineFragment
 import com.hdl.xl.ui.fragments.SortFragment
 import com.orhanobut.hawk.Hawk
+import org.greenrobot.eventbus.EventBus
+import org.greenrobot.eventbus.Subscribe
+import org.greenrobot.eventbus.ThreadMode
 
 
 class MainActivity : BaseActivity(), RadioGroup.OnCheckedChangeListener {
@@ -38,20 +43,20 @@ class MainActivity : BaseActivity(), RadioGroup.OnCheckedChangeListener {
 
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
-        Hawk.put(HawkConstant.TOKEN, "2dsdsdfsdfsdfsdfsdf")
+        EventBus.getDefault().register(this)
         mBinding = DataBindingUtil.setContentView(mActivity, R.layout.activity_main)
         fManager = supportFragmentManager
         mBinding?.mainRgroupTabMenu?.setOnCheckedChangeListener(this)
         setStyle()
         mBinding?.run {
-            mainRbtnHome.isChecked=true
+            mainRbtnHome.isChecked = true
         }
     }
 
     override fun onCheckedChanged(group: RadioGroup?, checkedId: Int) {
-        var fTransaction=fManager?.beginTransaction()
+        var fTransaction = fManager?.beginTransaction()
         fTransaction?.let { hideAllFragment(it) }
-        when(checkedId){
+        when (checkedId) {
             R.id.main_rbtnHome -> {
                 if (fg1 == null) {
                     fg1 = HomeFragment()
@@ -117,8 +122,6 @@ class MainActivity : BaseActivity(), RadioGroup.OnCheckedChangeListener {
                 rb.invalidate()*/
 
 
-
-
                 //挨着给每个RadioButton加入drawable限制边距以控制显示大小
                 var drawables = rb.compoundDrawables
                 //获取drawables
@@ -135,6 +138,33 @@ class MainActivity : BaseActivity(), RadioGroup.OnCheckedChangeListener {
         }
     }
 
+    /**
+     * 接收未登录信息
+     */
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    fun eventBusLogin(loginOutEvent: LoginOutEvent) {
+        ToastUtils.toast("请先去登录")
+        var intent = Intent()
+        intent.setClass(mContext, LoginActivity::class.java)
+        startActivity(intent)
+        /*val dialogUtils = AlertDialogUtils.getInstance()
+        AlertDialogUtils.showConfirmDialog(mContext, "确定删除此地址吗?", "删除之后无法恢复,请谨慎考虑!")
+        dialogUtils.setMonDialogButtonClickListener(object :
+            AlertDialogUtils.OnDialogButtonClickListener {
+            override fun onPositiveButtonClick(dialog: AlertDialog) {
+                //点击确认按钮要做的事情
+            }
 
+            override fun onNegativeButtonClick(dialog: AlertDialog) {
+//点击取消按钮关闭弹框
+                dialog.dismiss()
+            }
+        })*/
+    }
+
+    override fun onDestroy() {
+        super.onDestroy()
+        EventBus.getDefault().unregister(this)
+    }
 
 }

+ 2 - 4
app/src/main/java/com/hdl/xl/ui/activitys/SplashActivity.kt

@@ -30,11 +30,9 @@ class SplashActivity : BaseActivity() {
         }*/
         var runnable = Runnable {}
         runnable = if (SessionUtil.get().loginInfo == null) {
-            /*Runnable {
+            Runnable {
                 LoginActivity.start(this@SplashActivity)
-            }*/
-            Hawk.put(HawkConstant.TOKEN, "2dsdsdfsdfsdfsdfsdf")
-            Runnable { MainActivity.start(this@SplashActivity) }
+            }
         } else {
             Runnable { MainActivity.start(this@SplashActivity) }
         }

+ 5 - 3
app/src/main/java/com/hdl/xl/ui/adapter/CommodityAdapter.kt

@@ -4,6 +4,8 @@ import android.view.LayoutInflater
 import android.view.ViewGroup
 import androidx.databinding.DataBindingUtil
 import com.hdl.xl.R
+import com.hdl.xl.bean.CollectionListBean
+import com.hdl.xl.ui.adapter.holder.CommodityHolder
 import com.laike.basekt.BaseRecyclerViewAdapterKt
 
 
@@ -12,9 +14,9 @@ import com.laike.basekt.BaseRecyclerViewAdapterKt
  * @Author: xieshenghua
  * @Date: 2020/7/7 11:26
  */
-class CommodityAdapter : BaseRecyclerViewAdapterKt<com.hdl.xl.bean.ChildXBean, com.hdl.xl.ui.adapter.holder.CommodityHolder>() {
-    override fun onCreateView(parent: ViewGroup, viewType: Int): com.hdl.xl.ui.adapter.holder.CommodityHolder =
-        com.hdl.xl.ui.adapter.holder.CommodityHolder(
+class CommodityAdapter : BaseRecyclerViewAdapterKt<CollectionListBean, CommodityHolder>() {
+    override fun onCreateView(parent: ViewGroup, viewType: Int): CommodityHolder =
+        CommodityHolder(
             DataBindingUtil.inflate(
                 LayoutInflater.from(mContext),
                 R.layout.item_commodity,

+ 4 - 4
app/src/main/java/com/hdl/xl/ui/adapter/CommodityFenAdapter.kt

@@ -5,7 +5,7 @@ import android.view.ViewGroup
 import androidx.databinding.DataBindingUtil
 import com.laike.basekt.BaseRecyclerViewAdapterKt
 import com.hdl.xl.R
-import com.hdl.xl.bean.ChildBean
+import com.hdl.xl.bean.CollectionListBean
 import com.hdl.xl.ui.adapter.holder.CommodityFenHolder
 
 /**
@@ -13,9 +13,9 @@ import com.hdl.xl.ui.adapter.holder.CommodityFenHolder
  * @Author: xieshenghua
  * @Date: 2020/7/7 11:26
  */
-class CommodityFenAdapter : BaseRecyclerViewAdapterKt<com.hdl.xl.bean.ChildBean, com.hdl.xl.ui.adapter.holder.CommodityFenHolder>() {
-    override fun onCreateView(parent: ViewGroup, viewType: Int): com.hdl.xl.ui.adapter.holder.CommodityFenHolder =
-        com.hdl.xl.ui.adapter.holder.CommodityFenHolder(
+class CommodityFenAdapter : BaseRecyclerViewAdapterKt<CollectionListBean, CommodityFenHolder>() {
+    override fun onCreateView(parent: ViewGroup, viewType: Int): CommodityFenHolder =
+        CommodityFenHolder(
             DataBindingUtil.inflate(
                 LayoutInflater.from(mContext),
                 R.layout.item_commodity_fen,

+ 1 - 1
app/src/main/java/com/hdl/xl/ui/adapter/ImageAdapter.java

@@ -37,7 +37,7 @@ public class ImageAdapter extends BannerAdapter<BannerBean, ImageAdapter.BannerV
 
     @Override
     public void onBindView(BannerViewHolder holder, BannerBean data, int position, int size) {
-        Glide.with(holder.imageView.getContext()).load(data.getImage()).into(holder.imageView);
+        Glide.with(holder.imageView.getContext()).load(data.getCover()).into(holder.imageView);
     }
 
     class BannerViewHolder extends RecyclerView.ViewHolder {

+ 2 - 6
app/src/main/java/com/hdl/xl/ui/adapter/InnerSaleAdapter.kt

@@ -5,15 +5,11 @@ import android.view.ViewGroup
 import androidx.databinding.DataBindingUtil
 import com.laike.basekt.BaseRecyclerViewAdapterKt
 import com.hdl.xl.R
+import com.hdl.xl.bean.CollectionListBean
 import com.hdl.xl.bean.GoodsBean
 import com.hdl.xl.ui.adapter.holder.InnerSaleHolder
 
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2022/7/7 11:26
- */
-class InnerSaleAdapter : BaseRecyclerViewAdapterKt<GoodsBean, InnerSaleHolder>() {
+class InnerSaleAdapter : BaseRecyclerViewAdapterKt<CollectionListBean, InnerSaleHolder>() {
     override fun onCreateView(parent: ViewGroup, viewType: Int): InnerSaleHolder =
         InnerSaleHolder(
             DataBindingUtil.inflate(

+ 2 - 6
app/src/main/java/com/hdl/xl/ui/adapter/OutSaleAdapter.kt

@@ -5,15 +5,11 @@ import android.view.ViewGroup
 import androidx.databinding.DataBindingUtil
 import com.laike.basekt.BaseRecyclerViewAdapterKt
 import com.hdl.xl.R
+import com.hdl.xl.bean.CalendarListBean
 import com.hdl.xl.bean.GoodsBean
 import com.hdl.xl.ui.adapter.holder.OutSaleHolder
 
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2022/7/7 11:26
- */
-class OutSaleAdapter : BaseRecyclerViewAdapterKt<GoodsBean, OutSaleHolder>() {
+class OutSaleAdapter : BaseRecyclerViewAdapterKt<CalendarListBean, OutSaleHolder>() {
     override fun onCreateView(parent: ViewGroup, viewType: Int): OutSaleHolder =
         OutSaleHolder(
             DataBindingUtil.inflate(

+ 2 - 6
app/src/main/java/com/hdl/xl/ui/adapter/RecommendAdapter.kt

@@ -5,15 +5,11 @@ import android.view.ViewGroup
 import androidx.databinding.DataBindingUtil
 import com.laike.basekt.BaseRecyclerViewAdapterKt
 import com.hdl.xl.R
+import com.hdl.xl.bean.CollectionListBean
 import com.hdl.xl.bean.GoodsBean
 import com.hdl.xl.ui.adapter.holder.RecommendHolder
 
-/**
- * @Description:
- * @Author: WUXING
- * @Date: 2022/7/7 11:26
- */
-class RecommendAdapter : BaseRecyclerViewAdapterKt<GoodsBean, RecommendHolder>() {
+class RecommendAdapter : BaseRecyclerViewAdapterKt<CollectionListBean, RecommendHolder>() {
     override fun onCreateView(parent: ViewGroup, viewType: Int): RecommendHolder =
         RecommendHolder(
             DataBindingUtil.inflate(

+ 0 - 27
app/src/main/java/com/hdl/xl/ui/adapter/ShippingAddressAdapter.kt

@@ -1,27 +0,0 @@
-package com.hdl.xl.ui.adapter
-
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import androidx.databinding.DataBindingUtil
-import com.hdl.xl.R
-import com.laike.basekt.BaseRecyclerViewAdapterKt
-
-import com.hdl.xl.bean.AddressListBean
-import com.hdl.xl.ui.adapter.holder.ShippingAddressHolder
-
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2020/7/7 11:26
- */
-class ShippingAddressAdapter : BaseRecyclerViewAdapterKt<AddressListBean, ShippingAddressHolder>() {
-    override fun onCreateView(parent: ViewGroup, viewType: Int): ShippingAddressHolder =
-        ShippingAddressHolder(
-            DataBindingUtil.inflate(
-                LayoutInflater.from(mContext),
-                R.layout.item_shipping_address,
-                parent,
-                false
-            ), this
-        )
-}

+ 7 - 11
app/src/main/java/com/hdl/xl/ui/adapter/holder/CommodityFenHolder.kt

@@ -1,35 +1,31 @@
 package com.hdl.xl.ui.adapter.holder
 
 import androidx.recyclerview.widget.GridLayoutManager
+import com.hdl.xl.bean.CollectionListBean
 import com.laike.basekt.BaseRecyclerViewHolderKt
 import com.hdl.xl.databinding.ItemCommodityFenBinding
 import com.hdl.xl.ui.adapter.CommodityAdapter
 import com.hdl.xl.ui.adapter.CommodityFenAdapter
 
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2020/7/7 11:28
- */
 class CommodityFenHolder(
     var mBinding: ItemCommodityFenBinding,
     var mAdapter: CommodityFenAdapter
-) : BaseRecyclerViewHolderKt<com.hdl.xl.bean.ChildBean, ItemCommodityFenBinding>(mBinding, mAdapter) {
-    override fun setDataBinding(entity: com.hdl.xl.bean.ChildBean, position: Int) {
+) : BaseRecyclerViewHolderKt<CollectionListBean, ItemCommodityFenBinding>(mBinding, mAdapter) {
+    override fun setDataBinding(entity: CollectionListBean, position: Int) {
         var mAdapter= CommodityAdapter()
         mBinding?.run {
             nameText.text=entity.name
             recycleView.layoutManager=GridLayoutManager(mContext,3)
             recycleView.adapter=mAdapter
-            entity.child?.let { mAdapter.addDataAll(it) }
+            /*mAdapter.addDataAll(it)
             mAdapter.notifyDataSetChanged()
             mAdapter.addOnItemClickListener { view, entity, position ->
-                com.hdl.xl.ui.activitys.ActivityProductCategory.START(mContext,"sort","",entity.name, entity.id.toString())
-            }
+
+            }*/
         }
 
     }
 
-    override fun onDataBindingClickListener(entity: com.hdl.xl.bean.ChildBean, position: Int) {
+    override fun onDataBindingClickListener(entity: CollectionListBean, position: Int) {
     }
 }

+ 9 - 5
app/src/main/java/com/hdl/xl/ui/adapter/holder/CommodityHolder.kt

@@ -1,5 +1,7 @@
 package com.hdl.xl.ui.adapter.holder
 
+import com.bumptech.glide.Glide
+import com.hdl.xl.bean.CollectionListBean
 import com.laike.basekt.BaseRecyclerViewHolderKt
 import com.hdl.xl.databinding.ItemCommodityBinding
 import com.hdl.xl.ui.adapter.CommodityAdapter
@@ -12,13 +14,15 @@ import com.hdl.xl.ui.adapter.CommodityAdapter
 class CommodityHolder(
     var mBinding: ItemCommodityBinding,
     var mAdapter: CommodityAdapter
-) : BaseRecyclerViewHolderKt<com.hdl.xl.bean.ChildXBean, ItemCommodityBinding>(mBinding, mAdapter) {
-    override fun setDataBinding(entity: com.hdl.xl.bean.ChildXBean, position: Int) {
+) : BaseRecyclerViewHolderKt<CollectionListBean, ItemCommodityBinding>(mBinding, mAdapter) {
+    override fun setDataBinding(entity: CollectionListBean, position: Int) {
         mBinding?.run {
-            /*Glide.with(mContext).load(entity.img).into(ivPhoto)
-            nameText.text=entity.name*/
+            Glide.with(mContext).load(entity.cover).into(ivPhoto)
+            nameText.text=entity.name
+            priceText.text="¥"+entity.price
+
         }
     }
 
-    override fun onDataBindingClickListener(entity: com.hdl.xl.bean.ChildXBean, position: Int) {}
+    override fun onDataBindingClickListener(entity: CollectionListBean, position: Int) {}
 }

+ 56 - 10
app/src/main/java/com/hdl/xl/ui/adapter/holder/InnerSaleHolder.kt

@@ -1,30 +1,45 @@
 package com.hdl.xl.ui.adapter.holder
 
+import android.annotation.SuppressLint
+import android.util.Log
 import androidx.recyclerview.widget.LinearLayoutManager
+import cn.leyihang.base.utils.ToastUtils
+import com.bumptech.glide.Glide
+import com.hdl.xl.R
+import com.hdl.xl.bean.CollectionListBean
 import com.laike.basekt.BaseRecyclerViewHolderKt
 import com.hdl.xl.bean.GoodsBean
 import com.hdl.xl.databinding.ItemInnerSaleBinding
+import com.hdl.xl.service.HttpApi_xie
 import com.hdl.xl.ui.activitys.ActivityCollectionDetail
 import com.hdl.xl.ui.adapter.InnerDouSaleAdapter
 import com.hdl.xl.ui.adapter.InnerSaleAdapter
 import com.laike.basekt.BaseActivity
+import com.laike.basekt.bean.LogOutEvent
+import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
+import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
 import com.laike.basekt.extension.startKtActivityOrForResult
+import com.laike.basekt.utils.HawkConstant
+import com.orhanobut.hawk.Hawk
+import org.greenrobot.eventbus.EventBus
+
 
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2020/7/7 11:28
- */
 class InnerSaleHolder(
     var mBinding: ItemInnerSaleBinding,
     var mAdapter: InnerSaleAdapter
-) : BaseRecyclerViewHolderKt<GoodsBean, ItemInnerSaleBinding>(mBinding, mAdapter) {
+) : BaseRecyclerViewHolderKt<CollectionListBean, ItemInnerSaleBinding>(mBinding, mAdapter) {
     var mInnerDouSaleAdapter= InnerDouSaleAdapter()
     var list: MutableList<GoodsBean> = ArrayList()
-    override fun setDataBinding(entity: GoodsBean, position: Int) {
+    override fun setDataBinding(entity: CollectionListBean, position: Int) {
         mBinding?.run {
-            //Glide.with(mContext).load(entity.logo).into(ivPhoto)
-            recycleView.layoutManager= LinearLayoutManager(mContext)
+            timeText.text=entity.time
+           Glide.with(mContext).load(entity.cover).into(ivPhoto)
+            nameText.text=entity?.name
+            numText.text="发售量 "+entity?.now_inventory+"份"
+            priceText.text="¥"+entity.price
+
+
+            /*recycleView.layoutManager= LinearLayoutManager(mContext)
             recycleView.adapter = mInnerDouSaleAdapter
 
             for (i in 0..2){
@@ -35,9 +50,40 @@ class InnerSaleHolder(
 
             mInnerDouSaleAdapter.addOnItemClickListener { view, entity, position ->
                 (mContext as BaseActivity).startKtActivityOrForResult<ActivityCollectionDetail>()
+            }*/
+
+            if (entity?.is_remind==false){
+                remindBtn.text="提醒我"
+                remindBtn.setBackgroundResource(R.drawable.bg_home_top)
+                remindBtn.setTextColor(mContext.resources.getColor(R.color.black_alpha20))
+            }else{
+                remindBtn.text="已设置提醒"
+                remindBtn.setBackgroundResource(R.drawable.bg_gray_set)
+                remindBtn.setTextColor(mContext.resources.getColor(R.color.white))
+            }
+        }
+    }
+
+    override fun onDataBindingClickListener(entity: CollectionListBean, position: Int) {
+        mBinding?.run {
+            remindBtn?.setOnClickListener {
+                entity.id?.let { it1 -> setRemind(it1) }
             }
         }
     }
 
-    override fun onDataBindingClickListener(entity: GoodsBean, position: Int) {}
+    @SuppressLint("CheckResult")
+    fun setRemind(id:Int) {
+        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
+            .setRemind(Hawk.get(HawkConstant.TOKEN), id)
+            .compose(RxSchedulers.applySchedulers())
+            .subscribe({
+                ToastUtils.toast(it.msg)
+                if (it.code == 1) {
+                    EventBus.getDefault().post(LogOutEvent())
+                }
+            }, {
+                Log.e("searchGoodsDetail", it.message.toString())
+            })
+    }
 }

+ 8 - 16
app/src/main/java/com/hdl/xl/ui/adapter/holder/OutSaleHolder.kt

@@ -1,36 +1,28 @@
 package com.hdl.xl.ui.adapter.holder
 
 import androidx.recyclerview.widget.LinearLayoutManager
+import com.hdl.xl.bean.CalendarListBean
 import com.laike.basekt.BaseRecyclerViewHolderKt
 import com.hdl.xl.bean.GoodsBean
 import com.hdl.xl.databinding.ItemOutSaleBinding
 import com.hdl.xl.ui.adapter.InnerSaleAdapter
 import com.hdl.xl.ui.adapter.OutSaleAdapter
 
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2020/7/7 11:28
- */
 class OutSaleHolder(
     var mBinding: ItemOutSaleBinding,
     var mAdapter: OutSaleAdapter
-) : BaseRecyclerViewHolderKt<GoodsBean, ItemOutSaleBinding>(mBinding, mAdapter) {
-    var mInnerSaleAdapter= InnerSaleAdapter()
+) : BaseRecyclerViewHolderKt<CalendarListBean, ItemOutSaleBinding>(mBinding, mAdapter) {
+    var mInnerSaleAdapter = InnerSaleAdapter()
     var list: MutableList<GoodsBean> = ArrayList()
-    override fun setDataBinding(entity: GoodsBean, position: Int) {
+    override fun setDataBinding(entity: CalendarListBean, position: Int) {
         mBinding?.run {
-
-            recycleView.layoutManager=LinearLayoutManager(mContext)
+            dateText.text = entity?.date
+            recycleView.layoutManager = LinearLayoutManager(mContext)
             recycleView.adapter = mInnerSaleAdapter
-
-            for (i in 0..2){
-                list.add(GoodsBean())
-            }
-            mInnerSaleAdapter.addDataAll(list)
+            entity?.list?.let { mInnerSaleAdapter.addDataAll(it) }
             mInnerSaleAdapter.notifyDataSetChanged()
         }
     }
 
-    override fun onDataBindingClickListener(entity: GoodsBean, position: Int) {}
+    override fun onDataBindingClickListener(entity: CalendarListBean, position: Int) {}
 }

+ 14 - 10
app/src/main/java/com/hdl/xl/ui/adapter/holder/RecommendHolder.kt

@@ -1,25 +1,29 @@
 package com.hdl.xl.ui.adapter.holder
 
+import android.annotation.SuppressLint
+import com.bumptech.glide.Glide
+import com.hdl.xl.bean.CollectionListBean
 import com.laike.basekt.BaseRecyclerViewHolderKt
 import com.hdl.xl.bean.GoodsBean
 import com.hdl.xl.databinding.ItemRecommendBinding
 import com.hdl.xl.ui.adapter.RecommendAdapter
 
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2022/7/7 11:28
- */
 class RecommendHolder(
     var mBinding: ItemRecommendBinding,
     var mAdapter: RecommendAdapter
-) : BaseRecyclerViewHolderKt<GoodsBean, ItemRecommendBinding>(mBinding, mAdapter) {
-    override fun setDataBinding(entity: GoodsBean, position: Int) {
+) : BaseRecyclerViewHolderKt<CollectionListBean, ItemRecommendBinding>(mBinding, mAdapter) {
+    @SuppressLint("SetTextI18n")
+    override fun setDataBinding(entity: CollectionListBean, position: Int) {
         mBinding?.run {
-            bean=entity
-            //Glide.with(mContext).load(entity.image).into(ivPhoto)
+            Glide.with(mContext).load(entity.cover).into(ivPhoto)
+            jijiangSale.text="即将开售 "+entity?.sell_time
+            nameText.text = entity?.name
+            numText.text = "发售量 " + entity?.now_inventory + "份"
+            priceText.text = "¥" + entity.price
+            Glide.with(mContext).load(entity.auth_img).into(avatar)
+            autNameText.text = entity?.auth_name
         }
     }
 
-    override fun onDataBindingClickListener(entity: GoodsBean, position: Int) {}
+    override fun onDataBindingClickListener(entity: CollectionListBean, position: Int) {}
 }

+ 0 - 65
app/src/main/java/com/hdl/xl/ui/adapter/holder/ShippingAddressHolder.kt

@@ -1,65 +0,0 @@
-package com.hdl.xl.ui.adapter.holder
-
-import android.annotation.SuppressLint
-import android.os.Bundle
-import android.util.Log
-import android.view.View
-import cn.leyihang.base.utils.ToastUtils
-import com.laike.basekt.BaseActivity
-import com.laike.basekt.BaseRecyclerViewHolderKt
-import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
-import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
-import com.laike.basekt.extension.startKtActivityOrForResult
-import com.laike.basekt.utils.HawkConstant
-import com.hdl.xl.bean.AddressListBean
-import com.hdl.xl.databinding.ItemShippingAddressBinding
-import com.hdl.xl.service.HttpApi_xie
-
-import com.hdl.xl.ui.activitys.ActivityAddShippingAddress
-import com.orhanobut.hawk.Hawk
-
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2020/7/7 11:28
- */
-class ShippingAddressHolder(
-    var mBinding: ItemShippingAddressBinding,
-    var mAdapter: com.hdl.xl.ui.adapter.ShippingAddressAdapter
-) : BaseRecyclerViewHolderKt<AddressListBean, ItemShippingAddressBinding>(mBinding, mAdapter) {
-    override fun setDataBinding(entity: AddressListBean, position: Int) {
-        mBinding?.run {
-            if (position == 0) {
-                moren.visibility = View.VISIBLE
-            }
-            editButton.setOnClickListener {
-                var bundle = Bundle()
-                bundle.putInt("type", 2)
-                (mContext as BaseActivity).startKtActivityOrForResult<ActivityAddShippingAddress>(
-                    bundle = bundle
-                )
-            }
-            deleteBtn.setOnClickListener {
-                deleteAddr(entity.address_id?:0)
-            }
-        }
-    }
-
-    @SuppressLint("CheckResult")
-    fun deleteAddr(addr_id:Int) {
-    HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-        .deleteAddr(Hawk.get(HawkConstant.TOKEN),addr_id)
-        .compose(RxSchedulers.applySchedulers())
-        .subscribe({
-            ToastUtils.toast(it.msg)
-            if (it.code==200){
-
-            }
-        },{
-            Log.e("deleteAddr", it.message.toString())
-        })
-
-    }
-
-    override fun onDataBindingClickListener(entity: AddressListBean, position: Int) {}
-}

+ 0 - 141
app/src/main/java/com/hdl/xl/ui/dialogs/DialogSelectProductSpecifications.kt

@@ -1,141 +0,0 @@
-package com.hdl.xl.ui.dialogs
-
-import android.annotation.SuppressLint
-import android.app.ActionBar
-import android.os.Bundle
-import android.util.Log
-import android.view.*
-import androidx.databinding.DataBindingUtil
-import androidx.fragment.app.DialogFragment
-import androidx.recyclerview.widget.LinearLayoutManager
-import cn.leyihang.base.utils.ToastUtils
-import com.bumptech.glide.Glide
-import com.google.gson.Gson
-import com.laike.basekt.BaseDialogFragment
-import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
-import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
-import com.laike.basekt.utils.HawkConstant
-import com.hdl.xl.R
-import com.hdl.xl.databinding.DialogSelectProductSpecificationsBinding
-import com.hdl.xl.service.HttpApi_xie
-import com.orhanobut.hawk.Hawk
-
-
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2021/1/31 10:29
- */
-class DialogSelectProductSpecifications : BaseDialogFragment(), View.OnClickListener {
-    private var mBinding: DialogSelectProductSpecificationsBinding? = null
-    var mAdapter = com.hdl.xl.ui.adapter.ProductSpecificationAdapter()
-    var goods_id = ""
-    var shop_id = ""
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        setStyle(DialogFragment.STYLE_NORMAL, R.style.BottomSheetEdit)
-        mWidth = ActionBar.LayoutParams.MATCH_PARENT
-        mHeight = ActionBar.LayoutParams.WRAP_CONTENT
-        isHiddenTitle = true
-        mGravity = Gravity.BOTTOM
-        isBgTransparent = true
-    }
-
-    override fun onCreateView(
-        inflater: LayoutInflater,
-        container: ViewGroup?,
-        savedInstanceState: Bundle?
-    ): View {
-        return inflater.inflate(R.layout.dialog_select_product_specifications, container, false)
-            .apply { this.isClickable = true }
-    }
-
-    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
-        super.onViewCreated(view, savedInstanceState)
-        goods_id = arguments?.getString("goods_id", "") ?: ""
-        mBinding = DataBindingUtil.bind(view)
-        mBinding?.run {
-            clickListener = this@DialogSelectProductSpecifications
-            recycleView.layoutManager = LinearLayoutManager(mActivity)
-            recycleView.adapter = mAdapter
-            searchGoodsDetail()
-        }
-    }
-
-    @SuppressLint("CheckResult")
-    fun searchGoodsDetail() {
-        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .searchGoodsDetail(goods_id, Hawk.get(HawkConstant.USER_ID))
-            .compose(RxSchedulers.applySchedulers())
-            .subscribe({
-                if (it.code == 200) {
-                    var data = it.data
-                    shop_id = data?.shop_id.toString()
-                    mBinding?.bean = data
-                    mBinding?.ivPhoto?.let { it1 ->
-                        Glide.with(mActivity).load(data?.image).into(it1)
-                    }
-                    data?.specs?.let { it1 -> mAdapter.addDataAll(it1) }
-                    mAdapter.notifyDataSetChanged()
-                }
-            }, {
-                Log.e("", it.message.toString())
-            })
-    }
-
-    fun getSpecs(): String {
-        var data = mAdapter.getData()
-        var list: MutableList<Map<String, String?>> = ArrayList()
-
-        data?.forEach {
-            var ruleDetails = if (it.select_num != 0) {
-                mapOf(
-                    Pair("amount", it.select_num), Pair("specs", it.id)
-                )
-            } else {
-
-            }
-            list.add(ruleDetails as Map<String, String?>)
-        }
-
-        var str = Gson().toJson(list)
-        Log.e("11111", str)
-        return str
-    }
-
-    @SuppressLint("CheckResult")
-    fun joinPurchaseOrder() {
-        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .joinPurchaseOrder(Hawk.get(HawkConstant.TOKEN), goods_id, shop_id, getSpecs())
-            .compose(RxSchedulers.applySchedulers())
-            .subscribe({
-                ToastUtils.toast(it.msg)
-                if (it.code == 200) {
-
-                }
-            }, {
-                Log.e("joinPurchaseOrder", it.message.toString())
-            })
-    }
-
-    override fun onClick(v: View?) {
-        when (v?.id) {
-            R.id.cancel_button -> {
-                dismiss()
-            }
-            R.id.add_purchase_order -> {
-                var num=0
-                mAdapter.getData().forEach {
-                    if (it.select_num?:0 > 0){
-                        num=it.select_num?:0
-                    }
-                }
-                if (num>0){
-                    joinPurchaseOrder()
-                }else{
-                    ToastUtils.toast("请先选择规格数量")
-                }
-            }
-        }
-    }
-}

+ 0 - 1
app/src/main/java/com/hdl/xl/ui/fragments/BrandFragment.kt

@@ -11,7 +11,6 @@ import com.hdl.xl.bean.BankCardBean
 import com.laike.basekt.BaseFragment
 import com.hdl.xl.databinding.BrandFragmentBinding
 import com.hdl.xl.ui.activitys.ActivityCollectionDetail
-import com.hdl.xl.ui.activitys.ActivityProductCategory
 import com.hdl.xl.ui.adapter.BrandAdapter
 import com.laike.basekt.extension.startKtActivityOrForResult
 

+ 24 - 24
app/src/main/java/com/hdl/xl/ui/fragments/FragmentCollection.kt

@@ -1,6 +1,8 @@
 package com.hdl.xl.ui.fragments
 
+import android.annotation.SuppressLint
 import android.os.Bundle
+import android.util.Log
 import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
@@ -9,10 +11,15 @@ import androidx.recyclerview.widget.GridLayoutManager
 import com.hdl.xl.R
 import com.hdl.xl.bean.ChildXBean
 import com.hdl.xl.databinding.FragmentCollectionBinding
+import com.hdl.xl.service.HttpApi_xie
 import com.hdl.xl.ui.activitys.ActivityCollectionDetail
 import com.hdl.xl.ui.adapter.CommodityAdapter
 import com.laike.basekt.BaseFragment
+import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
+import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
 import com.laike.basekt.extension.startKtActivityOrForResult
+import com.laike.basekt.utils.HawkConstant
+import com.orhanobut.hawk.Hawk
 
 /**
  * @Description:
@@ -49,44 +56,37 @@ class FragmentCollection : BaseFragment(), View.OnClickListener {
             if (type==0){
                 recycleView.adapter = mAdapter
 
-                for (i in 0..6){
-                    list.add(ChildXBean())
-                }
-                mAdapter.addDataAll(list)
-                mAdapter.notifyDataSetChanged()
+                indexCollectionList(1)
+
             }else{
                 recycleView.adapter = mAdapter
 
-                for (i in 0..6){
-                    list.add(ChildXBean())
-                }
-                mAdapter.addDataAll(list)
-                mAdapter.notifyDataSetChanged()
+                indexCollectionList(3)
             }
-
-            mAdapter?.addOnItemClickListener { view, entity, position ->
-                var bundle=Bundle()
-                bundle.putString("type","fragmentConsignment")
-                startKtActivityOrForResult<ActivityCollectionDetail>(bundle = bundle)
-            }
-
         }
     }
 
-    /*@SuppressLint("CheckResult")
-    fun searchGoodsDetail() {
+    var bundle=Bundle()
+    @SuppressLint("CheckResult")
+    fun indexCollectionList(type:Int) {
         HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .searchGoodsDetail(goods_id, Hawk.get(HawkConstant.USER_ID))
+            .indexCollectionList(Hawk.get(HawkConstant.TOKEN), type, 0)
             .compose(RxSchedulers.applySchedulers())
             .subscribe({
-                if (it.code == 200) {
-                    var data = it.data
+                if (it.code == 1) {
+                    it?.data?.let { it1 -> mAdapter.addDataAll(it1) }
+                    mAdapter.notifyDataSetChanged()
 
+                    mAdapter.addOnItemClickListener { view, entity, position ->
+                        bundle.putInt("id", entity.id ?: 0)
+                        bundle.putString("type","fragmentConsignment")
+                        startKtActivityOrForResult<ActivityCollectionDetail>(bundle = bundle)
+                    }
                 }
             }, {
-                Log.e(TAG, it.message.toString())
+                Log.e("searchGoodsDetail", it.message.toString())
             })
-    }*/
+    }
 
     override fun onClick(v: View?) {
         when (v?.id) {

+ 0 - 151
app/src/main/java/com/hdl/xl/ui/fragments/FragmentCommidity.kt

@@ -1,151 +0,0 @@
-package com.hdl.xl.ui.fragments
-
-
-import android.annotation.SuppressLint
-import android.graphics.Color
-import android.os.Bundle
-import android.util.Log
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.databinding.DataBindingUtil
-import com.bumptech.glide.Glide
-import com.laike.basekt.BaseFragment
-import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
-import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
-import com.laike.basekt.extension.newKtDialogFragmentAndShow
-import com.laike.basekt.utils.HawkConstant
-import com.hdl.xl.R
-import com.hdl.xl.bean.BannerBean
-import com.hdl.xl.databinding.FragmentCommidityBinding
-import com.hdl.xl.service.HttpApi_xie
-import com.lake.banner.*
-import com.lake.banner.loader.ViewItemBean
-import com.orhanobut.hawk.Hawk
-
-/**
- * @Description:
- * @Author: wuxing
- * @Date: 2021/1/30 16:38
- */
-class FragmentCommidity : BaseFragment(), View.OnClickListener {
-    val TAG = FragmentCommidity::class.java.simpleName
-    var mBinding: FragmentCommidityBinding? = null
-    var leadType = 0 //1限时秒杀   2普通
-    var collectInt = 0
-    var goods_id = ""
-    var bundle = Bundle()
-var cur=0
-    companion object {
-        const val AGRS_KEY_TYPE = "args_keys"
-        const val AGRS_GOODS_ID = "args_keys"
-    }
-
-    override fun onCreateView(
-        inflater: LayoutInflater,
-        container: ViewGroup?,
-        savedInstanceState: Bundle?
-    ): View? =
-        inflater.inflate(R.layout.fragment_commidity, container, false).apply {
-            this.isClickable = true
-        }
-
-    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
-        super.onViewCreated(view, savedInstanceState)
-        leadType = arguments?.getInt(AGRS_KEY_TYPE, 0) ?: 0
-        goods_id = arguments?.getString(AGRS_GOODS_ID, "") ?: ""
-        mBinding = DataBindingUtil.bind(view)
-        mBinding?.run {
-            clickListener = this@FragmentCommidity
-            if (leadType == 1) {
-                limitedTimeLayout.visibility = View.VISIBLE
-            } else if (leadType == 2) {
-                manJian.visibility = View.VISIBLE
-            }
-            searchGoodsDetail()
-        }
-    }
-
-    @SuppressLint("CheckResult")
-    fun searchGoodsDetail() {
-        Log.e("7777777", goods_id + ",,," + Hawk.get(HawkConstant.USER_ID))
-        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .searchGoodsDetail(goods_id, Hawk.get(HawkConstant.USER_ID))
-            .compose(RxSchedulers.applySchedulers())
-            .subscribe({
-                if (it.code == 200) {
-                    var data = it.data
-                    data?.imgs?.let { it1 -> setBanner(data?.video ?: "", it1) }
-                    mBinding?.run {
-                        bean = data
-                        collectInt = data?.is_collect ?: 0
-                        if (data?.is_collect == 0) {
-                            Glide.with(mActivity).load(R.mipmap.no_collect_img).into(collectImg)
-                        } else {
-                            Glide.with(mActivity).load(R.mipmap.commidity_collect_img)
-                                .into(collectImg)
-                        }
-                    }
-                }
-            }, {
-                Log.e(TAG, it.message.toString())
-            })
-    }
-
-    fun setBanner(path2: String, list3: MutableList<BannerBean>) {
-        mBinding?.run {
-            banner.setBannerAnimation(Transformer.Default) //换场方式
-                .setBannerStyle(BannerStyle.CIRCLE_INDICATOR_TITLE) //指示器模式
-                .setCache(true) //可以不用设置,默认为true
-                //.setCachePath(getExternalFilesDir(Environment.DIRECTORY_MOVIES)!!.absolutePath + File.separator.toString() + "hbanner")
-                .setVideoGravity(VideoGravityType.FULL_SCREEN) //视频布局方式
-                .setImageGravity(ImageGravityType.FIT_XY) //图片布局方式
-                .setPageBackgroundColor(Color.TRANSPARENT) //设置背景
-                .setShowTitle(false) //是否显示标题
-                .setViewPagerIsScroll(true) //是否支持手滑
-                .start()
-
-            var list2: MutableList<ViewItemBean> = ArrayList()
-            list2.add(ViewItemBean(BannerConfig.VIDEO, "", path2, 18 * 1000))
-
-            list3.forEach {
-                list2.add(ViewItemBean(BannerConfig.IMAGE, "", it, 2 * 1000))
-            }
-            banner.update(list2)
-
-            banner.setOnClickListener {
-                if (cur==0){
-                    banner.onPause()
-                }else{
-                    banner.onResume()
-                }
-            }
-        }
-    }
-
-    override fun onClick(v: View?) {
-        when (v?.id) {
-            R.id.man_jian -> {
-                newKtDialogFragmentAndShow<com.hdl.xl.ui.dialogs.DialogManJian>()
-            }
-            R.id.select_product_btn -> {
-                bundle.putString("goods_id",goods_id)
-                newKtDialogFragmentAndShow<com.hdl.xl.ui.dialogs.DialogSelectProductSpecifications>(bundle=bundle)
-            }
-            R.id.join_purchase->{
-                bundle.putString("goods_id",goods_id)
-                newKtDialogFragmentAndShow<com.hdl.xl.ui.dialogs.DialogSelectProductSpecifications>(bundle=bundle)
-            }
-            R.id.go_purchase->{
-
-            }
-            R.id.collect_btn -> {
-                if (collectInt == 0) {
-
-                } else {
-
-                }
-            }
-        }
-    }
-}

+ 0 - 82
app/src/main/java/com/hdl/xl/ui/fragments/FragmentDetail.kt

@@ -1,82 +0,0 @@
-package com.hdl.xl.ui.fragments
-
-
-import android.annotation.SuppressLint
-import android.os.Bundle
-import android.util.Log
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.databinding.DataBindingUtil
-import com.laike.basekt.BaseFragment
-import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
-import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
-import com.laike.basekt.utils.HawkConstant
-import com.hdl.xl.R
-import com.hdl.xl.databinding.FragmentDetailBinding
-import com.hdl.xl.service.HttpApi_xie
-import com.orhanobut.hawk.Hawk
-
-/**
- * @Description:
- * @Author: wuxing
- * @Date: 2021/1/30 16:38
- */
-class FragmentDetail : BaseFragment(), View.OnClickListener {
-    val TAG = FragmentDetail::class.java.simpleName
-    var mBinding: FragmentDetailBinding? = null
-    var goods_id = ""
-    companion object {
-        const val AGRS_GOODS_ID = "args_keys"
-    }
-    override fun onCreateView(
-        inflater: LayoutInflater,
-        container: ViewGroup?,
-        savedInstanceState: Bundle?
-    ): View? =
-        inflater.inflate(R.layout.fragment_detail, container, false).apply {
-            this.isClickable = true
-        }
-
-    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
-        super.onViewCreated(view, savedInstanceState)
-        goods_id=arguments?.getString(AGRS_GOODS_ID,"")?:""
-        mBinding = DataBindingUtil.bind(view)
-        mBinding?.run {
-            clickListener = this@FragmentDetail
-            searchGoodsDetail()
-        }
-    }
-
-    @SuppressLint("CheckResult")
-    fun searchGoodsDetail() {
-        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .searchGoodsDetail(goods_id, Hawk.get(HawkConstant.USER_ID))
-            .compose(RxSchedulers.applySchedulers())
-            .subscribe({
-                if (it.code == 200) {
-                    var data = it.data
-                    data?.content?.let { it1 -> loadHtml(it1) }
-                }
-            }, {
-                Log.e(TAG, it.message.toString())
-            })
-    }
-
-    private fun loadHtml(html: String) {
-        val head = "<style>" +
-                "img{" +
-                " max-width:100%;" +
-                " height:auto;" +
-                "}" +
-                "</style>"
-        mBinding?.webView?.loadDataWithBaseURL(null, head + html, "text/html", "UTF-8", null)
-    }
-
-
-    override fun onClick(v: View?) {
-        when (v?.id) {
-
-        }
-    }
-}

+ 59 - 34
app/src/main/java/com/hdl/xl/ui/fragments/FragmentRecommend.kt

@@ -1,6 +1,8 @@
 package com.hdl.xl.ui.fragments
 
+import android.annotation.SuppressLint
 import android.os.Bundle
+import android.util.Log
 import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
@@ -8,24 +10,26 @@ import androidx.databinding.DataBindingUtil
 import androidx.recyclerview.widget.LinearLayoutManager
 import com.laike.basekt.BaseFragment
 import com.hdl.xl.R
-import com.hdl.xl.bean.GoodsBean
 import com.hdl.xl.databinding.FragmentRecommendBinding
+import com.hdl.xl.service.HttpApi_xie
 import com.hdl.xl.ui.activitys.ActivityCollectionDetail
 import com.hdl.xl.ui.adapter.OutSaleAdapter
 import com.hdl.xl.ui.adapter.RecommendAdapter
+import com.laike.basekt.bean.LogOutEvent
+import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
+import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
 import com.laike.basekt.extension.startKtActivityOrForResult
+import com.laike.basekt.utils.HawkConstant
+import com.orhanobut.hawk.Hawk
+import org.greenrobot.eventbus.EventBus
+import org.greenrobot.eventbus.Subscribe
+import org.greenrobot.eventbus.ThreadMode
 
-/**
- * @Description:
- * @Author: wuxing
- * @Date: 2022/7/7 19:38
- */
 class FragmentRecommend : BaseFragment(), View.OnClickListener {
     var mBinding: FragmentRecommendBinding? = null
-    var type =0
+    var type = 0
     var mAdapter = RecommendAdapter()
-    var mOutSaleAdapter= OutSaleAdapter()
-    var list: MutableList<GoodsBean> = ArrayList()
+    var mOutSaleAdapter = OutSaleAdapter()
 
     companion object {
         const val AGRS_GOODS_ID = "args_keys"
@@ -42,55 +46,76 @@ class FragmentRecommend : BaseFragment(), View.OnClickListener {
 
     override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
         super.onViewCreated(view, savedInstanceState)
+        EventBus.getDefault().register(this)
         type = arguments?.getInt(AGRS_GOODS_ID, 0)!!
         mBinding = DataBindingUtil.bind(view)
         mBinding?.run {
             clickListener = this@FragmentRecommend
 
             recycleView.layoutManager = LinearLayoutManager(mActivity)
-            if (type==0){
+            if (type == 0) {
                 recycleView.adapter = mAdapter
+                indexCollectionList()
+            } else {
+                recycleView.adapter = mOutSaleAdapter
+                CollectionCalendar()
+            }
+        }
+    }
 
-                for (i in 0..6){
-                    list.add(GoodsBean())
-                }
-                mAdapter.addDataAll(list)
-                mAdapter.notifyDataSetChanged()
+    var bundle = Bundle()
 
-                mAdapter.addOnItemClickListener { view, entity, position ->
-                    startKtActivityOrForResult<ActivityCollectionDetail>()
-                }
-            }else{
-                recycleView.adapter = mOutSaleAdapter
+    @SuppressLint("CheckResult")
+    fun indexCollectionList() {
+        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
+            .indexCollectionList(Hawk.get(HawkConstant.TOKEN), 0, 0)
+            .compose(RxSchedulers.applySchedulers())
+            .subscribe({
+                if (it.code == 1) {
 
-                for (i in 0..2){
-                    list.add(GoodsBean())
-                }
-                mOutSaleAdapter.addDataAll(list)
-                mOutSaleAdapter.notifyDataSetChanged()
-            }
+                    it.data?.let { it1 -> mAdapter.addDataAll(it1) }
+                    mAdapter.notifyDataSetChanged()
 
-        }
+                    mAdapter.addOnItemClickListener { view, entity, position ->
+                        bundle.putInt("id", entity.id ?: 0)
+                        startKtActivityOrForResult<ActivityCollectionDetail>(bundle = bundle)
+                    }
+                }
+            }, {
+                Log.e("searchGoodsDetail", it.message.toString())
+            })
     }
 
-    /*@SuppressLint("CheckResult")
-    fun searchGoodsDetail() {
+    @SuppressLint("CheckResult")
+    fun CollectionCalendar() {
         HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .searchGoodsDetail(goods_id, Hawk.get(HawkConstant.USER_ID))
+            .CollectionCalendar(Hawk.get(HawkConstant.TOKEN), 0)
             .compose(RxSchedulers.applySchedulers())
             .subscribe({
-                if (it.code == 200) {
-                    var data = it.data
+                if (it.code == 1) {
+                    it?.data?.let { it1 -> mOutSaleAdapter.addDataAll(it1) }
+                    mOutSaleAdapter.notifyDataSetChanged()
 
+                    mOutSaleAdapter.addOnItemClickListener { view, entity, position ->
+                        startKtActivityOrForResult<ActivityCollectionDetail>()
+                    }
                 }
             }, {
-                Log.e(TAG, it.message.toString())
+                Log.e("searchGoodsDetail", it.message.toString())
             })
-    }*/
+    }
 
     override fun onClick(v: View?) {
         when (v?.id) {
 
         }
     }
+
+    /**
+     * 接收未登录信息
+     */
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    fun eventBusLogin(logOutEvent: LogOutEvent) {
+        CollectionCalendar()
+    }
 }

+ 56 - 9
app/src/main/java/com/hdl/xl/ui/fragments/HomeFragment.kt

@@ -2,10 +2,7 @@ package com.hdl.xl.ui.fragments
 
 import android.annotation.SuppressLint
 import android.content.Context
-import android.graphics.Color
-import android.graphics.LinearGradient
-import android.graphics.Shader
-import android.graphics.Typeface
+import android.graphics.*
 import android.os.Bundle
 import android.os.Handler
 import android.os.Message
@@ -14,6 +11,7 @@ import android.text.Spanned
 import android.text.style.StyleSpan
 import android.util.Log
 import android.view.*
+import android.widget.LinearLayout
 import androidx.databinding.DataBindingUtil
 import androidx.fragment.app.Fragment
 import com.google.android.material.tabs.TabLayout
@@ -22,7 +20,7 @@ import com.hdl.xl.bean.BannerBean
 import com.hdl.xl.bean.CommodityBean
 import com.hdl.xl.databinding.HomeFragmentBinding
 import com.hdl.xl.service.HttpApi_xie
-import com.hdl.xl.ui.activitys.ActivityProductCategory
+import com.hdl.xl.ui.adapter.ImageAdapter
 import com.laike.basekt.BaseFragment
 import com.laike.basekt.FragmentAdapter
 import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
@@ -30,6 +28,8 @@ import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
 import com.laike.basekt.utils.HawkConstant
 import com.laike.basekt.utils.StatusBarCommon
 import com.orhanobut.hawk.Hawk
+import com.youth.banner.Banner
+import com.youth.banner.indicator.CircleIndicator
 import com.youth.banner.listener.OnBannerListener
 
 
@@ -68,6 +68,17 @@ class HomeFragment : BaseFragment(), View.OnClickListener, OnBannerListener<Bann
                 0
             )
 
+            bXiangce?.outlineProvider = object : ViewOutlineProvider() {
+                override fun getOutline(p0: View?, p1: Outline?) {
+                    p1?.setRoundRect(0, 0, view.width, view.height, 18f)
+                }
+            }
+            bXiangce.clipToOutline = true
+            val params = bXiangce.layoutParams as LinearLayout.LayoutParams
+            params.height = getScreenWidth(mActivity) / 2
+            bXiangce.layoutParams = params
+
+
             titles= arrayOf("精选推荐","发售日历")
             loadFragmentDetail(0)
             loadFragmentDetail(1)
@@ -98,11 +109,32 @@ class HomeFragment : BaseFragment(), View.OnClickListener, OnBannerListener<Bann
             })
 
             setGradientColor()
-
+            searchBanner()
             searchHomeData()
         }
     }
 
+    @SuppressLint("CheckResult")
+    fun searchBanner() {
+        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
+            .getBanner(Hawk.get(HawkConstant.TOKEN))
+            .compose(RxSchedulers.applySchedulers())
+            .subscribe({
+                if (it.code == 1) {
+                    var data = it.data
+
+                    data?.let { it1 ->
+                        makeBannerImages(
+                            it1,
+                            mBinding?.bXiangce as Banner<BannerBean, ImageAdapter>
+                        )
+                    }
+                }
+            }, {
+                Log.e("searchHomeData", it.message.toString())
+            })
+    }
+
     private fun setGradientColor() {
         val colors = intArrayOf(Color.parseColor("#FFDA4E"), Color.parseColor("#59FFF1"), Color.parseColor("#2BA3FF"))
         val position = floatArrayOf(0f, 1.0f,2.0f)
@@ -130,7 +162,7 @@ class HomeFragment : BaseFragment(), View.OnClickListener, OnBannerListener<Bann
 
     @SuppressLint("CheckResult")
     fun searchHomeData() {
-        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
+        /*HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
             .searchHome(Hawk.get(HawkConstant.TOKEN))
             .compose(RxSchedulers.applySchedulers())
             .subscribe({
@@ -142,7 +174,7 @@ class HomeFragment : BaseFragment(), View.OnClickListener, OnBannerListener<Bann
                 }
             }, {
                 Log.e("searchHomeData", it.message.toString())
-            })
+            })*/
     }
 
 
@@ -203,6 +235,21 @@ class HomeFragment : BaseFragment(), View.OnClickListener, OnBannerListener<Bann
         handler.removeCallbacks(update_thread)
     }
 
+    /**
+     * 创建轮播图数据
+     */
+    private fun makeBannerImages(
+        info: MutableList<BannerBean>,
+        bXiangce: Banner<BannerBean, ImageAdapter>
+    ) {
+        bXiangce.adapter = ImageAdapter(info)
+        bXiangce.indicator = CircleIndicator(mActivity)
+        bXiangce.setIndicatorNormalColorRes(R.color.white)
+        bXiangce.setIndicatorSelectedColorRes(R.color.white)
+        bXiangce.setOnBannerListener(this)
+        bXiangce.isAutoLoop(true)//自动轮播
+    }
+
     override fun OnBannerClick(data: BannerBean?, position: Int) {}
 
     //获取屏幕的宽度
@@ -216,7 +263,7 @@ class HomeFragment : BaseFragment(), View.OnClickListener, OnBannerListener<Bann
     override fun onClick(v: View?) {
         when (v?.id) {
             R.id.search_btn -> {
-                ActivityProductCategory.START(mActivity,"search","","","")
+                //ActivityProductCategory.START(mActivity,"search","","","")
             }
         }
     }

+ 12 - 11
app/src/main/java/com/hdl/xl/ui/fragments/MineFragment.kt

@@ -48,16 +48,19 @@ class MineFragment : BaseFragment(), View.OnClickListener {
     @SuppressLint("CheckResult")
     fun searchUserData() {
         HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .searchPersonalCenter(Hawk.get(HawkConstant.TOKEN))
+            .getUserInfo(Hawk.get(HawkConstant.TOKEN))
             .compose(RxSchedulers.applySchedulers())
             .subscribe({
-                if (it.code == 200) {
-                    mBinding?.bean=it.data
-                    context?.let { it1 -> mBinding?.ivPhoto?.let { it2 ->
-                        Glide.with(it1).load(it.data?.head).into(
-                            it2
-                        )
-                    } }
+                if (it.code == 1) {
+                    mBinding?.run {
+                        bean=it.data
+                        context?.let { it1 -> ivPhoto?.let { it2 ->
+                            Glide.with(it1).load(it.data?.head).into(
+                                it2
+                            )
+                        } }
+                    }
+
                 }
             }, {
                 Log.e("searchUserData", it.message.toString())
@@ -74,9 +77,7 @@ class MineFragment : BaseFragment(), View.OnClickListener {
                 startKtActivityOrForResult<ActivityMyWallet>()
             }
 
-            R.id.shipping_address_btn -> {
-                startKtActivityOrForResult<ActivityShippingAddress>()
-            }
+
 
             R.id.no_pay_btn -> {
                 bundle.putInt("type", 0)

+ 16 - 12
app/src/main/java/com/hdl/xl/viewModels/LoginViewModel.kt

@@ -31,11 +31,15 @@ class LoginViewModel(application: Application) :
             .phoneLogin(phone, password)
             .compose(RxSchedulers.applySchedulers())
             .subscribe({
-                Toast.makeText(getApplication(),it.msg,Toast.LENGTH_SHORT).show()
-                if (it.code==200){
-                    loginSuccessful(it.data!!)
+                Toast.makeText(getApplication(), it.msg, Toast.LENGTH_SHORT).show()
+                if (it.code == 1) {
+                    Hawk.put(HawkConstant.TOKEN, it.data)
+                    SessionUtil.get().update(it.data, it.data)
+                    var loginEntity = LoginEntity()
+                    loginEntity.token = it?.data
+                    EventBus.getDefault().post(loginEntity)
                 }
-            }, {error->
+            }, { error ->
                 Log.d(TAG, "手机号登录:${error.message}")
                 Toast.makeText(getApplication(), error.message, Toast.LENGTH_SHORT).show()
             })
@@ -44,14 +48,14 @@ class LoginViewModel(application: Application) :
     /**
      *登录成功后向本地存储信息
      */
-    private fun loginSuccessful(loginEntity: LoginEntity){
-        Hawk.put(HawkConstant.LOGIN_INFORMATION,loginEntity)
-        Hawk.put(HawkConstant.USER_PHONE,loginEntity.phone)
-        Hawk.put(HawkConstant.TOKEN,loginEntity.token)
-        Hawk.put(HawkConstant.USER_ID,loginEntity.id)
-        Hawk.put(HawkConstant.ROLE,loginEntity.role)
-        Hawk.put(HawkConstant.AGENT_ROLE,loginEntity.agent_role)
-        SessionUtil.get().update(loginEntity.id.toString(),loginEntity.token)
+    private fun loginSuccessful(loginEntity: LoginEntity) {
+        Hawk.put(HawkConstant.LOGIN_INFORMATION, loginEntity)
+        Hawk.put(HawkConstant.USER_PHONE, loginEntity.phone)
+        Hawk.put(HawkConstant.TOKEN, loginEntity.token)
+        Hawk.put(HawkConstant.USER_ID, loginEntity.id)
+        Hawk.put(HawkConstant.ROLE, loginEntity.role)
+        Hawk.put(HawkConstant.AGENT_ROLE, loginEntity.agent_role)
+        SessionUtil.get().update(loginEntity.id.toString(), loginEntity.token)
         EventBus.getDefault().post(loginEntity)
     }
 }

+ 5 - 0
app/src/main/res/drawable/bg_gray_set.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/gray_E6"/>
+    <corners android:radius="6dp" />
+</shape>

+ 0 - 161
app/src/main/res/layout/activity_add_shipping_address.xml

@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <data>
-
-        <variable
-            name="clickListener"
-            type="android.view.View.OnClickListener" />
-    </data>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="#F2F2F2"
-        android:orientation="vertical">
-
-        <include
-            android:id="@+id/include_title"
-            layout="@layout/include_title_bar"
-            app:clickListener="@{clickListener}" />
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="44dp"
-            android:layout_marginTop="5dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:paddingLeft="15dp"
-            android:paddingRight="34dp">
-
-            <TextView
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="wrap_content"
-                android:text="收货人"
-                android:textColor="#000000"
-                android:textSize="15sp" />
-            <androidx.appcompat.widget.AppCompatEditText
-                android:id="@+id/input_user_name"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:textSize="12sp"
-                android:background="@null"
-                android:hint="请输入收货人"/>
-
-        </LinearLayout>
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="44dp"
-            android:layout_marginTop="1dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:paddingLeft="15dp"
-            android:paddingRight="34dp">
-
-            <TextView
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="wrap_content"
-                android:text="手机号"
-                android:textColor="#000000"
-                android:textSize="14sp" />
-            <androidx.appcompat.widget.AppCompatEditText
-                android:id="@+id/input_phone"
-                android:inputType="phone"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:textSize="12sp"
-                android:background="@null"
-                android:hint="填写手机号"/>
-        </LinearLayout>
-        <LinearLayout
-            android:id="@+id/select_address"
-            android:onClick="@{clickListener}"
-            android:layout_width="match_parent"
-            android:layout_height="44dp"
-            android:layout_marginTop="1dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:paddingLeft="15dp"
-            android:paddingRight="5dp">
-
-            <TextView
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="wrap_content"
-                android:text="所在地区"
-                android:textColor="#000000"
-                android:textSize="14sp" />
-            <TextView
-                android:id="@+id/address"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textColor="#808080"
-                android:textSize="12sp"
-                android:layout_marginRight="5dp"
-                android:text="请选择所在地区"/>
-
-            <androidx.appcompat.widget.AppCompatImageView
-                android:layout_width="25dp"
-                android:layout_height="15dp"
-                android:src="@mipmap/next_black_img"/>
-        </LinearLayout>
-        <androidx.appcompat.widget.AppCompatEditText
-            android:id="@+id/input_address"
-            android:layout_width="match_parent"
-            android:layout_height="120dp"
-            android:layout_marginTop="1dp"
-            android:background="@color/picture_color_white"
-            android:gravity="left"
-            android:textSize="14sp"
-            android:paddingLeft="14dp"
-            android:paddingRight="14dp"
-            android:paddingTop="21dp"
-            android:paddingBottom="21dp"
-            android:hint="详细地址: 如道路,门牌号,小区,楼道号,单元室."/>
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="44dp"
-            android:layout_marginTop="1dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:paddingLeft="15dp"
-            android:paddingRight="21dp">
-
-            <TextView
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="wrap_content"
-                android:text="设为默认地址"
-                android:textColor="#000000"
-                android:textSize="14sp" />
-            <Switch
-                android:id="@+id/switch_btn"
-                android:onClick="@{clickListener}"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:thumb="@drawable/selector_thumb"
-                android:layout_gravity="center_vertical"
-                android:track="@drawable/selector_track"/>
-        </LinearLayout>
-        <TextView
-            android:id="@+id/confirm_button"
-            android:onClick="@{clickListener}"
-            android:layout_width="match_parent"
-            android:layout_height="49dp"
-            android:gravity="center"
-            android:textSize="16sp"
-            android:textColor="#FFFFFF"
-            android:background="@drawable/bg_finish_button"
-            android:layout_marginLeft="100dp"
-            android:layout_marginRight="100dp"
-            android:layout_marginTop="200dp"
-            android:text="保存"/>
-
-    </LinearLayout>
-</layout>

+ 35 - 22
app/src/main/res/layout/activity_collection_detail.xml

@@ -37,7 +37,7 @@
                     android:background="@drawable/bg_collect_bg_frame"
                     android:gravity="center_horizontal"
                     android:orientation="vertical"
-                    android:padding="20dp">
+                    android:padding="15dp">
 
                     <androidx.cardview.widget.CardView
                         android:layout_width="match_parent"
@@ -45,6 +45,7 @@
                         app:cardCornerRadius="20dp">
 
                         <androidx.appcompat.widget.AppCompatImageView
+                            android:id="@+id/iv_cover"
                             android:layout_width="match_parent"
                             android:layout_height="match_parent"
                             android:scaleType="fitXY"
@@ -52,6 +53,7 @@
                     </androidx.cardview.widget.CardView>
 
                     <TextView
+                        android:id="@+id/name_text"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="16dp"
@@ -66,6 +68,7 @@
                         android:orientation="horizontal">
 
                         <TextView
+                            android:id="@+id/sale_num"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:text="发售量 1000份"
@@ -73,6 +76,7 @@
                             android:textSize="10sp" />
 
                         <TextView
+                            android:id="@+id/circulation_num"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:layout_marginLeft="10dp"
@@ -81,6 +85,7 @@
                             android:textSize="10sp" />
 
                         <TextView
+                            android:id="@+id/in_stock_num"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:layout_marginLeft="10dp"
@@ -139,6 +144,7 @@
                             android:textSize="13sp" />
 
                         <TextView
+                            android:id="@+id/certi_name"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:text="蚂蚁链HasH"
@@ -146,18 +152,18 @@
                             android:textSize="13sp" />
                     </LinearLayout>
 
-                    <LinearLayout
+                    <RelativeLayout
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="14dp"
                         android:layout_marginBottom="10dp"
-                        android:gravity="center_vertical"
                         android:orientation="horizontal">
 
                         <TextView
-                            android:layout_width="0dp"
+                            android:id="@+id/text1"
+                            android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_weight="1"
+                            android:layout_centerVertical="true"
                             android:text="合约地址"
                             android:textColor="#999"
                             android:textSize="13sp" />
@@ -166,16 +172,25 @@
                             android:id="@+id/refund_btn"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_marginRight="5dp"
-                            android:text="jdhhdeu2i12u8392…jncnnq0qjndnd"
+                            android:layout_centerVertical="true"
+                            android:layout_marginLeft="10dp"
+                            android:layout_toLeftOf="@+id/copy_btn"
+                            android:layout_toRightOf="@+id/text1"
+                            android:text="jdhhdeu2i12u8392…jncnnq0qjndndjjdhhdeh392…jncnnq0qjndnd"
                             android:textColor="@color/white"
                             android:textSize="12sp" />
 
                         <androidx.appcompat.widget.AppCompatImageView
+                            android:id="@+id/copy_btn"
                             android:layout_width="12dp"
                             android:layout_height="12dp"
+                            android:layout_alignParentRight="true"
+                            android:layout_centerVertical="true"
+                            android:layout_marginLeft="5dp"
+                            android:onClick="@{clickListener}"
                             android:src="@mipmap/copy_button" />
-                    </LinearLayout>
+
+                    </RelativeLayout>
 
                 </LinearLayout>
 
@@ -211,19 +226,11 @@
                             android:src="@mipmap/certification_tubiao" />
                     </RelativeLayout>
 
-                    <androidx.cardview.widget.CardView
+                    <com.youth.banner.Banner
+                        android:id="@+id/b_xiangce"
                         android:layout_width="match_parent"
                         android:layout_height="500dp"
-                        android:layout_marginTop="14dp"
-                        app:cardCornerRadius="16dp">
-
-                        <androidx.appcompat.widget.AppCompatImageView
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:scaleType="fitXY"
-                            android:src="@mipmap/xyj" />
-
-                    </androidx.cardview.widget.CardView>
+                        android:layout_marginTop="14dp" />
 
 
                     <LinearLayout
@@ -241,6 +248,7 @@
                             android:textSize="13sp" />
 
                         <TextView
+                            android:id="@+id/sale_name_text"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:text="蚂蚁财富社区"
@@ -265,6 +273,7 @@
                             android:textSize="13sp" />
 
                         <TextView
+                            android:id="@+id/sale_time"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:text="2022-06-28"
@@ -296,7 +305,7 @@
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:layout_marginLeft="18dp"
-                            android:text="认证信息"
+                            android:text="权益说明"
                             android:textColor="@color/white"
                             android:textSize="18sp" />
 
@@ -307,6 +316,7 @@
                     </RelativeLayout>
 
                     <TextView
+                        android:id="@+id/record_info_text"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="10dp"
@@ -351,6 +361,7 @@
                     </RelativeLayout>
 
                     <TextView
+                        android:id="@+id/buy_notice_text"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="10dp"
@@ -516,6 +527,7 @@
             android:paddingBottom="20dp">
 
             <TextView
+                android:id="@+id/price_text"
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
                 android:layout_marginLeft="16dp"
@@ -526,7 +538,6 @@
 
             <TextView
                 android:id="@+id/paying_button"
-                android:visibility="gone"
                 android:layout_width="wrap_content"
                 android:layout_height="45dp"
                 android:layout_marginRight="15dp"
@@ -539,7 +550,9 @@
                 android:paddingBottom="3dp"
                 android:text="该藏品正在支付"
                 android:textColor="@color/white"
-                android:textSize="16sp" />
+                android:textSize="16sp"
+                android:visibility="gone" />
+
             <TextView
                 android:id="@+id/liji_buy"
                 android:layout_width="wrap_content"

+ 0 - 81
app/src/main/res/layout/activity_details_first.xml

@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-    <data>
-        <variable
-            name="clickListener"
-            type="android.view.View.OnClickListener" />
-    </data>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="#F2F2F2"
-        android:orientation="vertical">
-        <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/layout_title"
-            android:layout_width="match_parent"
-            android:layout_height="60dp"
-            android:background="@color/white">
-
-            <com.google.android.material.tabs.TabLayout
-                android:id="@+id/tab_layout"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_marginTop="1dp"
-                android:background="#fff"
-                android:paddingBottom="2dp"
-                app:tabGravity="fill"
-                app:tabIndicator="@drawable/tab_layout_point"
-                app:tabIndicatorColor="#FF4430"
-                app:tabIndicatorFullWidth="false"
-                app:tabIndicatorHeight="3px"
-                app:tabMode="auto"
-                app:tabRippleColor="@color/transparent"
-                app:tabSelectedTextColor="#FF4430"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"/>
-
-            <LinearLayout
-                android:id="@+id/go_back"
-                android:layout_width="50dp"
-                android:layout_height="50dp"
-                android:gravity="center"
-                android:onClick="@{clickListener}"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                >
-                <androidx.appcompat.widget.AppCompatImageView
-                    android:id="@+id/back_btn"
-                    android:layout_width="8dp"
-                    android:layout_height="15dp"
-                    android:background="@mipmap/back_black" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:id="@+id/img_set"
-                android:layout_width="50dp"
-                android:layout_height="50dp"
-                android:gravity="center"
-                android:onClick="@{clickListener}"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                >
-                <androidx.appcompat.widget.AppCompatImageView
-                    android:layout_width="20dp"
-                    android:layout_height="20dp"
-                    android:src="@mipmap/shape_img" />
-            </LinearLayout>
-
-
-
-
-        </androidx.constraintlayout.widget.ConstraintLayout>
-        <androidx.viewpager.widget.ViewPager
-            android:id="@+id/viewPagerId"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" />
-    </LinearLayout>
-
-</layout>

+ 0 - 122
app/src/main/res/layout/activity_edit_bank_card.xml

@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <data>
-
-        <variable
-            name="clickListener"
-            type="android.view.View.OnClickListener" />
-    </data>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="#F2F2F2"
-        android:orientation="vertical">
-
-        <include
-            android:id="@+id/include_title"
-            layout="@layout/include_title_bar"
-            app:clickListener="@{clickListener}" />
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="44dp"
-            android:layout_marginTop="5dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:paddingLeft="15dp"
-            android:paddingRight="34dp">
-
-            <TextView
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="wrap_content"
-                android:text="持卡人"
-                android:textColor="#000000"
-                android:textSize="15sp" />
-            <androidx.appcompat.widget.AppCompatEditText
-                android:id="@+id/input_user_name"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:textSize="12sp"
-                android:background="@null"
-                android:hint="填写持卡人姓名"/>
-
-        </LinearLayout>
-        <LinearLayout
-            android:id="@+id/select_bank"
-            android:onClick="@{clickListener}"
-            android:layout_width="match_parent"
-            android:layout_height="44dp"
-            android:layout_marginTop="5dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:paddingLeft="15dp"
-            android:paddingRight="5dp">
-
-            <TextView
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="wrap_content"
-                android:text="银行"
-                android:textColor="#000000"
-                android:textSize="14sp" />
-            <TextView
-                android:id="@+id/bank"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textColor="#808080"
-                android:textSize="12sp"
-                android:layout_marginRight="10dp"
-                android:text="选择银行"/>
-
-            <androidx.appcompat.widget.AppCompatImageView
-                android:layout_width="25dp"
-                android:layout_height="15dp"
-                android:src="@mipmap/next_black_img"/>
-        </LinearLayout>
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="44dp"
-            android:layout_marginTop="1dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:paddingLeft="15dp"
-            android:paddingRight="34dp">
-
-            <TextView
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="wrap_content"
-                android:text="银行卡号"
-                android:textColor="#000000"
-                android:textSize="14sp" />
-            <androidx.appcompat.widget.AppCompatEditText
-                android:id="@+id/input_bank_card_num"
-                android:inputType="number"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:textSize="12sp"
-                android:background="@null"
-                android:hint="填写银行卡号"/>
-        </LinearLayout>
-        <TextView
-            android:id="@+id/confirm_button"
-            android:onClick="@{clickListener}"
-            android:layout_width="match_parent"
-            android:layout_height="49dp"
-            android:gravity="center"
-            android:textSize="16sp"
-            android:textColor="#FFFFFF"
-            android:background="@drawable/bg_finish_button"
-            android:layout_marginLeft="15dp"
-            android:layout_marginRight="15dp"
-            android:layout_marginTop="200dp"
-            android:text="确认"/>
-
-    </LinearLayout>
-</layout>

+ 0 - 6
app/src/main/res/layout/activity_forget_password.xml

@@ -74,7 +74,6 @@
                         android:layout_weight="1"
                         android:background="@null"
                         android:hint="请输入验证码"
-                        android:inputType="textPassword"
                         android:paddingLeft="30dp"
                         android:textColorHint="#666666"
                         android:textColor="@color/white"
@@ -114,11 +113,6 @@
                     android:textColorHint="#666666"
                     android:textSize="15sp" />
 
-
-
-
-
-
                 <TextView
                     android:id="@+id/button_registered"
                     android:layout_width="match_parent"

+ 0 - 87
app/src/main/res/layout/activity_my_bank_card.xml

@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <data>
-
-        <variable
-            name="clickListener"
-            type="android.view.View.OnClickListener" />
-    </data>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="#F2F2F2"
-        android:orientation="vertical">
-
-        <include
-            android:id="@+id/include_title"
-            layout="@layout/include_title_bar_text"
-            app:clickListener="@{clickListener}" />
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="44dp"
-            android:layout_marginTop="5dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:paddingLeft="15dp"
-            android:paddingRight="5dp">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="持卡人:"
-                android:textColor="#808080"
-                android:textSize="15sp" />
-
-            <TextView
-                android:id="@+id/user_name"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginRight="10dp"
-                android:textColor="#000000"
-                android:textSize="15sp" />
-        </LinearLayout>
-
-
-        <TextView
-            android:id="@+id/bank"
-            android:layout_width="match_parent"
-            android:layout_height="44dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:paddingLeft="15dp"
-            android:textColor="#000000"
-            android:textSize="14sp" />
-
-
-        <LinearLayout
-            android:id="@+id/edit_password"
-            android:layout_width="match_parent"
-            android:layout_height="44dp"
-            android:layout_marginTop="1dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:onClick="@{clickListener }"
-            android:paddingLeft="15dp"
-            android:paddingRight="5dp">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="卡号:"
-                android:textColor="#000000"
-                android:textSize="14sp" />
-
-            <TextView
-                android:id="@+id/bank_card_num"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginRight="10dp"
-                android:textColor="#333333"
-                android:textSize="21sp" />
-        </LinearLayout>
-    </LinearLayout>
-</layout>

+ 0 - 262
app/src/main/res/layout/activity_product_category.xml

@@ -1,262 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <data>
-        <variable
-            name="clickListener"
-            type="android.view.View.OnClickListener" />
-    </data>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="#F2F2F2"
-        android:orientation="vertical">
-
-        <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/layout_title"
-            android:layout_width="match_parent"
-            android:layout_height="60dp"
-            android:background="@color/picture_color_white">
-
-            <LinearLayout
-                android:id="@+id/go_back"
-                android:layout_width="50dp"
-                android:layout_height="50dp"
-                android:gravity="center"
-                android:onClick="@{clickListener}"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent">
-
-                <androidx.appcompat.widget.AppCompatImageView
-                    android:id="@+id/back_btn"
-                    android:layout_width="8dp"
-                    android:layout_height="15dp"
-                    android:background="@mipmap/back_black" />
-            </LinearLayout>
-
-            <androidx.appcompat.widget.AppCompatTextView
-                android:id="@+id/search_btn"
-                android:onClick="@{clickListener}"
-                android:layout_width="match_parent"
-                android:layout_height="36dp"
-                android:layout_marginLeft="@dimen/dp50"
-                android:layout_marginRight="12dp"
-                android:background="@drawable/bg_search_background"
-                android:drawableLeft="@drawable/ic_search"
-                android:drawablePadding="5dp"
-                android:gravity="center_vertical"
-                android:hint="请输入..."
-                android:paddingHorizontal="5dp"
-                android:paddingVertical="5dp"
-                android:textSize="12sp"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-        </androidx.constraintlayout.widget.ConstraintLayout>
-
-        <include
-            android:id="@+id/include_title"
-            layout="@layout/include_title_bar"
-            android:visibility="gone"
-            app:clickListener="@{clickListener}" />
-
-        <TextView
-            android:id="@+id/shop_name"
-            android:visibility="gone"
-            android:layout_width="match_parent"
-            android:layout_height="30dp"
-            android:background="#424242"
-            android:textColor="#FFFFFF"
-            android:gravity="center_vertical"
-            android:paddingLeft="16dp"
-            android:textSize="16sp"/>
-        <LinearLayout
-            android:id="@+id/man_jian"
-            android:visibility="gone"
-            android:layout_width="match_parent"
-            android:layout_height="41dp"
-            android:orientation="horizontal"
-            android:gravity="center_vertical"
-            android:background="#424242"
-            android:paddingRight="12dp"
-            android:paddingLeft="16dp">
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:background="#FF4430"
-                android:paddingLeft="10dp"
-                android:paddingRight="10dp"
-                android:paddingTop="4dp"
-                android:paddingBottom="4dp"
-                android:textColor="@color/picture_color_white"
-                android:textSize="11sp"
-                android:text="满减"/>
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="12dp"
-                android:textColor="@color/picture_color_white"
-                android:ellipsize="end"
-                android:maxLines="1"
-                android:textSize="13sp"
-                android:text="本店铺购满360元减5 满959元减10满2399元减30"/>
-
-        </LinearLayout>
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="35dp"
-            android:layout_marginTop="2dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:orientation="horizontal">
-
-            <RelativeLayout
-                android:id="@+id/complex_button"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:onClick="@{clickListener}"
-                android:orientation="vertical">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerInParent="true"
-                    android:text="综合"
-                    android:textColor="#999999"
-                    android:textSize="14sp" />
-
-                <View
-                    android:id="@+id/complex_view"
-                    android:layout_width="32dp"
-                    android:layout_height="2dp"
-                    android:layout_alignParentBottom="true"
-                    android:layout_centerHorizontal="true"
-                    android:background="#FF4430" />
-            </RelativeLayout>
-
-            <View
-                android:layout_width="0.1dp"
-                android:layout_height="20dp"
-                android:background="#E6E6E6" />
-
-            <RelativeLayout
-                android:id="@+id/price_button"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:onClick="@{clickListener}"
-                android:orientation="vertical">
-
-                <LinearLayout
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerInParent="true"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="价格"
-                        android:textColor="#999999"
-                        android:textSize="14sp" />
-
-                    <androidx.appcompat.widget.AppCompatImageView
-                        android:id="@+id/price_select"
-                        android:layout_width="10dp"
-                        android:layout_height="5dp"
-                        android:layout_marginLeft="5dp"
-                        android:src="@mipmap/xia_sanjiao"
-                        android:visibility="gone" />
-                </LinearLayout>
-
-                <View
-                    android:id="@+id/price_view"
-                    android:layout_width="45dp"
-                    android:layout_height="2dp"
-                    android:layout_alignParentBottom="true"
-                    android:layout_centerHorizontal="true"
-                    android:background="#FF4430"
-                    android:visibility="gone" />
-            </RelativeLayout>
-
-            <View
-                android:layout_width="0.1dp"
-                android:layout_height="20dp"
-                android:background="#E6E6E6" />
-
-            <RelativeLayout
-                android:id="@+id/sales_button"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:onClick="@{clickListener}"
-                android:orientation="vertical">
-
-                <LinearLayout
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerInParent="true"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="销量"
-                        android:textColor="#999999"
-                        android:textSize="14sp" />
-
-                    <androidx.appcompat.widget.AppCompatImageView
-                        android:id="@+id/sales_select"
-                        android:layout_width="10dp"
-                        android:layout_height="5dp"
-                        android:layout_marginLeft="5dp"
-                        android:src="@mipmap/xia_sanjiao"
-                        android:visibility="gone" />
-                </LinearLayout>
-
-                <View
-                    android:id="@+id/sales_view"
-                    android:layout_width="45dp"
-                    android:layout_height="2dp"
-                    android:layout_alignParentBottom="true"
-                    android:layout_centerHorizontal="true"
-                    android:background="#FF4430"
-                    android:visibility="gone" />
-            </RelativeLayout>
-
-
-
-        </LinearLayout>
-
-        <com.scwang.smartrefresh.layout.SmartRefreshLayout
-            android:id="@+id/smart_refresh_layout"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content">
-
-            <com.scwang.smartrefresh.header.WaterDropHeader
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content" />
-
-            <androidx.core.widget.NestedScrollView
-                android:layout_width="match_parent"
-                android:layout_height="match_parent">
-
-                <androidx.recyclerview.widget.RecyclerView
-                    android:id="@+id/recycle_view"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:paddingRight="10dp" />
-            </androidx.core.widget.NestedScrollView>
-        </com.scwang.smartrefresh.layout.SmartRefreshLayout>
-
-    </LinearLayout>
-
-</layout>

+ 3 - 1
app/src/main/res/layout/activity_registration.xml

@@ -68,7 +68,7 @@
                         android:layout_weight="1"
                         android:background="@null"
                         android:hint="请输入验证码"
-                        android:inputType="textPassword"
+                        android:inputType="number"
                         android:paddingLeft="30dp"
                         android:textColorHint="#666666"
                         android:textColor="@color/white"
@@ -176,6 +176,8 @@
                     android:orientation="horizontal">
 
                     <androidx.appcompat.widget.AppCompatImageView
+                        android:id="@+id/select_button"
+                        android:onClick="@{clickListener}"
                         android:layout_width="14dp"
                         android:layout_height="14dp"
                         android:src="@mipmap/select_no"/>

+ 0 - 47
app/src/main/res/layout/activity_shipping_address.xml

@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <data>
-
-        <variable
-            name="clickListener"
-            type="android.view.View.OnClickListener" />
-    </data>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="#F2F2F2"
-        android:orientation="vertical">
-
-        <include
-            android:id="@+id/include_title"
-            layout="@layout/include_title_bar"
-            app:clickListener="@{clickListener}" />
-
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_marginTop="5dp">
-            <androidx.recyclerview.widget.RecyclerView
-                android:id="@+id/recycle_view"
-                android:layout_marginBottom="50dp"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"/>
-            <TextView
-                android:id="@+id/add_address"
-                android:onClick="@{clickListener}"
-                android:layout_width="match_parent"
-                android:layout_height="49dp"
-                android:gravity="center"
-                android:textSize="16sp"
-                android:textColor="#FFFFFF"
-                android:background="#FF4430"
-                android:layout_alignParentBottom="true"
-                android:text="添加收货地址"/>
-        </RelativeLayout>
-
-
-    </LinearLayout>
-</layout>

+ 0 - 137
app/src/main/res/layout/dialog_select_product_specifications.xml

@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <data>
-        <import type="android.view.View.OnClickListener" />
-        <variable
-            name="clickListener"
-            type="OnClickListener" />
-        <variable
-            name="bean"
-            type="com.hdl.xl.bean.GoodsDetailBean" />
-    </data>
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="300dp"
-        android:background="@color/picture_color_white">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="40dp">
-
-                <androidx.appcompat.widget.AppCompatImageView
-                    android:id="@+id/cancel_button"
-                    android:onClick="@{clickListener}"
-                    android:layout_width="20dp"
-                    android:layout_height="20dp"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:layout_marginRight="10dp"
-                    android:src="@mipmap/cancal_btn" />
-            </RelativeLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="95dp"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:paddingLeft="11dp"
-                android:paddingRight="11dp">
-
-                <androidx.cardview.widget.CardView
-                    android:layout_width="70dp"
-                    android:layout_height="70dp"
-                    app:cardCornerRadius="6dp">
-
-                    <androidx.appcompat.widget.AppCompatImageView
-                        android:id="@+id/ivPhoto"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:src="@mipmap/fengshan" />
-                </androidx.cardview.widget.CardView>
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="70dp"
-                    android:layout_marginLeft="10dp"
-                    android:orientation="vertical">
-
-                    <TextView
-                        android:layout_width="match_parent"
-                        android:layout_height="0dp"
-                        android:layout_weight="1"
-                        android:ellipsize="end"
-                        android:maxLines="2"
-                        android:text="@{bean.name}"
-                        android:textColor="#000"
-                        android:textSize="13sp" />
-
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:orientation="horizontal">
-
-                        <TextView
-                            android:layout_width="0dp"
-                            android:layout_height="wrap_content"
-                            android:layout_weight="1"
-                            android:text="¥23.5 - 24.6"
-                            android:textColor="#FF4430"
-                            android:textSize="13sp" />
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="@{`货号:`+bean.good_number}"
-                            android:textColor="#000"
-                            android:textSize="12sp" />
-                    </LinearLayout>
-                </LinearLayout>
-
-
-            </LinearLayout>
-
-            <androidx.recyclerview.widget.RecyclerView
-                android:id="@+id/recycle_view"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content" />
-        </LinearLayout>
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="49dp"
-            android:layout_alignParentBottom="true"
-            android:orientation="horizontal">
-
-            <TextView
-                android:id="@+id/add_purchase_order"
-                android:onClick="@{clickListener}"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:background="#FF7E30"
-                android:gravity="center"
-                android:text="加入进货单"
-                android:textColor="#FFFFFF"
-                android:textSize="16sp" />
-
-            <TextView
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:background="#FF392B"
-                android:gravity="center"
-                android:text="前往进货单"
-                android:textColor="#FFF"
-                android:textSize="16sp" />
-
-        </LinearLayout>
-    </RelativeLayout>
-</layout>

+ 0 - 334
app/src/main/res/layout/fragment_commidity.xml

@@ -1,334 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <data>
-        <variable
-            name="clickListener"
-            type="android.view.View.OnClickListener" />
-        <variable
-            name="bean"
-            type="com.hdl.xl.bean.GoodsDetailBean" />
-    </data>
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <androidx.core.widget.NestedScrollView
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:background="#F2F2F2"
-                android:orientation="vertical">
-
-                <com.lake.banner.HBanner
-                    android:id="@+id/banner"
-                    android:onClick="@{clickListener}"
-                    android:layout_width="match_parent"
-                    android:layout_height="350dp"/>
-
-                <LinearLayout
-                    android:id="@+id/limited_time_layout"
-                    android:visibility="gone"
-                    android:layout_width="match_parent"
-                    android:layout_height="55dp"
-                    android:background="#FF4430"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal"
-                    android:paddingLeft="11dp"
-                    android:paddingRight="11dp">
-
-                    <LinearLayout
-                        android:layout_width="0dp"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:orientation="vertical">
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="¥ 146.00"
-                            android:textColor="#FFF"
-                            android:textSize="21sp" />
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_marginRight="10dp"
-                            android:text="¥ 160.94"
-                            android:textColor="#fff"
-                            android:textSize="14sp" />
-                    </LinearLayout>
-
-                    <LinearLayout
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:gravity="center_horizontal"
-                        android:orientation="vertical">
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="距离结束"
-                            android:textColor="#FFF"
-                            android:textSize="11sp" />
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_marginTop="3dp"
-                            android:background="@drawable/bg_home_top"
-                            android:paddingLeft="10dp"
-                            android:paddingTop="3dp"
-                            android:paddingRight="10dp"
-                            android:paddingBottom="3dp"
-                            android:text="03:22:34"
-                            android:textColor="#FF4430"
-                            android:textSize="14sp" />
-                    </LinearLayout>
-                </LinearLayout>
-
-                <LinearLayout
-                    android:id="@+id/recharge_btn"
-                    android:layout_width="match_parent"
-                    android:layout_height="44dp"
-                    android:background="@color/picture_color_white"
-                    android:gravity="center_vertical"
-                    android:onClick="@{clickListener}"
-                    android:paddingLeft="11dp"
-                    android:paddingRight="11dp">
-
-                    <TextView
-                        android:layout_width="0dp"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:ellipsize="end"
-                        android:maxLines="2"
-                        android:text="@{bean.name}"
-                        android:textColor="#000000"
-                        android:textSize="14sp" />
-                </LinearLayout>
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="44dp"
-                    android:background="@color/picture_color_white"
-                    android:gravity="center_vertical"
-                    android:onClick="@{clickListener}"
-                    android:paddingLeft="11dp"
-                    android:paddingRight="11dp">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:background="@drawable/bg_item_num_frame"
-                        android:paddingLeft="5dp"
-                        android:paddingTop="2dp"
-                        android:paddingRight="5dp"
-                        android:paddingBottom="2dp"
-                        android:text="@{`货号:`+bean.good_number}"
-                        android:textColor="@color/orange"
-                        android:textSize="13sp" />
-
-                    <View
-                        android:layout_width="0dp"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1" />
-
-                    <androidx.appcompat.widget.AppCompatTextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="@{`月售:`+bean.sale}"
-                        android:textColor="#000000"
-                        android:textSize="13sp" />
-                </LinearLayout>
-
-                <LinearLayout
-                    android:id="@+id/man_jian"
-                    android:visibility="gone"
-                    android:layout_width="match_parent"
-                    android:layout_height="44dp"
-                    android:background="#FF7E30"
-                    android:gravity="center_vertical"
-                    android:onClick="@{clickListener}"
-                    android:paddingLeft="11dp"
-                    android:paddingRight="11dp">
-
-                    <TextView
-                        android:layout_width="0dp"
-                        android:layout_weight="1"
-                        android:layout_height="wrap_content"
-                        android:text="本店铺购满360元减5 满959元减10满2399元减30"
-                        android:textColor="@color/white"
-                        android:maxLines="1"
-                        android:ellipsize="end"
-                        android:textSize="13sp" />
-
-                    <androidx.appcompat.widget.AppCompatImageView
-                        android:layout_width="25dp"
-                        android:layout_height="20dp"
-                        android:layout_marginLeft="10sp"
-                        android:src="@mipmap/next_white" />
-                </LinearLayout>
-
-                <LinearLayout
-                    android:id="@+id/select_product_btn"
-                    android:layout_width="match_parent"
-                    android:layout_height="44dp"
-                    android:layout_marginTop="1dp"
-                    android:background="@color/picture_color_white"
-                    android:gravity="center_vertical"
-                    android:onClick="@{clickListener}"
-                    android:paddingLeft="11dp"
-                    android:paddingRight="11dp">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="选择产品规格"
-                        android:textColor="#666666"
-                        android:textSize="14sp" />
-
-                    <View
-                        android:layout_width="0dp"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1" />
-
-                    <androidx.appcompat.widget.AppCompatImageView
-                        android:layout_width="25dp"
-                        android:layout_height="15dp"
-                        android:src="@mipmap/next_black_img" />
-                </LinearLayout>
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="44dp"
-                    android:layout_marginTop="1dp"
-                    android:layout_marginBottom="60dp"
-                    android:background="@color/picture_color_white"
-                    android:gravity="center"
-                    android:onClick="@{clickListener}"
-                    android:paddingLeft="11dp"
-                    android:paddingRight="11dp">
-
-                    <androidx.appcompat.widget.AppCompatImageView
-                        android:layout_width="20dp"
-                        android:layout_height="20dp"
-                        android:src="@mipmap/commidity_img" />
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginLeft="10dp"
-                        android:text="全部商品"
-                        android:textColor="#000000"
-                        android:textSize="14sp" />
-                </LinearLayout>
-
-            </LinearLayout>
-        </androidx.core.widget.NestedScrollView>
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="49dp"
-            android:layout_alignParentBottom="true"
-            android:orientation="horizontal">
-
-            <LinearLayout
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:gravity="center"
-                android:paddingLeft="5dp"
-                android:paddingRight="5dp"
-                android:background="@color/white">
-
-                <LinearLayout
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:gravity="center"
-                    android:orientation="vertical">
-                    <androidx.appcompat.widget.AppCompatImageView
-                        android:layout_width="19dp"
-                        android:layout_height="19dp"
-                        android:src="@mipmap/commidity_kefu_img"/>
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="3dp"
-                        android:textSize="10sp"
-                        android:text="客服"/>
-
-                </LinearLayout>
-                <LinearLayout
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:gravity="center"
-                    android:orientation="vertical">
-                    <androidx.appcompat.widget.AppCompatImageView
-                        android:layout_width="19dp"
-                        android:layout_height="19dp"
-                        android:src="@mipmap/shop_img"/>
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="3dp"
-                        android:textSize="10sp"
-                        android:text="店铺"/>
-
-
-                </LinearLayout>
-                <LinearLayout
-                    android:id="@+id/collect_btn"
-                    android:onClick="@{clickListener}"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:gravity="center"
-                    android:orientation="vertical">
-                    <androidx.appcompat.widget.AppCompatImageView
-                        android:id="@+id/collect_img"
-                        android:layout_width="19dp"
-                        android:layout_height="19dp"
-                        android:src="@mipmap/no_collect_img"/>
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="3dp"
-                        android:textSize="10sp"
-                        android:text="收藏"/>
-                </LinearLayout>
-            </LinearLayout>
-
-            <TextView
-                android:id="@+id/join_purchase"
-                android:onClick="@{clickListener}"
-                android:layout_width="115dp"
-                android:layout_height="match_parent"
-                android:background="#FF7E30"
-                android:gravity="center"
-                android:text="加入进货单"
-                android:textColor="#FFFFFF"
-                android:textSize="16sp" />
-
-            <TextView
-                android:id="@+id/go_purchase"
-                android:onClick="@{clickListener}"
-                android:layout_width="115dp"
-                android:layout_height="match_parent"
-                android:background="#FF392B"
-                android:gravity="center"
-                android:text="前往进货单"
-                android:textColor="#FFF"
-                android:textSize="16sp" />
-        </LinearLayout>
-    </RelativeLayout>
-
-
-</layout>

+ 0 - 34
app/src/main/res/layout/fragment_detail.xml

@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <data>
-
-        <variable
-            name="clickListener"
-            type="android.view.View.OnClickListener" />
-    </data>
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <androidx.core.widget.NestedScrollView
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:orientation="vertical">
-                <WebView
-                    android:id="@+id/web_view"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content" />
-            </LinearLayout>
-
-        </androidx.core.widget.NestedScrollView>
-    </RelativeLayout>
-
-
-</layout>

+ 5 - 12
app/src/main/res/layout/home_fragment.xml

@@ -13,7 +13,6 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-
         android:background="@color/black"
         android:orientation="vertical">
 
@@ -58,17 +57,10 @@
             android:layout_marginRight="15dp"
             android:orientation="vertical">
 
-            <androidx.cardview.widget.CardView
+            <com.youth.banner.Banner
+                android:id="@+id/b_xiangce"
                 android:layout_width="match_parent"
-                android:layout_height="180dp"
-                app:cardCornerRadius="20dp">
-
-                <androidx.appcompat.widget.AppCompatImageView
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:scaleType="fitXY"
-                    android:src="@mipmap/fengshan" />
-            </androidx.cardview.widget.CardView>
+                android:layout_height="180dp" />
 
             <LinearLayout
                 android:layout_width="match_parent"
@@ -87,6 +79,7 @@
                 <View
                     android:layout_width="1dp"
                     android:layout_height="10dp"
+                    android:layout_marginLeft="10dp"
                     android:layout_marginRight="10dp"
                     android:background="#D8D8D8" />
 
@@ -108,7 +101,7 @@
                 android:id="@+id/tab_layout"
                 android:layout_width="match_parent"
                 android:layout_height="40dp"
-                android:layout_marginTop="18dp"
+                android:layout_marginTop="10dp"
                 android:paddingBottom="2dp"
                 android:textSize="18sp"
                 app:tabIndicator="@drawable/tab_layout_point"

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

@@ -39,6 +39,7 @@
             android:textSize="14sp" />
 
         <TextView
+            android:id="@+id/price_text"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="10dp"

+ 93 - 4
app/src/main/res/layout/item_inner_sale.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android">
+<layout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
 
     <data>
 
@@ -15,6 +16,7 @@
         android:orientation="vertical">
 
         <TextView
+            android:id="@+id/time_text"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="16dp"
@@ -28,10 +30,97 @@
             android:textColor="#FFFFFF"
             android:textSize="15sp" />
 
-        <androidx.recyclerview.widget.RecyclerView
-            android:id="@+id/recycle_view"
+        <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content" />
+            android:layout_height="wrap_content"
+            android:layout_marginTop="18dp"
+            android:layout_marginLeft="10dp"
+            android:gravity="center_vertical"
+            android:orientation="horizontal">
+
+            <androidx.cardview.widget.CardView
+                android:id="@+id/card_view"
+                android:layout_width="100dp"
+                android:layout_height="100dp"
+                app:cardCornerRadius="16dp">
+                <androidx.appcompat.widget.AppCompatImageView
+                    android:id="@+id/iv_photo"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:scaleType="fitXY"
+                    android:src="@mipmap/fengshan" />
+            </androidx.cardview.widget.CardView>
+
+
+            <LinearLayout
+                android:layout_below="@+id/card_view"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingTop="14dp"
+                android:paddingLeft="20dp"
+                android:paddingRight="20dp"
+                android:paddingBottom="12dp"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/name_text"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="潮玩设计 | 闹仔NOWKNOW"
+                    android:textSize="18sp"
+                    android:textColor="@color/white" />
+
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    android:gravity="bottom">
+                    <LinearLayout
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:layout_height="wrap_content"
+                        android:orientation="vertical">
+                        <TextView
+                            android:id="@+id/num_text"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="10dp"
+                            android:maxLines="2"
+                            android:text="发售量 1000份"
+                            android:textColor="#63C4FD"
+                            android:textSize="11sp" />
+
+                        <TextView
+                            android:id="@+id/price_text"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="¥79.9"
+                            android:layout_marginTop="10dp"
+                            android:textSize="24sp"
+                            android:textStyle="bold"
+                            android:textColor="@color/white" />
+                    </LinearLayout>
+                    <TextView
+                        android:id="@+id/remind_btn"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="提醒我"
+                        android:textSize="13sp"
+                        android:paddingLeft="10dp"
+                        android:paddingRight="10dp"
+                        android:paddingTop="4dp"
+                        android:paddingBottom="4dp"
+                        android:background="@drawable/bg_home_top"
+                        android:textColor="#222222" />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+
+
+        </LinearLayout>
     </LinearLayout>
 
 </layout>

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

@@ -17,6 +17,7 @@
         android:orientation="vertical">
 
         <TextView
+            android:id="@+id/date_text"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="2022/06/23"

+ 8 - 4
app/src/main/res/layout/item_recommend.xml

@@ -3,10 +3,6 @@
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
     <data>
-        <variable
-            name="bean"
-            type="com.hdl.xl.bean.GoodsBean" />
-
     </data>
 
     <RelativeLayout
@@ -22,6 +18,7 @@
             android:layout_height="345dp"
             app:cardCornerRadius="18dp">
             <androidx.appcompat.widget.AppCompatImageView
+                android:id="@+id/iv_photo"
                 android:layout_width="match_parent"
                 android:layout_height="345dp"
                 android:scaleType="fitXY"
@@ -46,6 +43,7 @@
                 android:layout_height="12dp"
                 android:src="@drawable/countdown_green" />
             <TextView
+                android:id="@+id/jijiang_sale"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:text="即将开售 10:23:23"
@@ -67,6 +65,7 @@
             android:orientation="vertical">
 
             <TextView
+                android:id="@+id/name_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:text="潮玩设计 | 闹仔NOWKNOW"
@@ -85,6 +84,7 @@
                     android:layout_height="wrap_content"
                     android:orientation="vertical">
                     <TextView
+                        android:id="@+id/num_text"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="10dp"
@@ -104,12 +104,15 @@
                             android:layout_height="18dp"
                             app:cardCornerRadius="9dp">
                             <androidx.appcompat.widget.AppCompatImageView
+                                android:id="@+id/avatar"
                                 android:layout_width="match_parent"
                                 android:layout_height="match_parent"
+                                android:scaleType="fitXY"
                                 android:src="@mipmap/lbj"/>
 
                         </androidx.cardview.widget.CardView>
                         <TextView
+                            android:id="@+id/aut_name_text"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:textSize="12sp"
@@ -119,6 +122,7 @@
                     </LinearLayout>
                 </LinearLayout>
                 <TextView
+                    android:id="@+id/price_text"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:text="¥79.9"

+ 0 - 113
app/src/main/res/layout/item_shipping_address.xml

@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-    <data>
-
-    </data>
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="101dp"
-        android:background="@color/white"
-        android:orientation="vertical">
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="100dp"
-            android:paddingLeft="20dp"
-            android:paddingRight="11dp"
-            android:paddingTop="9dp"
-            android:paddingBottom="9dp"
-            android:orientation="horizontal">
-            <RelativeLayout
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="match_parent"
-                android:orientation="vertical">
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-                    android:gravity="center_vertical">
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textSize="16sp"
-                        android:textColor="#000000"
-                        android:text="张三"/>
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textSize="13sp"
-                        android:layout_marginLeft="14dp"
-                        android:textColor="#666666"
-                        android:text="13412341234"/>
-                </LinearLayout>
-                <LinearLayout
-
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-                    android:layout_centerVertical="true"
-                    android:gravity="center_vertical">
-                    <TextView
-                        android:id="@+id/moren"
-                        android:visibility="gone"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textSize="12sp"
-                        android:textColor="#FF4430"
-                        android:paddingLeft="3.5dp"
-                        android:paddingRight="3.5dp"
-                        android:background="@drawable/bg_default_frame"
-                        android:layout_marginRight="14dp"
-                        android:text="默认"/>
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textSize="16sp"
-                        android:textColor="#666666"
-                        android:text="山东省临沂市兰山区"/>
-                </LinearLayout>
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_alignParentBottom="true"
-                    android:textSize="12sp"
-                    android:textColor="#999999"
-                    android:text="iec中心"/>
-            </RelativeLayout>
-            <LinearLayout
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:orientation="horizontal"
-                android:gravity="center">
-                <TextView
-                    android:id="@+id/edit_button"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textColor="#999999"
-                    android:textSize="16sp"
-                    android:text="编辑"/>
-                <View
-                    android:layout_width="1dp"
-                    android:layout_height="30dp"
-                    android:background="#F2F2F2"
-                    android:layout_marginLeft="15dp"
-                    android:layout_marginRight="15dp"/>
-                <TextView
-                    android:id="@+id/delete_btn"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textColor="#FF4430"
-                    android:textSize="16sp"
-                    android:text="删除"/>
-            </LinearLayout>
-        </LinearLayout>
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:background="#F2F2F2"/>
-
-    </LinearLayout>
-
-</layout>

+ 2 - 2
app/src/main/res/layout/mine_fragment.xml

@@ -76,7 +76,7 @@
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="187***1928"
+                    android:text="@{bean.phone}"
                     android:textColor="@color/picture_color_white"
                     android:textSize="20sp" />
 
@@ -152,7 +152,7 @@
                         android:textSize="28sp"
                         android:maxLines="1"
                         android:ellipsize="end"
-                        android:text="8720.98"/>
+                        android:text="@{bean.money}"/>
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"

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

@@ -46,7 +46,7 @@
     <color name="gray_AD">#ffadadad</color>
     <color name="gray_C8">#ffc8c8c8</color>
     <color name="gray_D5">#ffd5d5d5</color>
-    <color name="gray_E6">#ffe6e6e6</color>
+    <color name="gray_E6">#A6A6A6</color>
     <color name="gray_cc">#ffcccccc</color>
     <color name="gray_d9">#999999</color>
     <color name="gray_f0">#fff0f0f0</color>

+ 2 - 1
basekt/src/main/java/com/laike/basekt/bean/CommonResultStatusEntity.kt

@@ -13,6 +13,7 @@ class CommonResultStatusEntity : Serializable {
 
     var code: Int? = null
     var msg: String? = null
+    var data:String?=null
 
 
     companion object {
@@ -21,7 +22,7 @@ class CommonResultStatusEntity : Serializable {
     }
 
     override fun toString(): String {
-        return "CommonResultStatusEntity(code=$code, msg=$msg)"
+        return "CommonResultStatusEntity(code=$code, msg=$msg, data=$data)"
     }
 
 

+ 1 - 1
basekt/src/main/java/com/laike/basekt/coremodel/datemodel/client/RetrofitInitialization.kt

@@ -83,7 +83,7 @@ internal class RetrofitInitialization {
                         UTF8
                     val json = buffer.clone().readString(charset)
                     val jsObj= JSONObject(json)
-                    if (jsObj.optInt("code") == 10000) {
+                    if (jsObj.optInt("code") == -1) {
                         EventBus.getDefault().post(LogOutEvent())
                     }
                 }

+ 1 - 2
basekt/src/main/java/com/laike/basekt/coremodel/datemodel/common/ApiConstants.java

@@ -9,8 +9,7 @@ import com.laike.basekt.coremodel.datemodel.interfaces.OnLoginInterceptorListene
 public class ApiConstants {
     public static OnLoginInterceptorListener mOnLoginInterceptorListener;
     //服务器地址
-    public static String Host = "http://guoxin.app12345.cn/";//测试
-    //public static String Host = "http://app.guoxinmall.cn/";//正式
+    public static String Host = "https://xlapi.xiangliannft.com/";//正式
     //头像地址目录
     public static String HeadPicUrl = Host+"img/";
     public static String CACHE_PATH = "";