Переглянути джерело

1.登录注册首页 相关界面搭建。

shy 2 роки тому
батько
коміт
0fa05f7b53
55 змінених файлів з 2024 додано та 848 видалено
  1. 1 1
      app/build.gradle
  2. 3 3
      app/src/main/AndroidManifest.xml
  3. 48 0
      app/src/main/java/com/quansu/creativity/activity/LoginActivity.kt
  4. 2 11
      app/src/main/java/com/quansu/creativity/activity/MainActivity.kt
  5. 33 0
      app/src/main/java/com/quansu/creativity/activity/SettingActivity.kt
  6. 22 3
      app/src/main/java/com/quansu/creativity/adapter/RecommedAdapter.kt
  7. 3 1
      app/src/main/java/com/quansu/creativity/config/Config.kt
  8. 115 56
      app/src/main/java/com/quansu/creativity/fragment/HomeFirstFragment.kt
  9. 9 1
      app/src/main/java/com/quansu/creativity/fragment/HomeMyFragment.kt
  10. 8 5
      app/src/main/java/com/quansu/creativity/fragment/RecommendFragment.kt
  11. 20 0
      app/src/main/java/com/quansu/creativity/model/CollectionList.kt
  12. 13 0
      app/src/main/java/com/quansu/creativity/model/HomeBanner.kt
  13. 204 246
      app/src/main/java/com/quansu/creativity/utils/net/ApiService.kt
  14. 44 4
      app/src/main/java/com/quansu/creativity/vmodel/HomeFirstVModel.kt
  15. 11 0
      app/src/main/java/com/quansu/creativity/vmodel/HomeMyVModel.kt
  16. 41 153
      app/src/main/java/com/quansu/creativity/vmodel/LoginVModel.kt
  17. 16 3
      app/src/main/java/com/quansu/creativity/vmodel/RecommendVModel.kt
  18. 10 0
      app/src/main/java/com/quansu/creativity/vmodel/RegisterVModel.kt
  19. 23 0
      app/src/main/java/com/quansu/creativity/vmodel/SettingVModel.kt
  20. BIN
      app/src/main/res/drawable-xxhdpi/ct_back_right.png
  21. 0 0
      app/src/main/res/drawable-xxhdpi/ct_close_eyes.png
  22. BIN
      app/src/main/res/drawable-xxhdpi/ct_home_order.png
  23. BIN
      app/src/main/res/drawable-xxhdpi/ct_msg.png
  24. BIN
      app/src/main/res/drawable-xxhdpi/ct_my_avator.png
  25. BIN
      app/src/main/res/drawable-xxhdpi/ct_my_banlance.png
  26. BIN
      app/src/main/res/drawable-xxhdpi/ct_my_jifen.png
  27. BIN
      app/src/main/res/drawable-xxhdpi/ct_my_jishou.png
  28. BIN
      app/src/main/res/drawable-xxhdpi/ct_my_renzheng.png
  29. BIN
      app/src/main/res/drawable-xxhdpi/ct_my_setting.png
  30. BIN
      app/src/main/res/drawable-xxhdpi/ct_my_store.png
  31. BIN
      app/src/main/res/drawable-xxhdpi/ct_my_tuiguang.png
  32. BIN
      app/src/main/res/drawable-xxhdpi/ct_my_zeng.png
  33. 0 0
      app/src/main/res/drawable-xxhdpi/ct_open_eyes.png
  34. BIN
      app/src/main/res/drawable-xxhdpi/ct_select_off.png
  35. BIN
      app/src/main/res/drawable-xxhdpi/ct_select_on.png
  36. BIN
      app/src/main/res/drawable-xxhdpi/ct_time.png
  37. BIN
      app/src/main/res/drawable-xxhdpi/ct_time_ing.png
  38. BIN
      app/src/main/res/drawable-xxhdpi/ct_time_stop.png
  39. BIN
      app/src/main/res/drawable-xxhdpi/ic_renzheng.png
  40. 14 0
      app/src/main/res/drawable/bg_chose_gray.xml
  41. 16 0
      app/src/main/res/drawable/bg_chose_white.xml
  42. 15 0
      app/src/main/res/drawable/bg_kuang_blue.xml
  43. 103 54
      app/src/main/res/layout/activity_login.xml
  44. 8 3
      app/src/main/res/layout/activity_register.xml
  45. 272 0
      app/src/main/res/layout/activity_setting.xml
  46. 163 107
      app/src/main/res/layout/fragment_home_first.xml
  47. 650 9
      app/src/main/res/layout/fragment_home_my.xml
  48. 120 173
      app/src/main/res/layout/item_recommed.xml
  49. 4 2
      app/src/main/res/values/strings.xml
  50. 2 1
      base/src/main/java/com/ysnows/base/base/BRRepository.kt
  51. 1 1
      base/src/main/java/com/ysnows/base/base/BRepository.kt
  52. 1 1
      base/src/main/java/com/ysnows/base/net/BHeaderInterceptor.java
  53. 1 0
      base/src/main/java/com/ysnows/base/net/IResp.kt
  54. 27 9
      base/src/main/java/com/ysnows/base/net/Resp.kt
  55. 1 1
      settings.gradle

+ 1 - 1
app/build.gradle

@@ -122,7 +122,7 @@ dependencies {
 
     implementation project(':base')
     addComponent 'update'
-    addComponent 'umeng'
+  // addComponent 'umeng'
     addComponent 'jpush'
 //    addComponent 'gaode'
    addComponent 'lookimg'

+ 3 - 3
app/src/main/AndroidManifest.xml

@@ -55,7 +55,7 @@
 
 <!--    HomeActivity    MainActivity-->
         <activity
-            android:name="com.quansu.creativity.activity.LoginActivity"
+            android:name="com.quansu.creativity.activity.MainActivity"
             android:screenOrientation="portrait"
             android:windowSoftInputMode="adjustResize|adjustPan"
             android:theme="@style/AppTheme.Launcher" >
@@ -65,8 +65,7 @@
             </intent-filter >
         </activity >
 
-        <activity android:name="com.quansu.creativity.activity.MainActivity"/>
-
+        <activity android:name="com.quansu.creativity.activity.LoginActivity"/>
 
         <activity
             android:name="com.quansu.creativity.activity.OneLoginActivity"
@@ -78,6 +77,7 @@
         <activity android:name="com.quansu.creativity.activity.WebViewActivity" />
         <activity android:name="com.quansu.creativity.activity.CustomErrorActivity"/>
         <activity android:name="com.quansu.creativity.activity.TestMainActivity"/>
+        <activity android:name="com.quansu.creativity.activity.SettingActivity"/>
 
 
 

+ 48 - 0
app/src/main/java/com/quansu/creativity/activity/LoginActivity.kt

@@ -1,9 +1,15 @@
 package com.quansu.creativity.activity
 
+import android.graphics.Typeface
+import android.text.method.HideReturnsTransformationMethod
+import android.text.method.PasswordTransformationMethod
+import com.qmuiteam.qmui.kotlin.onClick
+import com.quansu.creativity.R
 import com.quansu.creativity.base.MBActivity
 import com.quansu.creativity.databinding.ActivityLoginBinding
 import com.quansu.creativity.vmodel.LoginVModel
 
+
 class LoginActivity : MBActivity<LoginVModel, ActivityLoginBinding>() {
 
 
@@ -19,6 +25,48 @@ class LoginActivity : MBActivity<LoginVModel, ActivityLoginBinding>() {
         return LoginVModel::class.java
     }
 
+    override fun listeners() {
+        super.listeners()
+        binding.imgEyes.onClick {
+
+            binding.etPassword.typeface = Typeface.DEFAULT
+            binding.etPassword.transformationMethod = PasswordTransformationMethod()
+
+            if (vm.eyes.value == 1) {//闭眼
+                binding.etPassword.transformationMethod = PasswordTransformationMethod.getInstance()
+
+                if (binding.etPassword.text.toString().trim().isNotEmpty()) {
+                    val textLength: Int = binding.etPassword.text?.length!!
+                    binding.etPassword.setSelection(textLength, textLength)
+                }
+                binding.imgEyes.setImageResource(R.drawable.ct_close_eyes)
+                vm.eyes.value = 0
+
+            } else {
+                //睁眼
+                binding.etPassword.transformationMethod = HideReturnsTransformationMethod.getInstance()
+                if (binding.etPassword.text.toString().trim().isNotEmpty()) {
+                    val textLength: Int = binding.etPassword.text?.length!!
+                    binding.etPassword.setSelection(textLength, textLength)
+                }
+                binding.imgEyes.setImageResource(R.drawable.ct_open_eyes)
+                vm.eyes.value = 1
+            }
+        }
+
+        binding.imgSure.onClick {
+            if (vm.isRead.value == 0) {//去勾选
+                binding.imgSure.setImageResource(R.drawable.ct_select_on)
+                vm.isRead.value = 1
+            } else {
+                binding.imgSure.setImageResource(R.drawable.ct_select_off)
+                vm.isRead.value = 0
+
+            }
+        }
+    }
+
+
 //全屏
 //    override fun transluent(): Boolean {
 //        return true

+ 2 - 11
app/src/main/java/com/quansu/creativity/activity/MainActivity.kt

@@ -1,26 +1,17 @@
 package com.quansu.creativity.activity
 
 import android.graphics.Color
-import android.os.Build
 import android.os.Bundle
 import android.view.KeyEvent
-import android.view.View
 import androidx.core.content.ContextCompat
-import androidx.fragment.app.Fragment
-import androidx.fragment.app.FragmentManager
 import com.githang.statusbar.StatusBarCompat
-import com.qmuiteam.qmui.kotlin.onClick
 import com.quansu.creativity.R
 import com.quansu.creativity.base.MBActivity
 import com.quansu.creativity.databinding.ActivityMainBinding
-import com.quansu.creativity.fragment.HomeDriverFragment
 import com.quansu.creativity.fragment.HomeFirstFragment
 import com.quansu.creativity.fragment.HomeMyFragment
 import com.quansu.creativity.vmodel.MainVModel
-import com.ysnows.base.base.BRepository
-import com.ysnows.base.base.BViewModel
 import com.ysnows.base.utils.KeySimulateUtils
-import com.ysnows.base.utils.UiUtils
 import java.util.*
 
 /**
@@ -54,8 +45,8 @@ class MainActivity : MBActivity<MainVModel, ActivityMainBinding>(){
                 .setNormalColor(Color.parseColor("#222222"))
 
 
-        val oneFragment = HomeFirstFragment()//HomeTicketFragment  HomeSpaceFragment
-        val twoFragment = HomeMyFragment()//HomeSiteFragment  CircleTabsFragment
+        val oneFragment = HomeFirstFragment()
+        val twoFragment = HomeMyFragment()
          val threeFragment = HomeMyFragment()
         val fourFragment = HomeMyFragment()
         //  fourFragment.arguments = B().putString("type", type).ok()

+ 33 - 0
app/src/main/java/com/quansu/creativity/activity/SettingActivity.kt

@@ -0,0 +1,33 @@
+package com.quansu.creativity.activity
+
+import android.os.Bundle
+import com.quansu.creativity.base.MBActivity
+import com.quansu.creativity.databinding.ActivitySettingBinding
+import com.quansu.creativity.vmodel.SettingVModel
+
+/**
+ * 设置界面
+ *Created by shihuiyun
+ *on 2020/9/24
+ */
+class SettingActivity : MBActivity<SettingVModel, ActivitySettingBinding>() {
+
+    override fun init(savedInstanceState: Bundle?) {
+        super.init(savedInstanceState)
+
+    }
+
+    override fun binding(): ActivitySettingBinding {
+       return ActivitySettingBinding.inflate(layoutInflater)
+    }
+
+    override fun vmClass(): Class<SettingVModel> {
+        return SettingVModel::class.java
+    }
+
+    override fun title(): String? {
+        return "设置"
+    }
+
+
+}

+ 22 - 3
app/src/main/java/com/quansu/creativity/adapter/RecommedAdapter.kt

@@ -4,17 +4,36 @@ import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
 import com.quansu.creativity.R
 import com.quansu.creativity.databinding.ItemRecommedBinding
 import com.quansu.creativity.model.AmountList
+import com.quansu.creativity.model.CollectionList
 
 import com.ysnows.base.base.BAdapter
 
-class RecommedAdapter() : BAdapter<AmountList,
+class RecommedAdapter() : BAdapter<CollectionList,
         BaseDataBindingHolder<ItemRecommedBinding>>(R.layout.item_recommed) {
 
-
-    override fun convert(holder: BaseDataBindingHolder<ItemRecommedBinding>, item: AmountList) {
+    //state 1:进行中2:即将开售3:已售罄)
+    override fun convert(holder: BaseDataBindingHolder<ItemRecommedBinding>, item: CollectionList) {
 
         holder.dataBinding?.item = item
 
+        if (item.state == "1") {
+            holder.dataBinding?.tvState?.text = "热卖中 "
+            holder.dataBinding?.imgState?.setImageResource(R.drawable.ct_time_ing)
+
+        }
+        if (item.state == "2") {
+            holder.dataBinding?.tvState?.text = "即将开售 "
+            holder.dataBinding?.imgState?.setImageResource(R.drawable.ct_time)
+
+
+        }
+        if(item.state == "3"){
+            holder.dataBinding?.tvState?.text = "已售罄 "
+            holder.dataBinding?.imgState?.setImageResource(R.drawable.ct_time_stop)
+
+
+        }
+
 
     }
 }

+ 3 - 1
app/src/main/java/com/quansu/creativity/config/Config.kt

@@ -9,7 +9,9 @@ class Config : IConfig {
      // return "https://heifengwuliudev.qs110.com/"
 
      // return "https://xinyunbida.qs110.com/"
-     return "https://xinyunbidadev.qs110.com/"//注意:切换的时候注意切换buggly
+
+        return "https://cc.chuangchi.vip/index.php/api/"
+   //  return "https://xinyunbidadev.qs110.com/"//注意:切换的时候注意切换buggly
 
     }
 

+ 115 - 56
app/src/main/java/com/quansu/creativity/fragment/HomeFirstFragment.kt

@@ -8,6 +8,7 @@ import android.view.ViewGroup
 import android.widget.ImageView
 import androidx.cardview.widget.CardView
 import androidx.fragment.app.Fragment
+import androidx.fragment.app.FragmentManager
 import androidx.viewpager.widget.ViewPager
 import cn.bingoogolapple.bgabanner.BGABanner
 import coil.load
@@ -17,9 +18,11 @@ import com.quansu.creativity.base.MBFragment
 import com.quansu.creativity.databinding.FragmentHomeFirstBinding
 import com.quansu.creativity.databinding.FragmentHomeMyBinding
 import com.quansu.creativity.databinding.FragmentOwnerimgBinding
+import com.quansu.creativity.model.HomeBanner
 import com.quansu.creativity.vmodel.HomeFirstVModel
 import com.quansu.creativity.vmodel.HomeMyVModel
 import com.quansu.creativity.vmodel.OwnerImgVModel
+import com.tencent.mmkv.MMKV
 import java.util.ArrayList
 
 /**
@@ -27,21 +30,41 @@ import java.util.ArrayList
  *Created by shihuiyun
  *on 2020/9/11
  */
-class HomeFirstFragment : MBFragment<HomeFirstVModel, FragmentHomeFirstBinding>(){
+class HomeFirstFragment : MBFragment<HomeFirstVModel, FragmentHomeFirstBinding>() {
 
     var fragments = emptyArray<Fragment>()
     private var adapter: FragAdapter? = null
-    var type=1//1精选 2预约
+    var type = 1//1精选 2预约
 
 
     override fun init(savedInstanceState: Bundle?) {
         super.init(savedInstanceState)
 
-        initViewPage()
+        //获取登录状态
+        var token= MMKV.defaultMMKV().decodeString("token", "")
+        if(token.equals("")){
+            vm.isLogin.value=false
+        }
+
+
+        vm.toGetBanner()
+        vm.bannerList.observe(this) {
+
+            if (it.isNotEmpty()) {
+                initBanner(it)
+            }
+            //
+            binding.refreshLayout.isRefreshing=false
+        }
+
+        initFragments()
+
+        switchContent(0)//默认第一个
 
     }
-    fun initViewPage(){
 
+
+    private fun initFragments() {
         val oneFragment = RecommendFragment()
         val twoFragment = RecommendFragment()
 
@@ -49,78 +72,114 @@ class HomeFirstFragment : MBFragment<HomeFirstVModel, FragmentHomeFirstBinding>(
                 oneFragment,
                 twoFragment
         )
-        adapter = FragAdapter(childFragmentManager, fragments.toMutableList())
-        binding.viewPager.offscreenPageLimit = 2
-        binding.viewPager.adapter = adapter
-        binding.viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
-            override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
-            override fun onPageSelected(position: Int) {
-                choseType(position)
-            }
-
-            override fun onPageScrollStateChanged(state: Int) {}
-        })
-
-        binding.tvMyChose.setOnClickListener(View.OnClickListener { view: View? -> binding.viewPager.currentItem = 0 })
-        binding.tvMyAppointment.setOnClickListener(View.OnClickListener { view: View? -> binding.viewPager.currentItem = 1 })
-
-
-
     }
 
-    private fun choseType(position: Int) {
-        when (position) {
-            0 -> {
-                type=1
-                binding.tvMyChose.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
-                binding.tvMyAppointment.typeface = Typeface.DEFAULT
-
-
+    private fun switchContent(index: Int) {
 
-            }
-            1 -> {
-                type=2
-                binding.tvMyChose.typeface =  Typeface.DEFAULT
-                binding.tvMyAppointment.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+        val childFragmentManager: FragmentManager = childFragmentManager
+        val transaction = childFragmentManager.beginTransaction()
+        var fragment = childFragmentManager.findFragmentByTag("tab_$index")
+        if (fragment == null) {//还未加载
 
+            fragment = fragments[index]
+            if (fragment != null) {
+                transaction.add(R.id.home_container, fragment, "tab_$index")
             }
-            else -> {
+        } else {
+            transaction.show(fragment)
+        }
+        for (i in fragments.indices) {
+            fragment = childFragmentManager.findFragmentByTag("tab_$i")
+            if (fragment == null || index == i) {
+                continue
             }
+            transaction.hide(fragment)
         }
+        transaction.commitAllowingStateLoss()
     }
 
+    override fun listeners() {
+        super.listeners()
+        binding.tvMyChose.setOnClickListener(View.OnClickListener { view: View? ->switchContent(0) })
+        binding.tvMyAppointment.setOnClickListener(View.OnClickListener { view: View? -> switchContent(1) })
 
+    }
 
 
-//    fun initBanner(bean : AdInfo){
+//    fun initViewPage() {
 //
-//        var list= ArrayList<String>()
+//        val oneFragment = RecommendFragment()
+//        val twoFragment = RecommendFragment()
 //
-//        if(bean.ad_content.isNotEmpty()){
-//            for(item in bean.ad_content){
-//                list.add(item.img)
+//        fragments = arrayOf(
+//                oneFragment,
+//                twoFragment
+//        )
+//        adapter = FragAdapter(childFragmentManager, fragments.toMutableList())
+//        binding.viewPager.offscreenPageLimit = 2
+//        binding.viewPager.adapter = adapter
+//        binding.viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
+//            override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
+//            override fun onPageSelected(position: Int) {
+//                choseType(position)
 //            }
-//        }
-//
-//        if (list.size > 1) {
-//            binding.banner.setAutoPlayAble(true)
-//        } else {
-//            binding.banner.setAutoPlayAble(false)
-//        }
 //
-//        binding.banner.setAdapter(BGABanner.Adapter<CardView, String?> { banner, itemView, model, position -> //图片布局
-//            val simpleDraweeView = itemView.findViewById<ImageView>(R.id.sdv_item_fresco_content)
-//            simpleDraweeView.load(model)
+//            override fun onPageScrollStateChanged(state: Int) {}
 //        })
-//        binding.banner.setData(R.layout.item_fresco, list, null)
-//        binding.banner.setAutoPlayInterval(6000)
-//        binding.banner.setDelegate { banner, itemView, model, position ->
 //
-//            //todo: var ad = beanlist[position]
+//        binding.tvMyChose.setOnClickListener(View.OnClickListener { view: View? -> binding.viewPager.currentItem = 0 })
+//        binding.tvMyAppointment.setOnClickListener(View.OnClickListener { view: View? -> binding.viewPager.currentItem = 1 })
 //
-//        }
 //
 //    }
+//
+//    private fun choseType(position: Int) {
+//        when (position) {
+//            0 -> {
+//                type = 1
+//                binding.tvMyChose.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+//                binding.tvMyAppointment.typeface = Typeface.DEFAULT
+//
+//
+//            }
+//            1 -> {
+//                type = 2
+//                binding.tvMyChose.typeface = Typeface.DEFAULT
+//                binding.tvMyAppointment.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+//
+//            }
+//            else -> {
+//            }
+//        }
+//    }
+
+
+    fun initBanner(bean: List<HomeBanner>) {
+
+        var list = ArrayList<String>()
+
+        for (item in bean) {
+            list.add(item.cover)
+        }
+
+        if (list.size > 1) {
+            binding.banner.setAutoPlayAble(true)
+        } else {
+            binding.banner.setAutoPlayAble(false)
+        }
+        binding.banner.setAdapter(BGABanner.Adapter<CardView, String?> { banner, itemView, model, position -> //图片布局
+            val simpleDraweeView = itemView.findViewById<ImageView>(R.id.sdv_item_fresco_content)
+            simpleDraweeView.load(model)
+        })
+        binding.banner.setData(R.layout.item_fresco, list, null)
+        binding.banner.setAutoPlayInterval(6000)
+        binding.banner.setDelegate { banner, itemView, model, position ->
+
+            //todo: var ad = beanlist[position]
+
+        }
+
+    }
 
 
     override fun vmClass(): Class<HomeFirstVModel> {
@@ -128,7 +187,7 @@ class HomeFirstFragment : MBFragment<HomeFirstVModel, FragmentHomeFirstBinding>(
     }
 
     override fun binding(inflater: LayoutInflater, container: ViewGroup?): FragmentHomeFirstBinding {
-       return  FragmentHomeFirstBinding.inflate(layoutInflater)
+        return FragmentHomeFirstBinding.inflate(layoutInflater)
     }
 
     override fun title(): String? {

+ 9 - 1
app/src/main/java/com/quansu/creativity/fragment/HomeMyFragment.kt

@@ -6,9 +6,10 @@ import android.view.ViewGroup
 import com.quansu.creativity.base.MBFragment
 import com.quansu.creativity.databinding.FragmentHomeMyBinding
 import com.quansu.creativity.vmodel.HomeMyVModel
+import com.tencent.mmkv.MMKV
 
 /**
- * 寄售
+ * 我的
  *Created by shihuiyun
  *on 2020/9/11
  */
@@ -18,6 +19,13 @@ class HomeMyFragment : MBFragment<HomeMyVModel, FragmentHomeMyBinding>(){
     override fun init(savedInstanceState: Bundle?) {
         super.init(savedInstanceState)
 
+        //获取登录状态
+        var token= MMKV.defaultMMKV().decodeString("token", "")
+        if(token.equals("")){
+            vm.isLogin.value=false
+        }
+
+
 
 
 

+ 8 - 5
app/src/main/java/com/quansu/creativity/fragment/RecommendFragment.kt

@@ -10,6 +10,7 @@ import com.quansu.creativity.base.MBFragment
 import com.quansu.creativity.databinding.FragmentHomeMyBinding
 import com.quansu.creativity.databinding.FragmentOwnerimgBinding
 import com.quansu.creativity.databinding.FragmentRecommendBinding
+import com.quansu.creativity.model.CollectionList
 import com.quansu.creativity.vmodel.HomeMyVModel
 import com.quansu.creativity.vmodel.OwnerImgVModel
 import com.quansu.creativity.vmodel.RecommendVModel
@@ -28,24 +29,26 @@ class RecommendFragment : MBFragment<RecommendVModel, FragmentRecommendBinding>(
         super.init(savedInstanceState)
         //禁止下拉刷新和下拉加载
          binding.recyclerView.overScrollMode= View.OVER_SCROLL_NEVER
-        vm.list.observe(this, androidx.lifecycle.Observer {
+
+          vm.toGetCollectionList()
+
+          vm.list.observe(this, androidx.lifecycle.Observer {
             if (null == it) {
                 return@Observer
             }
 
-            setAdapter()
+            setAdapter(it)
 
         })
 
 
     }
 
-    fun setAdapter(){
+    fun setAdapter(list:List<CollectionList>){
 
         var adapter=RecommedAdapter()
         binding.recyclerView.adapter=adapter
-        //todo:获得数据设置数据
-       // adapter.addData(list)
+         adapter.addData(list)
 
         adapter.setOnItemClickListener { adapter, view, position ->
             var isEnable= MMKV.defaultMMKV().getBoolean("Enable",false)

+ 20 - 0
app/src/main/java/com/quansu/creativity/model/CollectionList.kt

@@ -0,0 +1,20 @@
+package com.quansu.creativity.model
+
+import com.ysnows.base.inter.IModel
+
+/**
+ * 首页精选数据
+ *Created by shihuiyun
+ *on 2020/10/14
+ * state 1:进行中2:即将开售3:已售罄)
+ * type:1:正常商品  3:盲盒
+ */
+data class CollectionList(var id:String, var auth_img :String, var auth_name:String,
+                          var cover:String, var first_cid :String, var first_time:String,
+                          var inventory:String, var label :String, var name:String,
+                          var now_inventory:String, var price :String, var sell_time:String,
+                          var state:String, var type :String,
+                          ) : IModel {
+
+
+}

+ 13 - 0
app/src/main/java/com/quansu/creativity/model/HomeBanner.kt

@@ -0,0 +1,13 @@
+package com.quansu.creativity.model
+
+import com.ysnows.base.inter.IModel
+
+/**
+ * 首页banner数据
+ *Created by shihuiyun
+ *on 2020/10/14
+ */
+data class HomeBanner(var id:String, var cover :String,var name:String, ) : IModel {
+
+
+}

+ 204 - 246
app/src/main/java/com/quansu/creativity/utils/net/ApiService.kt

@@ -13,49 +13,44 @@ import java.util.*
  */
 interface ApiService {
 
+    //首页banner
+    @GET("Index/getBanner")
+    suspend fun getBanner(): Resp<List<HomeBanner>>
+    //首页精选 列表
 
-    @POST("task/save")
-    @FormUrlEncoded
-    fun addTodo(@Field("title") title: String?): Observable<Resp<Any>>
-
-    @POST("alipay/order_info")
-    @FormUrlEncoded
-    fun alipayPreOrder(@Field("vip_level") vip_level: Int): Observable<Resp<String>>
-
-
-    @POST("bac")
-    @FormUrlEncoded
-    fun bac(
-        @Field("settings") settings: String?,
-        @Field("funcs") funcsJson: String?,
-        @Field("searchs") searchJson: String?,
-        @Field("gesture") gestureJson: String?
-    ): Observable<Resp<String>>
-
-    @POST("task/save")
-    @FormUrlEncoded
-    fun taskSave(
-        @Field("id") id: Int,
-        @FieldMap params: HashMap<String?, Any?>?
-    ): Observable<Resp<String>>
+    @GET("Index/indexCollectionList")
+    suspend fun getCollectionList(): Resp<List<CollectionList>>
 
-    @POST("task/checked")
-    @FormUrlEncoded
-    fun taskChecked(@Field("id") id: Int): Observable<Resp<Any>>
+    /**
+     * 登录
+     * @return
+     */
+    @POST("Login/passwordLogin")
+    @FormUrlEncoded suspend fun getLogin(
+            @Field("phone") phone: String?,
+            @Field("password") password: String?
+    ): Resp<Any>
 
 
-    @GET("user/logout")
-    fun logout(): Observable<Resp<Any>>
+//
 
-    @GET("order/submmit")
-    fun order_submmit(): Observable<Resp<String>>
+    /**
+     * 地址列表
+     * @return
+     */
+    @GET("api/address/addressList")
+    suspend fun addressList(
+            @Query("type") type: String?,
+            @Query("k") k: String, @Query("p") p: Int
+    ): Resp<List<AddressBean>>
 
-    @POST("order/active")
-    @FormUrlEncoded
-    fun active(@Field("code") code: String?): Observable<Resp<Any>>
+    /**
+     * 用户信息
+     * @return
+     */
+    @GET("api/user/getuserinfo")
+    fun getUser(): Observable<Resp<User>>
 
-    @GET("func/getFuncIcon")
-    fun getFuncIcon(@Query("host") host: String?): Observable<Resp<String>>
 
 //    ------------
 
@@ -66,26 +61,6 @@ interface ApiService {
 
 
     /**
-     * 获取验证码
-     *
-     * @return
-     */
-    @POST("api/index/loginSms")
-    @FormUrlEncoded
-    fun getRegisterCode(@Field("mobile") mobile: String?): Observable<Resp<SendSmsBean>>
-
-
-    /**
-     * 获取验证码-注册
-     *
-     * @return
-     */
-    @POST("api/index/sendSms")
-    @FormUrlEncoded
-    fun getRegisterSms(@Field("mobile") mobile: String?): Observable<Resp<SendSmsBean>>
-
-
-    /**
      * 极光一键登录
      *
      * @return
@@ -103,12 +78,12 @@ interface ApiService {
     @POST("api/index/register")
     @FormUrlEncoded
     fun register(
-        @Field("name") name: String?,
-        @Field("mobile") mobile: String?,
-        @Field("code") code: String?,
-        @Field("type") type: String?,
-        @Field("openid") openid: String? = null,
-        @Field("unionid") unionId: String? = null
+            @Field("name") name: String?,
+            @Field("mobile") mobile: String?,
+            @Field("code") code: String?,
+            @Field("type") type: String?,
+            @Field("openid") openid: String? = null,
+            @Field("unionid") unionId: String? = null
     ): Observable<Resp<LoginBean>>
 
 
@@ -120,8 +95,8 @@ interface ApiService {
     @POST("api/index/pwdLogin")
     @FormUrlEncoded
     fun login(
-        @Field("mobile") mobile: String?,
-        @Field("pwd") pwd: String?
+            @Field("mobile") mobile: String?,
+            @Field("pwd") pwd: String?
     ): Observable<Resp<LoginBean>>
 
     /**
@@ -132,8 +107,8 @@ interface ApiService {
     @POST("api/index/smslogin")
     @FormUrlEncoded
     fun smsLogin(
-        @Field("mobile") mobile: String?,
-        @Field("code") code: String?
+            @Field("mobile") mobile: String?,
+            @Field("code") code: String?
     ): Observable<Resp<LoginBean>>
 
     /**
@@ -154,27 +129,10 @@ interface ApiService {
     @POST("api/index/siml_register")
     @FormUrlEncoded
     fun simlRegister(
-        @Field("mobile") mobile: String?,
-        @Field("type") type: String?
+            @Field("mobile") mobile: String?,
+            @Field("type") type: String?
     ): Observable<Resp<LoginBean>>
 
-    /**
-     * 用户信息
-     * @return
-     */
-    @GET("api/user/getuserinfo")
-    fun getUser(): Observable<Resp<User>>
-
-    /**
-     * 地址列表
-     * @return
-     */
-    @GET("api/address/addressList")
-    suspend fun addressList(
-        @Query("type") type: String?,
-        @Query("k") k: String, @Query("p") p: Int
-    ): Resp<List<AddressBean>>
-
 
     /**
      * 获取区域
@@ -182,8 +140,8 @@ interface ApiService {
      */
     @GET("api/common/getArea")
     suspend fun getArea(
-        @Query("code") code: String?,
-        @Query("page") page: Int
+            @Query("code") code: String?,
+            @Query("page") page: Int
     ): Resp<List<AreaBean>>
 
 
@@ -195,12 +153,12 @@ interface ApiService {
     @POST("api/address/addressEdit")
     @FormUrlEncoded
     fun addressEdit(
-        @Field("addr_id") addr_id: String?, @Field("lat") lat: String?,
-        @Field("lng") lng: String?, @Field("province") province: String?,
-        @Field("city") city: String?, @Field("area") area: String?,
-        @Field("address") address: String?, @Field("name") name: String?,
-        @Field("mobile") mobile: String?, @Field("type") type: String?,
-        @Field("is_default") is_default: String?
+            @Field("addr_id") addr_id: String?, @Field("lat") lat: String?,
+            @Field("lng") lng: String?, @Field("province") province: String?,
+            @Field("city") city: String?, @Field("area") area: String?,
+            @Field("address") address: String?, @Field("name") name: String?,
+            @Field("mobile") mobile: String?, @Field("type") type: String?,
+            @Field("is_default") is_default: String?
     ): Observable<Resp<Any>>
 
 
@@ -242,17 +200,17 @@ interface ApiService {
     @POST("api/info/infoEdit")
     @FormUrlEncoded
     fun infoEdit(
-        @Field("info_id") info_id: String?,
-        @Field("type_id") type_id: String?,
-        @Field("total") total: String?,
-        @Field("driver") driver: String?,
-        @Field("nums") nums: String?,
-        @Field("is_public") is_public: String?,
-        @Field("is_insurance") is_insurance: String?,
-        @Field("type") type: String?,
-        @Field("data") data: String?,
-        @Field("send") send: String?,
-        @Field("receive") receive: String?
+            @Field("info_id") info_id: String?,
+            @Field("type_id") type_id: String?,
+            @Field("total") total: String?,
+            @Field("driver") driver: String?,
+            @Field("nums") nums: String?,
+            @Field("is_public") is_public: String?,
+            @Field("is_insurance") is_insurance: String?,
+            @Field("type") type: String?,
+            @Field("data") data: String?,
+            @Field("send") send: String?,
+            @Field("receive") receive: String?
     ): Observable<Resp<InfoEditBean>>
 
 
@@ -263,8 +221,8 @@ interface ApiService {
     @POST("api/info/infoPay")
     @FormUrlEncoded
     fun infoGetPay(
-        @Field("info_id") info_id: String?,
-        @Field("pay_pwd") pay_pwd: String?
+            @Field("info_id") info_id: String?,
+            @Field("pay_pwd") pay_pwd: String?
     ): Observable<Resp<Any>>
 
 
@@ -281,26 +239,26 @@ interface ApiService {
      */
     @GET("api/info/infoList")
     suspend fun infoList(
-        @Query("k") k: String?,
-        @Query("sp") sp: String?,
-        @Query("sc") sc: String?,
-        @Query("sa") sa: String?,
-        @Query("rp") rp: String?,
-        @Query("rc") rc: String?,
-        @Query("ra") ra: String?,
-        @Query("type_id") type_id: String?,
-        @Query("s_time1") s_time1: String?,
-        @Query("s_time2") s_time2: String?,
-        @Query("r_time1") r_time1: String?,
-        @Query("r_time2") r_time2: String?,
-        @Query("price1") price1: String?,
-        @Query("price2") price2: String?,
-        @Query("sort") sort: String?,
-        @Query("asc") asc: String?,
-
-        @Query("info_state") info_state: String?,
-        @Query("goods_type") goods_type: String?,
-        @Query("p") p: Int
+            @Query("k") k: String?,
+            @Query("sp") sp: String?,
+            @Query("sc") sc: String?,
+            @Query("sa") sa: String?,
+            @Query("rp") rp: String?,
+            @Query("rc") rc: String?,
+            @Query("ra") ra: String?,
+            @Query("type_id") type_id: String?,
+            @Query("s_time1") s_time1: String?,
+            @Query("s_time2") s_time2: String?,
+            @Query("r_time1") r_time1: String?,
+            @Query("r_time2") r_time2: String?,
+            @Query("price1") price1: String?,
+            @Query("price2") price2: String?,
+            @Query("sort") sort: String?,
+            @Query("asc") asc: String?,
+
+            @Query("info_state") info_state: String?,
+            @Query("goods_type") goods_type: String?,
+            @Query("p") p: Int
     ): Resp<List<InfoListBean>>
 
 
@@ -335,8 +293,8 @@ interface ApiService {
     @POST("api/user/setInfo")
     @FormUrlEncoded
     fun setInfo(
-        @Field("idcard_z") idcard_z: String?, @Field("idcard_f") idcard_f: String?,
-        @Field("name") name: String?, @Field("idcard") idcard: String?
+            @Field("idcard_z") idcard_z: String?, @Field("idcard_f") idcard_f: String?,
+            @Field("name") name: String?, @Field("idcard") idcard: String?
     ): Observable<Resp<Any>>
 
     /**
@@ -346,9 +304,9 @@ interface ApiService {
     @POST("api/user/setCard")
     @FormUrlEncoded
     fun setCardBank(
-        @Field("name") name: String?, @Field("number") number: String?,
-        @Field("bank") bank: String?, @Field("kbank") kbank: String?,
-        @Field("image") image: String?
+            @Field("name") name: String?, @Field("number") number: String?,
+            @Field("bank") bank: String?, @Field("kbank") kbank: String?,
+            @Field("image") image: String?
     ): Observable<Resp<Any>>
 
 
@@ -367,8 +325,8 @@ interface ApiService {
     @POST("api/user/setCompany")
     @FormUrlEncoded
     fun setCompany(
-        @Field("license_img") license_img: String?, @Field("license_sn") license_sn: String?,
-        @Field("company_name") company_name: String?, @Field("company_addr") company_addr: String?
+            @Field("license_img") license_img: String?, @Field("license_sn") license_sn: String?,
+            @Field("company_name") company_name: String?, @Field("company_addr") company_addr: String?
     ): Observable<Resp<Any>>
 
 
@@ -379,22 +337,22 @@ interface ApiService {
     @POST("api/user/setCar")
     @FormUrlEncoded
     fun setCar(
-        @Field("driver_img") driver_img: String?, @Field("driving_z") driving_z: String?,
-        @Field("driving_f") driving_f: String?, @Field("tonnage") tonnage: String?,
-        @Field("license_dl") license_dl: String?, @Field("license_cy") license_cy: String?,
-        @Field("number") number: String?,
-        @Field("color") color: String?, @Field("car_type") car_type: String?,
-        @Field("car_load") car_load: String?, @Field("car_brand") car_brand: String?,
-        @Field("driving_sn") driving_sn: String?, @Field("car_weight") car_weight: String?,
-        @Field("car_size_l") car_size_l: String?, @Field("car_size_w") car_size_w: String?,
-        @Field("car_size_h") car_size_h: String?,
-        @Field("car_cate") car_cate: String?,
-        @Field("car_energy") car_energy: String?, @Field("car_own") car_own: String?,
-        @Field("car_use") car_use: String?, @Field("car_sn") car_sn: String?,
-        @Field("organization") organization: String?, @Field("reg_date") reg_date: String?,
-        @Field("cert_date") cert_date: String?, @Field("driver_org") driver_org: String?,
-        @Field("start_date") start_date: String?, @Field("end_date") end_date: String?,
-        @Field("car_class") car_class: String?
+            @Field("driver_img") driver_img: String?, @Field("driving_z") driving_z: String?,
+            @Field("driving_f") driving_f: String?, @Field("tonnage") tonnage: String?,
+            @Field("license_dl") license_dl: String?, @Field("license_cy") license_cy: String?,
+            @Field("number") number: String?,
+            @Field("color") color: String?, @Field("car_type") car_type: String?,
+            @Field("car_load") car_load: String?, @Field("car_brand") car_brand: String?,
+            @Field("driving_sn") driving_sn: String?, @Field("car_weight") car_weight: String?,
+            @Field("car_size_l") car_size_l: String?, @Field("car_size_w") car_size_w: String?,
+            @Field("car_size_h") car_size_h: String?,
+            @Field("car_cate") car_cate: String?,
+            @Field("car_energy") car_energy: String?, @Field("car_own") car_own: String?,
+            @Field("car_use") car_use: String?, @Field("car_sn") car_sn: String?,
+            @Field("organization") organization: String?, @Field("reg_date") reg_date: String?,
+            @Field("cert_date") cert_date: String?, @Field("driver_org") driver_org: String?,
+            @Field("start_date") start_date: String?, @Field("end_date") end_date: String?,
+            @Field("car_class") car_class: String?
 
     ): Observable<Resp<Any>>
 
@@ -419,10 +377,10 @@ interface ApiService {
     @POST("api/invoice/invoiceEdit")
     @FormUrlEncoded
     fun invoiceEdit(
-        @Field("invoice_id") invoice_id: String?, @Field("company") company: String?,
-        @Field("sn") sn: String?, @Field("addr") addr: String?,
-        @Field("tel") tel: String?, @Field("bank") bank: String?,
-        @Field("number") number: String?
+            @Field("invoice_id") invoice_id: String?, @Field("company") company: String?,
+            @Field("sn") sn: String?, @Field("addr") addr: String?,
+            @Field("tel") tel: String?, @Field("bank") bank: String?,
+            @Field("number") number: String?
     ): Observable<Resp<Any>>
 
 
@@ -448,24 +406,24 @@ interface ApiService {
      */
     @GET("api/order/infoList")
     suspend fun infoListDriver(
-        @Query("k") k: String?,
-        @Query("sp") sp: String?,
-        @Query("sc") sc: String?,
-        @Query("sa") sa: String?,
-        @Query("rp") rp: String?,
-        @Query("rc") rc: String?,
-        @Query("ra") ra: String?,
-        @Query("type_id") type_id: String?,
-        @Query("s_time1") s_time1: String?,
-        @Query("s_time2") s_time2: String?,
-        @Query("r_time1") r_time1: String?,
-        @Query("r_time2") r_time2: String?,
-        @Query("price1") price1: String?,
-        @Query("price2") price2: String?,
-        @Query("sort") sort: String?,
-        @Query("asc") asc: String?,
-        @Query("goods_type") goods_type: String?,
-        @Query("p") p: Int
+            @Query("k") k: String?,
+            @Query("sp") sp: String?,
+            @Query("sc") sc: String?,
+            @Query("sa") sa: String?,
+            @Query("rp") rp: String?,
+            @Query("rc") rc: String?,
+            @Query("ra") ra: String?,
+            @Query("type_id") type_id: String?,
+            @Query("s_time1") s_time1: String?,
+            @Query("s_time2") s_time2: String?,
+            @Query("r_time1") r_time1: String?,
+            @Query("r_time2") r_time2: String?,
+            @Query("price1") price1: String?,
+            @Query("price2") price2: String?,
+            @Query("sort") sort: String?,
+            @Query("asc") asc: String?,
+            @Query("goods_type") goods_type: String?,
+            @Query("p") p: Int
     ): Resp<List<InfoListBean>>
 
 
@@ -499,26 +457,26 @@ interface ApiService {
      */
     @GET("api/order/myList")
     suspend fun myList(
-        @Query("k") k: String?,
-        @Query("sp") sp: String?,
-        @Query("sc") sc: String?,
-        @Query("sa") sa: String?,
-        @Query("rp") rp: String?,
-        @Query("rc") rc: String?,
-        @Query("ra") ra: String?,
-        @Query("type_id") type_id: String?,
-        @Query("s_time1") s_time1: String?,
-        @Query("s_time2") s_time2: String?,
-        @Query("r_time1") r_time1: String?,
-        @Query("r_time2") r_time2: String?,
-        @Query("price1") price1: String?,
-        @Query("price2") price2: String?,
-        @Query("sort") sort: String?,
-        @Query("asc") asc: String?,
-
-        @Query("order_state") order_state: String?,
-        @Query("goods_type") goods_type: String?,
-        @Query("p") p: Int
+            @Query("k") k: String?,
+            @Query("sp") sp: String?,
+            @Query("sc") sc: String?,
+            @Query("sa") sa: String?,
+            @Query("rp") rp: String?,
+            @Query("rc") rc: String?,
+            @Query("ra") ra: String?,
+            @Query("type_id") type_id: String?,
+            @Query("s_time1") s_time1: String?,
+            @Query("s_time2") s_time2: String?,
+            @Query("r_time1") r_time1: String?,
+            @Query("r_time2") r_time2: String?,
+            @Query("price1") price1: String?,
+            @Query("price2") price2: String?,
+            @Query("sort") sort: String?,
+            @Query("asc") asc: String?,
+
+            @Query("order_state") order_state: String?,
+            @Query("goods_type") goods_type: String?,
+            @Query("p") p: Int
     ): Resp<List<InfoListBean>>
 
 
@@ -584,11 +542,11 @@ interface ApiService {
      */
     @GET("api/amount/amountList")
     suspend fun amountList(
-        @Query("status") status: String,
-        @Query("type") type: String,
-        @Query("time_start") time_start: String,
-        @Query("time_end") time_end: String,
-        @Query("p") p: Int
+            @Query("status") status: String,
+            @Query("type") type: String,
+            @Query("time_start") time_start: String,
+            @Query("time_end") time_end: String,
+            @Query("p") p: Int
     ): Resp<List<AmountList>>
 
     /**
@@ -598,9 +556,9 @@ interface ApiService {
     @POST("api/amount/withdraw")
     @FormUrlEncoded
     fun withdraw(
-        @Field("money") money: String?, @Field("name") name: String?,
-        @Field("bank") bank: String?, @Field("kbank") kbank: String?,
-        @Field("number") number: String?
+            @Field("money") money: String?, @Field("name") name: String?,
+            @Field("bank") bank: String?, @Field("kbank") kbank: String?,
+            @Field("number") number: String?
     ): Observable<Resp<Any>>
 
     /**
@@ -609,11 +567,11 @@ interface ApiService {
      */
     @GET("api/amount/amountTotal")
     fun amountTotal(
-        @Query("status") status: String,
-        @Query("type") type: String,
-        @Query("time_start") time_start: String,
-        @Query("time_end") time_end: String,
-        @Query("p") p: Int
+            @Query("status") status: String,
+            @Query("type") type: String,
+            @Query("time_start") time_start: String,
+            @Query("time_end") time_end: String,
+            @Query("p") p: Int
     ): Observable<Resp<AmountCount>>
 
 
@@ -632,8 +590,8 @@ interface ApiService {
     @POST("api/amount/amountAdd")
     @FormUrlEncoded
     fun amountAdd(
-        @Field("money") money: String?,
-        @Field("pic") pic: String?
+            @Field("money") money: String?,
+            @Field("pic") pic: String?
     ): Observable<Resp<Any>>
 
 
@@ -643,8 +601,8 @@ interface ApiService {
      */
     @GET("api/info/carList")
     suspend fun carList(
-        @Query("info_id") info_id: String?,
-        @Query("p") p: Int
+            @Query("info_id") info_id: String?,
+            @Query("p") p: Int
     ): Resp<List<DriverBean>>
 
 
@@ -655,9 +613,9 @@ interface ApiService {
     @POST("api/info/carPay")
     @FormUrlEncoded
     fun carPay(
-        @Field("money") money: String?,
-        @Field("order_id") order_id: String?,
-        @Field("pay_pwd") pay_pwd: String?
+            @Field("money") money: String?,
+            @Field("order_id") order_id: String?,
+            @Field("pay_pwd") pay_pwd: String?
     ): Observable<Resp<Any>>
 
 
@@ -668,8 +626,8 @@ interface ApiService {
     @POST("api/info/eva")
     @FormUrlEncoded
     fun eva(
-        @Field("order_id") order_id: String?, @Field("score") score: String?,
-        @Field("content") content: String?
+            @Field("order_id") order_id: String?, @Field("score") score: String?,
+            @Field("content") content: String?
     ): Observable<Resp<Any>>
 
 
@@ -679,8 +637,8 @@ interface ApiService {
      */
     @GET("api/info/orderEva")
     suspend fun orderEva(
-        @Query("order_id") order_id: String?,
-        @Query("p") p: Int
+            @Query("order_id") order_id: String?,
+            @Query("p") p: Int
     ): Resp<List<OrderEva>>
 
 
@@ -731,9 +689,9 @@ interface ApiService {
     @POST("api/guestbook/guestEdit")
     @FormUrlEncoded
     suspend fun guestEdit(
-        @Field("fk_id") fk_id: String?, @Field("title") title: String?,
-        @Field("content") content: String?, @Field("mobile") mobile: String?,
-        @Field("image") image: String?, @Field("type") type: String?
+            @Field("fk_id") fk_id: String?, @Field("title") title: String?,
+            @Field("content") content: String?, @Field("mobile") mobile: String?,
+            @Field("image") image: String?, @Field("type") type: String?
     ): Resp<Any>
 
 
@@ -755,8 +713,8 @@ interface ApiService {
     @POST("api/user/setProfile")
     @FormUrlEncoded
     suspend fun setProfile(
-        @Field("avatar") avatar: String?,
-        @Field("name") name: String?
+            @Field("avatar") avatar: String?,
+            @Field("name") name: String?
     ): Resp<Any>
 
 
@@ -766,9 +724,9 @@ interface ApiService {
      */
     @GET("api/invoice/infoList")
     suspend fun infoList(
-        @Query("start_time") start_time: String,
-        @Query("end_time") end_time: String,
-        @Query("p") p: Int
+            @Query("start_time") start_time: String,
+            @Query("end_time") end_time: String,
+            @Query("p") p: Int
     ): Resp<List<InvoiceList>>
 
 
@@ -806,7 +764,7 @@ interface ApiService {
     @POST("api/invoice/invoiceAdd")
     @FormUrlEncoded
     suspend fun invoiceAdd(
-        @Field("ids") ids: String?, @Field("money") money: String?
+            @Field("ids") ids: String?, @Field("money") money: String?
     ): Resp<Any>
 
 
@@ -832,8 +790,8 @@ interface ApiService {
      */
     @GET("api/amount/amountLine")
     suspend fun amountLine(
-        @Query("start_time") start_time: String?,
-        @Query("end_time") end_time: String?, @Query("k") k: String?
+            @Query("start_time") start_time: String?,
+            @Query("end_time") end_time: String?, @Query("k") k: String?
     ): Resp<IconData>
 
 
@@ -895,8 +853,8 @@ interface ApiService {
     @FormUrlEncoded
     @POST("api/baoxian/premiumTrial")
     suspend fun premiumTrial(
-        @Field("amount") amount: String?,
-        @Field("schemeCode") schemeCode: String?
+            @Field("amount") amount: String?,
+            @Field("schemeCode") schemeCode: String?
     ): Resp<PremiumTrial>
 
     /**
@@ -923,24 +881,24 @@ interface ApiService {
     @FormUrlEncoded
     @POST("api/baoxian/insure")
     suspend fun insure(
-        @Field("order_id") order_id: String,
-        @Field("amount") amount: String,
-        @Field("payMoney") payMoney: String,
-        @Field("schemeCode") schemeCode: String,
-        @Field("start_areaName") start_areaName: String,
-        @Field("start_areaCode") start_areaCode: String,
-        @Field("finish_areaName") finish_areaName: String,
-        @Field("finish_areaCode") finish_areaCode: String,
-        @Field("transfer_areaName[]") transfer_areaName: List<String>,
-        @Field("transfer_areaCode[]") transfer_areaCode: List<String>,
-        @Field("goodsName") goodsName: String,
-        @Field("name") name: String,
-        @Field("personnelType") personnelType: String,
-        @Field("certificateType") certificateType: String,
-        @Field("certificateNo") certificateNo: String,
-        @Field("mobile") mobile: String,
-        @Field("licensePlateNo") licensePlateNo: String,
-        @Field("licensePlateType") licensePlateType: String,
+            @Field("order_id") order_id: String,
+            @Field("amount") amount: String,
+            @Field("payMoney") payMoney: String,
+            @Field("schemeCode") schemeCode: String,
+            @Field("start_areaName") start_areaName: String,
+            @Field("start_areaCode") start_areaCode: String,
+            @Field("finish_areaName") finish_areaName: String,
+            @Field("finish_areaCode") finish_areaCode: String,
+            @Field("transfer_areaName[]") transfer_areaName: List<String>,
+            @Field("transfer_areaCode[]") transfer_areaCode: List<String>,
+            @Field("goodsName") goodsName: String,
+            @Field("name") name: String,
+            @Field("personnelType") personnelType: String,
+            @Field("certificateType") certificateType: String,
+            @Field("certificateNo") certificateNo: String,
+            @Field("mobile") mobile: String,
+            @Field("licensePlateNo") licensePlateNo: String,
+            @Field("licensePlateType") licensePlateType: String,
     ): Resp<Any>
 
 

+ 44 - 4
app/src/main/java/com/quansu/creativity/vmodel/HomeFirstVModel.kt

@@ -1,9 +1,21 @@
 package com.quansu.creativity.vmodel
 
+import android.app.Activity
 import android.app.Application
+import android.text.TextUtils
+import android.view.View
 import androidx.lifecycle.MutableLiveData
+import androidx.lifecycle.viewModelScope
+import com.kingja.loadsir.callback.SuccessCallback
+import com.quansu.creativity.activity.MainActivity
+import com.quansu.creativity.model.AmountCount
+import com.quansu.creativity.model.HomeBanner
+import com.quansu.creativity.utils.net.NetEngine
 import com.ysnows.base.base.BRepository
 import com.ysnows.base.base.BViewModel
+import com.ysnows.base.emptyview.callback.LoadingCallback
+import com.ysnows.base.utils.UiSwitch
+import kotlinx.coroutines.launch
 
 /**
  *Created by shihuiyun
@@ -11,10 +23,38 @@ import com.ysnows.base.base.BViewModel
  */
 open class HomeFirstVModel(application: Application) : BViewModel<BRepository>(application) {
 
-    var url: MutableLiveData<String> = MutableLiveData()
-    var name: MutableLiveData<String> = MutableLiveData()
-    var weight: MutableLiveData<String> = MutableLiveData()
-    var volume: MutableLiveData<String> = MutableLiveData()
+    //默认登录状态
+    var isLogin=MutableLiveData<Boolean>(true)
+
+    var bannerList: MutableLiveData<List<HomeBanner>> = MutableLiveData()
+
+
+
+    //多条件判断  android:visibility="@{vm.isShowPay(vm.bean.is_pay)
+//    fun isShowPay(is_pay: String?): Int {
+//        if (TextUtils.isEmpty(is_pay)) {
+//            return View.GONE
+//        }
+//        if (is_pay.equals("0")) {
+//            return View.VISIBLE
+//        }
+//        return View.GONE
+//    }
+
+    override fun firstReq() {
+        super.firstReq()
+        toGetBanner()
+    }
+
+
+    fun  toGetBanner(){
+        viewModelScope.launch {
+            val it = repository().lreq { NetEngine.service.getBanner() }
+            if (it.ok(true)) {
+                bannerList.value=it.data
+            }
+        }
+    }
 
 
 

+ 11 - 0
app/src/main/java/com/quansu/creativity/vmodel/HomeMyVModel.kt

@@ -2,8 +2,11 @@ package com.quansu.creativity.vmodel
 
 import android.app.Application
 import androidx.lifecycle.MutableLiveData
+import com.quansu.creativity.activity.RegisterActivity
+import com.quansu.creativity.activity.SettingActivity
 import com.ysnows.base.base.BRepository
 import com.ysnows.base.base.BViewModel
+import com.ysnows.base.utils.UiSwitch
 
 /**
  *Created by shihuiyun
@@ -12,6 +15,14 @@ import com.ysnows.base.base.BViewModel
 open class HomeMyVModel(application: Application) : BViewModel<BRepository>(application) {
 
 
+    //true 是登录模式  false 游客模式
+     var isLogin=MutableLiveData<Boolean>(true)
+
+
+    fun toSetting(){
+        UiSwitch.single(repository().context, SettingActivity::class.java)
+
+    }
 
 
 

+ 41 - 153
app/src/main/java/com/quansu/creativity/vmodel/LoginVModel.kt

@@ -2,8 +2,12 @@ package com.quansu.creativity.vmodel
 
 import android.app.Activity
 import android.app.Application
+import android.text.TextUtils
+import android.util.Log
 import androidx.databinding.Bindable
 import androidx.lifecycle.MutableLiveData
+import androidx.lifecycle.viewModelScope
+import com.hwangjr.rxbus.RxBus
 import com.quansu.creativity.BR
 import com.quansu.creativity.R
 import com.quansu.creativity.activity.ForgetPasswordActivity
@@ -11,6 +15,9 @@ import com.quansu.creativity.activity.MainActivity
 import com.quansu.creativity.activity.RegisterActivity
 import com.quansu.creativity.activity.TestMainActivity
 import com.quansu.creativity.config.ConfigMMKV
+import com.quansu.creativity.config.ConfigRx
+import com.quansu.creativity.utils.net.NetEngine
+import com.tencent.mmkv.MMKV
 import com.ysnows.base.base.BRepository
 import com.ysnows.base.base.BViewModel
 import com.ysnows.base.utils.B
@@ -20,51 +27,19 @@ import io.reactivex.Observable
 import io.reactivex.android.schedulers.AndroidSchedulers
 import io.reactivex.disposables.Disposable
 import io.reactivex.schedulers.Schedulers
+import kotlinx.coroutines.launch
 import java.util.concurrent.TimeUnit
 
 open class LoginVModel(application: Application) : BViewModel<BRepository>(application) {
 
-    fun toRegister(){
+    var one = MutableLiveData<Boolean>(true)
+    var eyes = MutableLiveData<Int>(0)//0闭眼 1睁眼
 
-        UiSwitch.single(repository().context,RegisterActivity::class.java)
-
-    }
-
-    fun toForgetPassword(){
-        UiSwitch.single(repository().context,ForgetPasswordActivity::class.java)
-    }
-    fun toTest(){
-        UiSwitch.single(repository().context,MainActivity::class.java)
-
-    }
-
-
-
-
-    //------------
-
-    var one= MutableLiveData<Boolean>(true)
-
-    var adminType="main"//driver是司机 main是货主
-
-    var code:String?=""
-
-    var codeTip: MutableLiveData<String> = MutableLiveData(LoginVModel.getCodeStr)
-    private var disposable: Disposable? = null
-
-
-
-
-    companion object {
-        const val time = 60
-        var timeStart: Long = 1
-        const val getCodeStr = "获取验证码"
-
-    }
+    var isRead= MutableLiveData<Int>(0)//0未勾选 1已勾选
 
 
     @Bindable
-    open var phone: String? =null
+    open var phone: String? = null
         set(value) {
             field = value
             notifyPropertyChanged(BR.phone)
@@ -78,67 +53,14 @@ open class LoginVModel(application: Application) : BViewModel<BRepository>(appli
             notifyPropertyChanged(BR.passWord)
         }
 
-    @Bindable
-    open var passWordTo: String? = null
-        set(value) {
-            field = value
-            notifyPropertyChanged(BR.passWordTo)
-        }
-
-
-    fun toChose(type: Int){
-
-        if(type==1){
-            one.value=true
-            adminType="main"
-        }else{
-            one.value=false
-            adminType="driver"
-        }
-
-    }
+    fun toRegister() {
 
-
-    fun loginTo(){
-//        if (one.value!!) {//验证码登录
-//
-//            smsLogin()
-//
-//        } else {//密码登录
-//            login()
-//
-//        }
-//        跳转界面
-
-        UiSwitch.single(repository().context,TestMainActivity::class.java)
+        UiSwitch.single(repository().context, RegisterActivity::class.java)
 
     }
 
-
-    fun smsLogin(){
-
-        if (phone.isNullOrEmpty()) {
-            toast(R.string.please_input_user_phone)
-            return
-        }
-        if (passWordTo.isNullOrEmpty()) {
-            toast("请输入手机验证码")
-            return
-        }
-
-//        viewModelScope.launch {
-//            val it = repository().lreq { NetEngine.service.mobilelogin(phone, passWordTo, adminType,code) }
-//            if (it.ok(true)) {
-//
-//                var bean: LoginBean =it.data() as LoginBean
-//                MMKV.defaultMMKV().putString("token", bean.token)
-//                UiSwitch.single(repository().context, MainActivity::class.java)
-//
-//                RxBus.get().post(ConfigRx.CLOSE_LOGIN, "")
-//                (repository().context as Activity).finish()
-//            }
-//        }
-
+    fun toForgetPassword() {
+        UiSwitch.single(repository().context, ForgetPasswordActivity::class.java)
     }
 
 
@@ -152,75 +74,41 @@ open class LoginVModel(application: Application) : BViewModel<BRepository>(appli
             toast(R.string.please_input_pwd)
             return
         }
+        if(isRead.value==0){
+            toast(R.string.please_red_policy)
+            return
+        }
+        viewModelScope.launch {
+            val it = repository().lreq { NetEngine.service.getLogin(phone, passWord) }
+            if (it.ok(true)) {
 
-//        viewModelScope.launch {
-//            val it = repository().lreq { NetEngine.service.login(phone, passWord, adminType,code) }
-//            if (it.ok(true)) {
-//
-//                var bean: LoginBean =it.data() as LoginBean
-//                MMKV.defaultMMKV().putString("token", bean.token)
-//                UiSwitch.single(repository().context, MainActivity::class.java)
-//
-//                RxBus.get().post(ConfigRx.CLOSE_LOGIN, "")
-//                (repository().context as Activity).finish()
-//            }
-//        }
-
-
-    }
+                if(TextUtils.isEmpty(it.toString())){
+                    toast(it.msg)
+                    return@launch
+                }
+                Log.d("shy", it.data.toString())
+                MMKV.defaultMMKV().putString("token", it.data.toString())//保存
+               // MMKV.defaultMMKV().putString("token", "test")//保存
+                //读取数据
+                //MMKV.defaultMMKV().decodeString("token", "")
 
+               UiSwitch.single(repository().context, MainActivity::class.java)
 
-    fun goRetrieveWord(){
+                //  RxBus.get().post(ConfigRx.CLOSE_LOGIN, "")
+                (repository().context as Activity).finish()
+            }
+        }
 
-        UiSwitch.bundle(repository().context as Activity, ForgetPasswordActivity::class.java,
-                B().putString("adminType",adminType).ok())
 
     }
 
 
-    fun getSmsCode(start: Long = 1) {
-        if (codeTip.value != ForgetPasswordVModel.getCodeStr) {
-            return
-        }
-
-        if (phone.isNullOrEmpty()) {
-            toast(R.string.please_input_user_phone)
-            return
-        }
-
-//        viewModelScope.launch {
+//    fun goRetrieveWord(){
 //
-//            val it = repository().lreq { NetEngine.service.getPassword(phone,"login",adminType) }
-//            if (it.ok(true)) {
-//                startTimer(start)
-//            }
+//        UiSwitch.bundle(repository().context as Activity, ForgetPasswordActivity::class.java,
+//                B().putString("adminType",adminType).ok())
 //
-//        }
-
-    }
+//    }
 
-    private fun startTimer(start: Long = 1) {
-        disposeTimer()
-        disposable = Observable.intervalRange(start, ForgetPasswordVModel.time - start + 1, 0, 1, TimeUnit.SECONDS)
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .doOnNext {
-                    ForgetPasswordVModel.timeStart = it
-                    codeTip.value = if (ForgetPasswordVModel.time - it > 0) "${ForgetPasswordVModel.time - it}秒后重发" else {
-                        ForgetPasswordVModel.getCodeStr
-                    }
-                }
-                .doOnComplete() {
-                    MMKVManager.instance().encode(ConfigMMKV.REGISTER_TIME_START, 60)
-                }
-                .doOnDispose() {
-                    MMKVManager.instance().encode(ConfigMMKV.REGISTER_TIME_START, 60)
-                }
-                .subscribe()
-    }
-
-    private fun disposeTimer() {
-        disposable?.isDisposed ?: disposable?.dispose()
-    }
 
 }

+ 16 - 3
app/src/main/java/com/quansu/creativity/vmodel/RecommendVModel.kt

@@ -4,6 +4,7 @@ import android.app.Application
 import androidx.lifecycle.MutableLiveData
 import androidx.lifecycle.viewModelScope
 import com.quansu.creativity.model.AmountList
+import com.quansu.creativity.model.CollectionList
 import com.quansu.creativity.utils.net.NetEngine
 import com.ysnows.base.base.BRepository
 import com.ysnows.base.base.BViewModel
@@ -15,7 +16,21 @@ import kotlinx.coroutines.launch
  */
 open class RecommendVModel(application: Application) : BViewModel<BRepository>(application) {
 
-    var list = MutableLiveData<ArrayList<AmountList>>()//钓位配置
+    var list = MutableLiveData<List<CollectionList>>()//钓位配置
+
+
+    fun toGetCollectionList() {
+
+        viewModelScope.launch {
+            var it = repository().lreq { NetEngine.service.getCollectionList() }
+            if(it.ok()){
+               list.value=it.data
+            }
+        }
+    }
+
+
+
 
 
     fun getSeatInfo() {//获取数据
@@ -31,6 +46,4 @@ open class RecommendVModel(application: Application) : BViewModel<BRepository>(a
     }
 
 
-
-
 }

+ 10 - 0
app/src/main/java/com/quansu/creativity/vmodel/RegisterVModel.kt

@@ -39,6 +39,16 @@ open class RegisterVModel(application: Application) : BViewModel<BRepository>(ap
             field = value
             notifyPropertyChanged(BR.phone)
         }
+    @Bindable
+    open var code: String? = null
+        set(value) {
+            field = value
+            notifyPropertyChanged(BR.code)
+        }
+
+
+
+
 
 
     companion object {

+ 23 - 0
app/src/main/java/com/quansu/creativity/vmodel/SettingVModel.kt

@@ -0,0 +1,23 @@
+package com.quansu.creativity.vmodel
+
+import android.app.Application
+import com.quansu.creativity.activity.LoginActivity
+import com.tencent.mmkv.MMKV
+import com.ysnows.base.base.BRepository
+import com.ysnows.base.base.BViewModel
+import com.ysnows.base.utils.UiSwitch
+
+class SettingVModel(application: Application) : BViewModel<BRepository>(application)  {
+
+    //退出登录
+    fun  toExitLogin(){
+        //只清空token
+        MMKV.defaultMMKV().putString("token", "")
+        UiSwitch.single_new_task_with_clear_task(repository().context, LoginActivity::class.java)
+    }
+
+
+
+
+
+}

BIN
app/src/main/res/drawable-xxhdpi/ct_back_right.png


+ 0 - 0
app/src/main/res/mipmap-xxxhdpi/ct_close_eyes.png → app/src/main/res/drawable-xxhdpi/ct_close_eyes.png


BIN
app/src/main/res/drawable-xxhdpi/ct_home_order.png


BIN
app/src/main/res/drawable-xxhdpi/ct_msg.png


BIN
app/src/main/res/drawable-xxhdpi/ct_my_avator.png


BIN
app/src/main/res/drawable-xxhdpi/ct_my_banlance.png


BIN
app/src/main/res/drawable-xxhdpi/ct_my_jifen.png


BIN
app/src/main/res/drawable-xxhdpi/ct_my_jishou.png


BIN
app/src/main/res/drawable-xxhdpi/ct_my_renzheng.png


BIN
app/src/main/res/drawable-xxhdpi/ct_my_setting.png


BIN
app/src/main/res/drawable-xxhdpi/ct_my_store.png


BIN
app/src/main/res/drawable-xxhdpi/ct_my_tuiguang.png


BIN
app/src/main/res/drawable-xxhdpi/ct_my_zeng.png


+ 0 - 0
app/src/main/res/mipmap-xxxhdpi/ct_open_eyes.png → app/src/main/res/drawable-xxhdpi/ct_open_eyes.png


BIN
app/src/main/res/drawable-xxhdpi/ct_select_off.png


BIN
app/src/main/res/drawable-xxhdpi/ct_select_on.png


BIN
app/src/main/res/drawable-xxhdpi/ct_time.png


BIN
app/src/main/res/drawable-xxhdpi/ct_time_ing.png


BIN
app/src/main/res/drawable-xxhdpi/ct_time_stop.png


BIN
app/src/main/res/drawable-xxhdpi/ic_renzheng.png


+ 14 - 0
app/src/main/res/drawable/bg_chose_gray.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+android:shape="rectangle" >
+
+<!-- 填充的颜色-->
+
+    <solid android:color="#33999999" />
+
+    <corners
+       android:radius="4dp"
+       >
+    </corners>
+
+</shape >

+ 16 - 0
app/src/main/res/drawable/bg_chose_white.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+android:shape="rectangle" >
+
+<!-- 填充的颜色-->
+
+
+    <solid android:color="#B3ffffff" />
+
+    <corners
+        android:radius="4dp"
+        >
+    </corners>
+
+
+</shape >

+ 15 - 0
app/src/main/res/drawable/bg_kuang_blue.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+android:shape="rectangle" >
+
+<!-- 填充的颜色-->
+    <stroke
+        android:width="1dp"
+        android:color="#54D7E9" />
+
+<!--    <corners-->
+<!--        android:radius="25dp"-->
+<!--        >-->
+<!--    </corners>-->
+
+</shape >

+ 103 - 54
app/src/main/res/layout/activity_login.xml

@@ -6,6 +6,7 @@
     <data>
 
         <import type="com.quansu.creativity.utils.MUiSwitch" />
+
         <import type="android.view.View" />
 
 
@@ -20,41 +21,43 @@
         android:name="com.ysnows.login.activity.LoginActivity"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
+        android:background="#fff"
         android:fitsSystemWindows="true"
         android:orientation="vertical"
-        android:background="#fff"
         tools:context="com.quansu.creativity.activity.LoginActivity">
 
 
         <TextView
-            android:text="欢迎来到创持文化"
-            android:textSize="24sp"
-            android:textStyle="bold"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="30dp"
             android:layout_marginTop="121dp"
             android:layout_marginEnd="30dp"
-            android:layout_marginStart="30dp"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"/>
+            android:text="欢迎来到创持文化"
+            android:textSize="24sp"
+            android:textStyle="bold" />
+
         <LinearLayout
             android:layout_width="wrap_content"
-            android:orientation="horizontal"
+            android:layout_height="wrap_content"
             android:layout_marginStart="30dp"
             android:layout_marginTop="6dp"
-            android:layout_height="wrap_content">
+            android:orientation="horizontal">
 
             <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
                 android:text="还没有账号,"
                 android:textColor="@color/text_title"
-                android:textSize="12sp"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
+                android:textSize="12sp" />
+
             <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
                 android:onClick="@{v->vm.toRegister()}"
                 android:text="立即注册"
-                android:textSize="12sp"
                 android:textColor="#38D3D3"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
+                android:textSize="12sp" />
 
 
         </LinearLayout>
@@ -62,81 +65,127 @@
 
         <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
             android:layout_width="match_parent"
+            android:layout_height="48dp"
+            android:layout_marginStart="30dp"
             android:layout_marginTop="53dp"
             android:layout_marginEnd="30dp"
-            android:layout_marginStart="30dp"
-            app:qmui_radius="4dp"
-            app:qmui_borderColor="#F2F2F2"
             app:qmui_backgroundColor="#F2F2F2"
-            android:layout_height="48dp">
+            app:qmui_borderColor="#F2F2F2"
+            app:qmui_radius="4dp">
 
             <com.ysnows.base.widget.DelEditText
-                android:paddingStart="12dp"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
                 android:background="@null"
                 android:hint="请输入手机号"
-                android:textColorHint="#999999"
-                android:textSize="15sp"
+                android:inputType="phone"
+                android:paddingStart="12dp"
+                android:paddingEnd="12dp"
+                android:text="@={vm.phone}"
                 android:textColor="@color/text_title"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"/>
+                android:textColorHint="#999999"
+                android:textSize="15sp" />
 
         </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
 
 
         <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
             android:layout_width="match_parent"
+            android:layout_height="48dp"
+            android:layout_marginStart="30dp"
             android:layout_marginTop="22dp"
             android:layout_marginEnd="30dp"
-            android:layout_marginStart="30dp"
-            app:qmui_radius="4dp"
-            app:qmui_borderColor="#F2F2F2"
             app:qmui_backgroundColor="#F2F2F2"
-            android:layout_height="48dp">
+            app:qmui_borderColor="#F2F2F2"
+            app:qmui_radius="4dp">
 
             <com.ysnows.base.widget.DelEditText
-                android:paddingStart="12dp"
+                android:id="@+id/et_password"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
                 android:background="@null"
                 android:hint="请输入登录密码"
-                android:textColorHint="#999999"
-                android:textSize="15sp"
+                android:inputType="textPassword"
+                android:paddingStart="12dp"
+                android:text="@={vm.passWord}"
                 android:textColor="@color/text_title"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="match_parent"/>
-
-              <ImageView
-                  android:src="@mipmap/ct_close_eyes"
-                  android:layout_width="20dp"
-                  android:layout_gravity="center_vertical"
-                  android:layout_marginEnd="12dp"
-                  android:layout_marginStart="12dp"
-                  android:layout_height="8dp"/>
+                android:textColorHint="#999999"
+                android:textSize="15sp" />
+
+            <ImageView
+                android:id="@+id/img_eyes"
+                android:layout_width="40dp"
+                android:layout_height="28dp"
+                android:layout_gravity="center_vertical"
+                android:layout_marginStart="12dp"
+                android:layout_marginEnd="12dp"
+                android:padding="10dp"
+                android:src="@drawable/ct_close_eyes" />
 
         </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
 
 
         <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="right"
+            android:layout_marginTop="30dp"
+            android:layout_marginEnd="30dp"
             android:onClick="@{v->vm.toForgetPassword()}"
             android:text="忘记密码"
             android:textColor="@color/text_title"
-            android:textSize="12sp"
-            android:layout_marginTop="30dp"
-            android:layout_gravity="right"
-            android:layout_width="wrap_content"
-            android:layout_marginEnd="30dp"
-            android:layout_height="wrap_content"/>
+            android:textSize="12sp" />
+
         <TextView
-            android:background="@drawable/bg_logo_but"
             android:layout_width="match_parent"
+            android:layout_height="46dp"
+            android:layout_marginStart="30dp"
             android:layout_marginTop="30dp"
             android:layout_marginEnd="30dp"
-            android:layout_marginStart="30dp"
-            android:onClick="@{v->vm.toTest()}"
-            android:text="登录"
-            android:textSize="20sp"
+            android:background="@drawable/bg_logo_but"
             android:gravity="center"
+            android:onClick="@{v->vm.login()}"
+            android:text="登录"
             android:textColor="@color/white"
-            android:layout_height="46dp"/>
+            android:textSize="20sp" />
+
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="23dp"
+            android:layout_marginStart="40dp"
+            android:orientation="horizontal">
+
+            <ImageView
+                android:id="@+id/img_sure"
+                android:layout_width="40dp"
+                android:layout_height="35dp"
+                android:paddingTop="10dp"
+                android:paddingBottom="10dp"
+                android:paddingStart="10dp"
+                android:paddingEnd="5dp"
+                android:src="@drawable/ct_select_off" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:text="登录即同意 "
+                android:textColor="#999999"
+                android:textSize="10sp" />
+
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:text="《创持文化平台隐私政策》"
+                android:textColor="#2C88FE"
+                android:textSize="10sp" />
+
+
+        </LinearLayout>
 
 
     </LinearLayout>

+ 8 - 3
app/src/main/res/layout/activity_register.xml

@@ -56,6 +56,8 @@
                         android:layout_height="match_parent"
                         android:background="@null"
                         android:hint="请输入手机号"
+                        android:text="@={vm.phone}"
+                        android:inputType="phone"
                         android:paddingStart="12dp"
                         android:textColor="@color/text_title"
                         android:textColorHint="#999999"
@@ -79,6 +81,8 @@
                         android:layout_weight="2"
                         android:background="@null"
                         android:hint="请输入验证码"
+                        android:text="@={vm.code}"
+                        android:inputType="number"
                         android:paddingStart="12dp"
                         android:textColor="@color/text_title"
                         android:textColorHint="#999999"
@@ -190,12 +194,13 @@
                         android:textSize="15sp" />
 
                     <ImageView
-                        android:layout_width="20dp"
-                        android:layout_height="8dp"
+                        android:layout_width="40dp"
+                        android:layout_height="28dp"
+                        android:padding="10dp"
                         android:layout_gravity="center_vertical"
                         android:layout_marginStart="12dp"
                         android:layout_marginEnd="12dp"
-                        android:src="@mipmap/ct_close_eyes" />
+                        android:src="@drawable/ct_close_eyes" />
 
                 </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
 

+ 272 - 0
app/src/main/res/layout/activity_setting.xml

@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <data>
+
+        <variable
+            name="vm"
+            type="com.quansu.creativity.vmodel.SettingVModel" />
+
+    </data>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/color_bg"
+        android:orientation="vertical">
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="50dp"
+            android:layout_marginTop="@dimen/dp_10"
+            android:background="@color/white"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="15dp"
+            android:paddingEnd="14dp">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="账户信息"
+                android:textColor="@color/text_title"
+                android:textSize="15sp" />
+
+
+            <ImageView
+                android:layout_width="6dp"
+                android:layout_height="12dp"
+                android:src="@drawable/ct_back_right" />
+
+
+        </LinearLayout>
+        <View
+            android:background="#F3F3F3"
+            android:layout_marginEnd="15dp"
+            android:layout_marginStart="15dp"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_1"/>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="50dp"
+            android:background="@color/white"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="15dp"
+            android:paddingEnd="14dp">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="我的收货地址"
+                android:textColor="@color/text_title"
+                android:textSize="15sp" />
+
+
+            <ImageView
+                android:layout_width="6dp"
+                android:layout_height="12dp"
+                android:src="@drawable/ct_back_right" />
+
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="50dp"
+            android:layout_marginTop="@dimen/dp_10"
+            android:background="@color/white"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="15dp"
+            android:paddingEnd="14dp">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="账户安全"
+                android:textColor="@color/text_title"
+                android:textSize="15sp" />
+
+
+            <ImageView
+                android:layout_width="6dp"
+                android:layout_height="12dp"
+                android:src="@drawable/ct_back_right" />
+
+
+        </LinearLayout>
+        <View
+            android:background="#F3F3F3"
+            android:layout_marginEnd="15dp"
+            android:layout_marginStart="15dp"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_1"/>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="50dp"
+            android:background="@color/white"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="15dp"
+            android:paddingEnd="14dp">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="二级密码"
+                android:textColor="@color/text_title"
+                android:textSize="15sp" />
+
+
+            <ImageView
+                android:layout_width="6dp"
+                android:layout_height="12dp"
+                android:src="@drawable/ct_back_right" />
+
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="50dp"
+            android:layout_marginTop="@dimen/dp_10"
+            android:background="@color/white"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="15dp"
+            android:paddingEnd="14dp">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="使用条款"
+                android:textColor="@color/text_title"
+                android:textSize="15sp" />
+
+
+            <ImageView
+                android:layout_width="6dp"
+                android:layout_height="12dp"
+                android:src="@drawable/ct_back_right" />
+
+
+        </LinearLayout>
+        <View
+            android:background="#F3F3F3"
+            android:layout_marginEnd="15dp"
+            android:layout_marginStart="15dp"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_1"/>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="50dp"
+            android:background="@color/white"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="15dp"
+            android:paddingEnd="14dp">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="隐私协议"
+                android:textColor="@color/text_title"
+                android:textSize="15sp" />
+
+
+            <ImageView
+                android:layout_width="6dp"
+                android:layout_height="12dp"
+                android:src="@drawable/ct_back_right" />
+
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="50dp"
+            android:background="@color/white"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="15dp"
+            android:paddingEnd="14dp">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="违规处罚"
+                android:textColor="@color/text_title"
+                android:textSize="15sp" />
+
+
+            <ImageView
+                android:layout_width="6dp"
+                android:layout_height="12dp"
+                android:src="@drawable/ct_back_right" />
+
+
+        </LinearLayout>
+        <View
+            android:background="#F3F3F3"
+            android:layout_marginEnd="15dp"
+            android:layout_marginStart="15dp"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_1"/>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="50dp"
+            android:background="@color/white"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="15dp"
+            android:paddingEnd="14dp">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="关于我们"
+                android:textColor="@color/text_title"
+                android:textSize="15sp" />
+
+
+            <ImageView
+                android:layout_width="6dp"
+                android:layout_height="12dp"
+                android:src="@drawable/ct_back_right" />
+
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1"/>
+
+        <TextView
+            android:text="退出登录"
+            android:textColor="#F02939"
+            android:gravity="center"
+            android:textSize="18sp"
+            android:onClick="@{v->vm.toExitLogin()}"
+            android:background="@color/white"
+            android:layout_width="match_parent"
+            android:layout_height="50dp"/>
+
+
+
+
+
+
+    </LinearLayout>
+</layout>

+ 163 - 107
app/src/main/res/layout/fragment_home_first.xml

@@ -8,6 +8,7 @@
         <variable
             name="vm"
             type="com.quansu.creativity.vmodel.HomeFirstVModel" />
+        <import type="android.view.View"/>
 
     </data>
 
@@ -19,133 +20,188 @@
         android:background="@drawable/bg_home_bg"
         android:paddingBottom="@dimen/dp_20">
 
-        <LinearLayout
+        <FrameLayout
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="vertical">
+            android:layout_height="match_parent">
 
 
-            <androidx.core.widget.NestedScrollView
+            <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:scrollbars="none">
+                android:orientation="vertical">
 
-                <LinearLayout
+
+                <androidx.core.widget.NestedScrollView
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
-                    android:orientation="vertical">
+                    android:fillViewport="true"
+                    android:scrollbars="none">
 
-                    <cn.bingoogolapple.bgabanner.BGABanner
-                        android:id="@+id/banner"
-                        android:layout_width="match_parent"
-                        android:layout_height="180dp"
-                        android:layout_marginStart="15dp"
-                        android:layout_marginTop="56dp"
-                        android:layout_marginEnd="15dp"
-                        app:banner_placeholderDrawable="@drawable/bg_need_error"
-                        app:banner_pointAutoPlayInterval="6000"
-                        app:banner_pointContainerBackground="@android:color/transparent"
-                        app:banner_pointDrawable="@drawable/banner_home_point"
-                        app:banner_pointLeftRightMargin="3dp"
-                        app:banner_pointTopBottomMargin="15dp"
-                        app:banner_transitionEffect="alpha" />
-
-
-                    <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+                    <LinearLayout
                         android:layout_width="match_parent"
-                        android:layout_height="38dp"
-                        android:layout_marginStart="15dp"
-                        android:layout_marginTop="14dp"
-                        android:layout_marginEnd="15dp"
-                        android:orientation="horizontal"
-                        app:qmui_backgroundColor="@color/white"
-                        app:qmui_borderColor="@color/white"
-                        app:qmui_radius="4dp">
-
-                        <TextView
-                            android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:orientation="vertical">
+
+                        <cn.bingoogolapple.bgabanner.BGABanner
+                            android:id="@+id/banner"
+                            android:layout_width="match_parent"
+                            android:layout_height="180dp"
+                            android:layout_marginStart="15dp"
+                            android:layout_marginTop="56dp"
+                            android:layout_marginEnd="15dp"
+                            app:banner_placeholderDrawable="@drawable/bg_need_error"
+                            app:banner_pointAutoPlayInterval="6000"
+                            app:banner_pointContainerBackground="@android:color/transparent"
+                            app:banner_pointDrawable="@drawable/banner_home_point"
+                            app:banner_pointLeftRightMargin="3dp"
+                            app:banner_pointTopBottomMargin="15dp"
+                            app:banner_transitionEffect="alpha" />
+
+
+                        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="38dp"
+                            android:layout_marginStart="15dp"
+                            android:visibility="@{vm.isLogin?View.VISIBLE:View.GONE}"
+                            android:layout_marginTop="14dp"
+                            android:layout_marginEnd="15dp"
+                            android:orientation="horizontal"
+                            app:qmui_backgroundColor="@color/white"
+                            app:qmui_borderColor="@color/white"
+                            app:qmui_radius="4dp">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center_vertical"
+                                android:layout_marginStart="16dp"
+                                android:text="最新公告"
+                                android:textColor="#62E0F8"
+                                android:textSize="12sp" />
+
+                            <View
+                                android:layout_width="1dp"
+                                android:layout_height="10dp"
+                                android:layout_gravity="center"
+                                android:layout_marginStart="10dp"
+                                android:layout_marginEnd="10dp"
+                                android:background="#E5EFEF" />
+
+                            <com.quansu.creativity.view.MarqueeTextView
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:ellipsize="marquee"
+                                android:focusable="true"
+                                android:focusableInTouchMode="true"
+                                android:gravity="center_vertical"
+                                android:marqueeRepeatLimit="marquee_forever"
+                                android:paddingEnd="@dimen/dp_14"
+                                android:scrollHorizontally="true"
+                                android:singleLine="true"
+                                android:text="@string/test_tips"
+                                android:textColor="@color/text_title"
+                                android:textSize="13dp" />
+
+
+                        </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:layout_gravity="center_vertical"
-                            android:layout_marginStart="16dp"
-                            android:text="最新公告"
-                            android:textColor="#62E0F8"
-                            android:textSize="12sp" />
-
-                        <View
-                            android:layout_width="1dp"
-                            android:layout_height="10dp"
-                            android:layout_gravity="center"
-                            android:layout_marginStart="10dp"
-                            android:layout_marginEnd="10dp"
-                            android:background="#E5EFEF" />
-
-                        <com.quansu.creativity.view.MarqueeTextView
+                            android:layout_marginStart="14dp"
+                            android:layout_marginTop="18dp"
+                            android:orientation="horizontal">
+
+                            <TextView
+                                android:id="@+id/tv_my_chose"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="精选推荐"
+                                android:textColor="#222222"
+                                android:textSize="18sp"
+                                android:textStyle="bold" />
+
+                            <TextView
+                                android:id="@+id/tv_my_appointment"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginStart="54dp"
+                                android:text="我的预约"
+                                android:textColor="#888888"
+                                android:textSize="18sp"
+                                android:textStyle="bold" />
+
+                        </LinearLayout>
+
+
+                        <RelativeLayout
                             android:layout_width="match_parent"
                             android:layout_height="match_parent"
-                            android:ellipsize="marquee"
-                            android:focusable="true"
-                            android:focusableInTouchMode="true"
-                            android:marqueeRepeatLimit="marquee_forever"
-                            android:scrollHorizontally="true"
-                            android:singleLine="true"
-                            android:text="@string/test_tips"
-                            android:gravity="center_vertical"
-                            android:paddingEnd="@dimen/dp_14"
-                            android:textColor="@color/text_title"
-                            android:textSize="13dp" />
+                            android:layout_marginStart="15dp"
+                            android:layout_marginTop="18dp"
+                            android:layout_marginEnd="15dp"
+                            android:orientation="vertical">
 
+                            <FrameLayout
+                                android:id="@+id/home_container"
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent" />
 
-                    </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+<!--                            <androidx.viewpager.widget.ViewPager-->
+<!--                                android:id="@+id/view_pager"-->
+<!--                                android:layout_width="match_parent"-->
+<!--                                android:layout_height="wrap_content">-->
 
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginStart="14dp"
-                        android:layout_marginTop="18dp"
-                        android:orientation="horizontal">
-
-                        <TextView
-                            android:id="@+id/tv_my_chose"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="精选推荐"
-                            android:textColor="#222222"
-                            android:textSize="18sp"
-                            android:textStyle="bold" />
-
-                        <TextView
-                            android:id="@+id/tv_my_appointment"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_marginStart="54dp"
-                            android:text="我的预约"
-                            android:textColor="#888888"
-                            android:textSize="18sp"
-                            android:textStyle="bold" />
-
-                    </LinearLayout>
-
-
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginStart="15dp"
-                        android:layout_marginTop="18dp"
-                        android:layout_marginEnd="15dp"
-                        android:orientation="vertical">
+<!--                            </androidx.viewpager.widget.ViewPager>-->
 
 
-                        <androidx.viewpager.widget.ViewPager
-                            android:id="@+id/view_pager"
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent">
-                        </androidx.viewpager.widget.ViewPager>
+                        </RelativeLayout>
+                    </LinearLayout>
+                </androidx.core.widget.NestedScrollView>
+            </LinearLayout>
 
+            <!--是否实名-->
 
-                    </LinearLayout>
-                </LinearLayout>
-            </androidx.core.widget.NestedScrollView>
-        </LinearLayout>
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+                android:layout_width="match_parent"
+                app:qmui_radius="6dp"
+                app:qmui_borderColor="@color/translucent"
+                android:layout_gravity="bottom"
+                android:layout_marginBottom="23dp"
+                app:qmui_backgroundColor="#B3ffffff"
+                android:gravity="center_vertical"
+                android:visibility="@{vm.isLogin?View.VISIBLE:View.GONE}"
+                android:layout_height="50dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_weight="1"
+                    android:text="实名认证之后才能支持购买数字藏品!"
+                    android:textSize="13sp"
+                    android:textColor="@color/text_title"
+                    android:layout_marginStart="20dp"
+                    android:layout_height="wrap_content"/>
+
+                 <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+                     android:layout_width="wrap_content"
+                     android:paddingStart="17dp"
+                     android:paddingEnd="16dp"
+                     android:paddingTop="4dp"
+                     android:paddingBottom="4dp"
+                     android:text="去实名"
+                     android:textSize="15sp"
+                     app:qmui_radius="4dp"
+                     app:qmui_backgroundColor="#38D3D3"
+                     app:qmui_borderColor="@color/translucent"
+                     android:textColor="@color/white"
+                     android:layout_marginEnd="20dp"
+                     android:layout_height="wrap_content"/>
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+
+
+        </FrameLayout>
 
 
     </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

+ 650 - 9
app/src/main/res/layout/fragment_home_my.xml

@@ -1,20 +1,661 @@
 <?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" >
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+    <data>
 
-    <data >
         <variable
             name="vm"
             type="com.quansu.creativity.vmodel.HomeMyVModel" />
 
-    </data >
+        <import type="android.view.View" />
+
+    </data>
 
-    <LinearLayout
+    <LinearLayout xmlns:tools="http://schemas.android.com/tools"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:gravity="center"
-        xmlns:tools="http://schemas.android.com/tools"
-        android:orientation="horizontal" >
+        android:background="@drawable/bg_home_bg"
+        android:orientation="vertical">
+
+        <ImageView
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:layout_gravity="right"
+            android:layout_marginTop="56dp"
+            android:layout_marginEnd="15dp"
+            android:src="@drawable/ct_msg" />
+
+
+        <FrameLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="15dp"
+                android:layout_marginEnd="26dp"
+                android:visibility="@{vm.isLogin?View.VISIBLE:View.GONE}"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <FrameLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content">
+                    <!--                   app:url="@{vm.user.avatar}"-->
+                    <com.qmuiteam.qmui.widget.QMUIRadiusImageView
+                        android:id="@+id/img_avater"
+                        android:layout_width="64dp"
+                        android:layout_height="64dp"
+                        android:background="@drawable/ic_default_avatar"
+                        app:qmui_border_color="@color/white"
+                        app:qmui_corner_radius="2dp"
+                        app:qmui_is_oval="true" />
+
+                    <ImageView
+                        android:layout_width="56dp"
+                        android:layout_height="24dp"
+                        android:layout_marginStart="20dp"
+                        android:layout_marginTop="45dp"
+                        android:src="@drawable/ic_renzheng" />
+
+
+                </FrameLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="6dp"
+                    android:orientation="vertical">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="187***1928"
+                        android:textColor="#1B1A1B"
+                        android:textSize="20sp"
+                        android:textStyle="bold" />
+
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="22dp"
+                        android:background="#B3FFFFFF"
+                        android:orientation="horizontal">
+
+
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="6dp"
+                            android:layout_weight="1"
+                            android:ellipsize="end"
+                            android:singleLine="true"
+                            android:text="区块链地址:vhhjjdjdjjskkw"
+                            android:textColor="#222222"
+                            android:textSize="10sp" />
+
+                        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginEnd="4dp"
+                            android:paddingStart="6dp"
+                            android:paddingTop="4dp"
+                            android:paddingEnd="6dp"
+                            android:paddingBottom="4dp"
+                            android:text="复制"
+                            android:textColor="@color/white"
+                            android:textSize="10sp"
+                            app:qmui_backgroundColor="#38D3D3"
+                            app:qmui_borderColor="@color/translucent"
+                            app:qmui_radius="2dp" />
+
+                    </LinearLayout>
+
+
+                </LinearLayout>
+
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="15dp"
+                android:layout_marginEnd="26dp"
+                android:orientation="horizontal"
+                android:visibility="@{vm.isLogin?View.GONE:View.VISIBLE}">
+
+                <com.qmuiteam.qmui.widget.QMUIRadiusImageView
+                    android:layout_width="64dp"
+                    android:layout_height="64dp"
+                    android:background="@drawable/ic_default_avatar"
+                    app:qmui_border_color="@color/white"
+                    app:qmui_corner_radius="2dp"
+                    app:qmui_is_oval="true" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginStart="10dp"
+                    android:text="请登录"
+                    android:textColor="#1B1A1B"
+                    android:textSize="20sp" />
+
+
+            </LinearLayout>
+
+        </FrameLayout>
+
+        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="15dp"
+            android:layout_marginTop="19dp"
+            android:layout_marginEnd="15dp"
+            android:orientation="horizontal"
+            app:qmui_backgroundColor="@color/white"
+            app:qmui_borderColor="@color/translucent"
+            app:qmui_radius="10dp">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:layout_marginTop="16dp"
+                android:layout_marginBottom="9dp"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:orientation="vertical">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:orientation="horizontal">
+
+                        <ImageView
+                            android:layout_width="22dp"
+                            android:layout_height="26dp"
+                            android:src="@drawable/ct_my_jifen" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="8dp"
+                            android:text="积分"
+                            android:textColor="#666666"
+                            android:textSize="14sp" />
+
+                    </LinearLayout>
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center_horizontal"
+                        android:layout_marginTop="13dp"
+                        android:text="0"
+                        android:textColor="@color/text_title"
+                        android:textSize="20sp" />
+
+                </LinearLayout>
+
+
+                <View
+                    android:layout_width="1dp"
+                    android:layout_height="46dp"
+                    android:background="#E7E7E7" />
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:orientation="vertical">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:orientation="horizontal">
+
+                        <ImageView
+                            android:layout_width="22dp"
+                            android:layout_height="26dp"
+                            android:src="@drawable/ct_my_banlance" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="8dp"
+                            android:text="余额"
+                            android:textColor="#666666"
+                            android:textSize="14sp" />
+
+                    </LinearLayout>
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center_horizontal"
+                        android:layout_marginTop="@dimen/dp_13"
+                        android:text="0.00"
+                        android:textColor="@color/text_title"
+                        android:textSize="20sp" />
+
+                </LinearLayout>
+
+
+            </LinearLayout>
+
+
+        </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="15dp"
+            android:layout_marginTop="12dp"
+            android:layout_marginEnd="15dp"
+            android:orientation="vertical"
+            android:paddingTop="18dp"
+            android:paddingBottom="18dp"
+            app:qmui_backgroundColor="#FFFFFF"
+            app:qmui_borderColor="@color/translucent"
+            app:qmui_radius="12dp">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="24dp"
+                        android:layout_height="24dp"
+                        android:src="@drawable/ct_home_order" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="1dp"
+                        android:text="我的订单"
+                        android:textColor="#222222"
+                        android:textSize="12sp" />
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="24dp"
+                        android:layout_height="24dp"
+                        android:src="@drawable/ct_my_jishou" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="1dp"
+                        android:text="商城订单"
+                        android:textColor="#222222"
+                        android:textSize="12sp" />
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="24dp"
+                        android:layout_height="24dp"
+                        android:src="@drawable/ct_my_store" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="1dp"
+                        android:text="我的订单"
+                        android:textColor="#222222"
+                        android:textSize="12sp" />
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="24dp"
+                        android:layout_height="24dp"
+                        android:src="@drawable/ct_my_zeng" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="1dp"
+                        android:text="转赠"
+                        android:textColor="#222222"
+                        android:textSize="12sp" />
+
+
+                </LinearLayout>
+
+
+            </LinearLayout>
+
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="27dp"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="24dp"
+                        android:layout_height="24dp"
+                        android:src="@drawable/ct_my_renzheng" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="1dp"
+                        android:text="实名认证"
+                        android:textColor="#222222"
+                        android:textSize="12sp" />
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="24dp"
+                        android:layout_height="24dp"
+                        android:src="@drawable/ct_my_tuiguang" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="1dp"
+                        android:text="推广"
+                        android:textColor="#222222"
+                        android:textSize="12sp" />
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:onClick="@{v->vm.toSetting()}"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="24dp"
+                        android:layout_height="24dp"
+                        android:src="@drawable/ct_my_setting" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="1dp"
+                        android:text="设置"
+                        android:textColor="#222222"
+                        android:textSize="12sp" />
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+
+                </LinearLayout>
+
+
+            </LinearLayout>
+
+
+        </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="15dp"
+            android:layout_marginTop="12dp"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="我的藏品"
+                android:textColor="@color/text_title"
+                android:textSize="15sp"
+                android:textStyle="bold" />
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="(0)"
+                android:textColor="@color/text_title"
+                android:textSize="15sp"
+                android:textStyle="bold" />
+
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+                android:layout_width="70dp"
+                android:layout_height="20dp"
+                android:layout_marginEnd="15dp"
+                android:text="合成藏品"
+                android:textColor="@color/white"
+                app:qmui_backgroundColor="#38D3D3"
+                app:qmui_borderColor="@color/translucent"
+                app:qmui_radius="4dp" />
+
+
+        </LinearLayout>
+
+        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="15dp"
+            android:layout_marginTop="12dp"
+            android:padding="4dp"
+            app:qmui_backgroundColor="#B3ffffff"
+            app:qmui_borderColor="@color/translucent"
+            app:qmui_radius="12dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:background="@drawable/bg_chose_gray"
+                android:paddingStart="12dp"
+                android:paddingTop="6dp"
+                android:paddingEnd="12dp"
+                android:paddingBottom="4dp"
+                android:text="商品"
+                android:textColor="@color/text_title"
+                android:textSize="15sp" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:background="@drawable/bg_chose_white"
+                android:paddingStart="12dp"
+                android:paddingTop="6dp"
+                android:paddingEnd="12dp"
+                android:paddingBottom="4dp"
+                android:text="盲盒"
+                android:textColor="#A2A2A2"
+                android:textSize="15sp" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:background="@drawable/bg_chose_white"
+                android:paddingStart="12dp"
+                android:paddingTop="6dp"
+                android:paddingEnd="12dp"
+                android:paddingBottom="4dp"
+                android:text="全部"
+                android:textColor="#A2A2A2"
+                android:textSize="15sp" />
+
+
+        </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+
+        <FrameLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="18dp">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:orientation="vertical">
+
+
+                <androidx.viewpager.widget.ViewPager
+                    android:id="@+id/view_pager"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent">
+
+                </androidx.viewpager.widget.ViewPager>
+
+
+            </LinearLayout>
+
+            <!--            实名认证-->
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="50dp"
+                android:layout_marginEnd="50dp"
+                android:orientation="vertical"
+                app:qmui_backgroundColor="@color/white"
+                app:qmui_borderColor="@color/translucent"
+                app:qmui_radius="12dp">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_marginTop="16dp"
+                    android:text="暂无藏品"
+                    android:textColor="@color/text_title"
+                    android:textSize="15sp" />
+
+                <ImageView
+                    android:layout_width="40dp"
+                    android:layout_height="40dp"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_marginTop="20dp"
+                    android:src="@drawable/ct_my_avator" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_marginTop="@dimen/dp_13"
+                    android:text="实名认证后才能支付购买藏品"
+                    android:textColor="@color/text_title"
+                    android:textSize="13sp" />
+
+                <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+                    android:layout_width="match_parent"
+                    android:layout_height="40dp"
+                    android:layout_marginStart="50dp"
+                    android:layout_marginTop="12dp"
+                    android:layout_marginEnd="50dp"
+                    android:layout_marginBottom="20dp"
+                    android:text="实名认证"
+                    android:textColor="@color/white"
+                    android:textSize="15sp"
+                    android:textStyle="bold"
+                    app:qmui_backgroundColor="#38D3D3"
+                    app:qmui_borderColor="#38D3D3"
+                    app:qmui_radius="8dp" />
+
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+             <!--    游客状态        -->
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="180dp"
+                android:layout_marginStart="50dp"
+                android:layout_marginEnd="50dp"
+                android:orientation="vertical"
+                android:gravity="center"
+                android:visibility="@{vm.isLogin?View.GONE:View.VISIBLE}"
+                app:qmui_backgroundColor="@color/white"
+                app:qmui_borderColor="@color/translucent"
+                app:qmui_radius="12dp">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_marginTop="16dp"
+                    android:text="暂无藏品"
+                    android:textColor="@color/text_title"
+                    android:textSize="15sp" />
+
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+
+
+        </FrameLayout>
+
 
-    </LinearLayout >
-</layout >
+    </LinearLayout>
+</layout>

+ 120 - 173
app/src/main/res/layout/item_recommed.xml

@@ -9,7 +9,7 @@
 
         <variable
             name="item"
-            type="com.quansu.creativity.model.AmountList" />
+            type="com.quansu.creativity.model.CollectionList" />
 
     </data>
 
@@ -18,226 +18,173 @@
         android:layout_height="wrap_content"
         android:orientation="vertical">
 
-        <FrameLayout
+        <com.qmuiteam.qmui.layout.QMUILinearLayout
+            android:id="@+id/ll_center"
             android:layout_width="match_parent"
-            android:layout_height="345dp">
-
-            <!--       app:url="@{item.images[0]}" 给值-->
-            <com.qmuiteam.qmui.widget.QMUIRadiusImageView
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:src="@drawable/bg_need_error"
-                app:qmui_border_color="@color/translucent"
-                app:qmui_corner_radius="20dp" />
-
-            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
-                android:layout_width="wrap_content"
-                app:qmui_radius="12dp"
-                app:qmui_borderColor="@color/translucent"
-                app:qmui_backgroundColor="#33000000"
-                android:layout_marginTop="22dp"
-                android:gravity="center_vertical"
-                android:layout_marginStart="12dp"
-                android:paddingStart="12dp"
-                android:paddingEnd="11dp"
-                android:layout_height="24dp">
-
-                <ImageView
-                    android:src="@drawable/ct_time"
-                    android:layout_marginEnd="6dp"
-                    android:layout_width="12dp"
-                    android:layout_height="12dp"/>
-
-                <TextView
-                    android:text="即将开售 10:23:23"
-                    android:textSize="10sp"
-                    android:textColor="#62FFF0"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"/>
-
-            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
-
-
-
-            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
-                android:layout_width="match_parent"
-                android:orientation="vertical"
-                app:qmui_borderColor="@color/translucent"
-                app:qmui_radius="14dp"
-                android:paddingTop="12dp"
-                android:paddingBottom="10dp"
-                android:paddingStart="10dp"
-                android:paddingEnd="10dp"
-                android:layout_gravity="bottom"
-                android:layout_marginBottom="10dp"
-                android:layout_marginEnd="10dp"
-                android:layout_marginStart="10dp"
-                app:qmui_backgroundColor="#66000000"
-                android:layout_height="wrap_content">
-
-                <TextView
-                    android:hint="潮玩设计 | 闹仔NOWKNOW"
-                    android:textSize="18sp"
-                    android:textColor="#FFFFFF"
-                    android:textStyle="bold"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"/>
-
-                <LinearLayout
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content">
-                    
-                    <TextView
-                        android:background="#38D3D3"
-                        android:hint="限量"
-                       android:padding="9dp"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"/>
-
-                </LinearLayout>
-
-
-
-            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
-
-
-
-
-
-
-
-        </FrameLayout>
-
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:gravity="center"
+            android:layout_height="345dp"
+            android:background="@color/white"
             android:orientation="horizontal"
-            android:paddingTop="16dp"
-            android:paddingBottom="15dp">
+            app:qmui_radius="10dp"
+            app:qmui_shadowAlpha="0.56"
+            app:qmui_shadowElevation="7dp">
 
-            <ImageView
-                android:id="@+id/img_icon"
-                android:layout_width="44dp"
-                android:layout_height="44dp"
-                android:src="@{item.set==1?@drawable/ic_account_enter:@drawable/ic_account_out}"
-                tools:src="@drawable/ic_account_enter"
-
-                />
-
-            <LinearLayout
+            <FrameLayout
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:paddingStart="12dp">
-
-                <LinearLayout
-                    android:id="@+id/ll_top"
+                android:layout_height="match_parent">
+                <!--       app:url="@{item.images[0]}" 给值-->
+                <com.qmuiteam.qmui.widget.QMUIRadiusImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:src="@drawable/bg_need_error"
+                    app:qmui_border_color="@color/translucent"
+                    android:scaleType="centerCrop"
+                    app:url="@{item.cover}"
+                    app:qmui_corner_radius="20dp" />
+
+                <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginBottom="5dp"
-                    android:layout_toEndOf="@id/img_icon"
-                    android:orientation="horizontal"
-                    android:visibility="@{item.info_info!=null||item.order_info!=null?View.VISIBLE:View.GONE}">
-
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="运单号:"
-                        android:textColor="#979899"
-                        android:textSize="14sp" />
+                    android:layout_marginStart="12dp"
+                    android:layout_marginTop="22dp"
+                    android:gravity="center_vertical"
+                    android:paddingStart="12dp"
+                    android:paddingEnd="11dp"
+                    app:qmui_backgroundColor="#33000000"
+                    app:qmui_borderColor="@color/translucent"
+                    app:qmui_radius="12dp">
+
+                    <ImageView
+                        android:id="@+id/img_state"
+                        android:layout_width="12dp"
+                        android:layout_height="12dp"
+                        android:layout_marginEnd="6dp"
+                        android:src="@drawable/ct_time" />
 
                     <TextView
-                        android:id="@+id/tv_sn"
+                        android:id="@+id/tv_state"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:text="@{item.order_info!=null?item.order_info.order_sn:item.info_info.info_sn}"
-                        android:textColor="#4E9FF8"
-                        android:textSize="15sp"
-                        tools:text="1234556699999999999999999999" />
+                        android:text="即将开售 10:23:23"
+                        android:textColor="#62FFF0"
+                        android:textSize="10sp" />
 
+                </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
 
-                </LinearLayout>
 
-
-                <LinearLayout
+                <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:orientation="horizontal">
+                    android:layout_gravity="bottom"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginEnd="10dp"
+                    android:layout_marginBottom="10dp"
+                    android:orientation="vertical"
+                    android:paddingStart="10dp"
+                    android:paddingTop="12dp"
+                    android:paddingEnd="10dp"
+                    android:paddingBottom="10dp"
+                    app:qmui_backgroundColor="#66000000"
+                    app:qmui_borderColor="@color/translucent"
+                    app:qmui_radius="14dp">
 
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:hint="潮玩设计 | 闹仔NOWKNOW"
+                        android:text="@{item.name}"
+                        android:textColor="#FFFFFF"
+                        android:textSize="18sp"
+                        android:textStyle="bold" />
 
                     <LinearLayout
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:orientation="vertical">
+                        android:layout_marginTop="6dp">
 
                         <TextView
-                            android:id="@+id/tv_name"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:ellipsize="end"
-                            android:maxLines="1"
-                            android:text="@{item.data}"
-                            android:textColor="#333333"
-                            android:textSize="@dimen/sp_14"
-                            tools:text="提现-提现到微信" />
+                            android:background="#38D3D3"
+                            android:hint="限量"
+                            android:paddingStart="9dp"
+                            android:paddingTop="2dp"
+                            android:paddingEnd="9dp"
+                            android:paddingBottom="2dp" />
 
                         <TextView
-                            android:id="@+id/tv_desc"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_marginTop="5dp"
-                            android:text="@{item.create_time}"
-                            android:textColor="#979899"
-                            android:textSize="14sp"
-                            tools:text="今天 11:46" />
+                            android:background="@drawable/bg_kuang_blue"
+                            android:hint="100份"
+                            android:text="@{item.inventory+`份`}"
+                            android:paddingStart="9dp"
+                            android:paddingTop="2dp"
+                            android:paddingEnd="9dp"
+                            android:paddingBottom="2dp"
+                            android:textColor="#54D7E9"
+                            android:textColorHint="#54D7E9" />
 
                     </LinearLayout>
 
                     <LinearLayout
-                        android:layout_width="wrap_content"
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:orientation="vertical">
+                        android:layout_marginTop="10dp"
+                        android:orientation="horizontal">
+
+
+                        <com.qmuiteam.qmui.widget.QMUIRadiusImageView
+                            android:layout_width="18dp"
+                            android:layout_height="18dp"
+                            app:url="@{item.auth_img}"
+                            android:layout_gravity="center_vertical"
+                            android:src="@drawable/bg_need_error"
+                            app:qmui_border_color="@color/translucent"
+                            app:qmui_is_circle="true" />
+
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="6dp"
+                            android:layout_weight="1"
+                            android:layout_gravity="center_vertical"
+                            android:text="@{item.auth_name}"
+                            android:textColor="#D2D2D2"
+                            android:textSize="12sp" />
 
                         <TextView
-                            android:id="@+id/tv_balance"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:ellipsize="end"
-                            android:maxLines="1"
-                            android:text="@{item.set==1?@string/plus+item.money:@string/reduce+item.money}"
-                            android:textColor="@{item.set==1?@color/pay_on:@color/pay_off}"
-                            android:textSize="12sp"
-                            tools:text="-500.00" />
+                            android:text="¥"
+                            android:textColor="@color/white"
+                            android:textSize="18sp"
+                            />
 
                         <TextView
-                            android:id="@+id/tv_available_balance"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_marginTop="5dp"
-                            android:text="@{@string/yu+item.total}"
-                            android:textColor="#979899"
-                            android:textSize="13sp"
-                            tools:text="当前余额:20000" />
+                            android:text="@{item.price}"
+                            android:textColor="@color/white"
+                            android:textSize="24sp"
+                             />
 
 
                     </LinearLayout>
 
-                </LinearLayout>
 
-            </LinearLayout>
-        </LinearLayout>
+                </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+
+            </FrameLayout>
+
+        </com.qmuiteam.qmui.layout.QMUILinearLayout>
+
+
+
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:layout_alignParentBottom="true"
-            android:layout_marginStart="68dp"
-            android:background="#E5E5E5" />
-
+            android:layout_height="14dp" />
 
     </LinearLayout>
 </layout>

+ 4 - 2
app/src/main/res/values/strings.xml

@@ -1,5 +1,5 @@
 <resources >
-    <string name="app_name" >神灯云矿</string >
+    <string name="app_name" >创持文化</string >
     <string name="abc_action_bar_home_description" >Navigate home</string >
     <string name="abc_action_bar_home_description_format" >%1$s, %2$s</string >
     <string name="abc_action_bar_home_subtitle_description_format" >%1$s, %2$s, %3$s</string >
@@ -379,7 +379,9 @@ Api 已达到使用限制
 
 
 
-    <string name="please_input_pwd" >请输入密码</string >
+    <string name="please_input_pwd" >请输入登录密码</string >
+    <string name="please_red_policy" >请先阅读政策</string >
+
 
     <string name="logout" >退出登录</string >
     <string name="please_login" >请先登录</string >

+ 2 - 1
base/src/main/java/com/ysnows/base/base/BRRepository.kt

@@ -122,9 +122,10 @@ open class BRRepository : BRepository() {
                 page -= 1
             }
 
+
             return Resp<Any>(
                 NetCode.CODE_EXCEPTION,
-                message = ExceptionUtils.getExceptionName(e)
+                msg = ExceptionUtils.getExceptionName(e)
             ) as T
         }
     }

+ 1 - 1
base/src/main/java/com/ysnows/base/base/BRepository.kt

@@ -231,7 +231,7 @@ open class BRepository : IRepository {
                 }
             }
 
-            return Resp<Any>(NetCode.CODE_EXCEPTION, message = ExceptionUtils.getExceptionName(e)) as T
+            return Resp<Any>(NetCode.CODE_EXCEPTION, msg = ExceptionUtils.getExceptionName(e)) as T
         }
     }
 

+ 1 - 1
base/src/main/java/com/ysnows/base/net/BHeaderInterceptor.java

@@ -18,7 +18,7 @@ public class BHeaderInterceptor implements Interceptor {
         Request request = chain.request().newBuilder()
                 .addHeader("User-Agent", "type/android;app_version_code/" +  BApp.instance().config().getVersionCode() + ";app_version_name/" +  BApp.instance().config().getVersionName() + ";phone_brand/" + Build.BRAND + ";phone_model/" + Build.MODEL + ";system_version_code/" + Build.VERSION.SDK_INT + ";system_version_name/" + Build.VERSION.RELEASE)
                 .addHeader("Content-Type", "application/json")
-                .addHeader("X-TOKEN", MMKV.defaultMMKV().decodeString("token", ""))
+                .addHeader("authorization", MMKV.defaultMMKV().decodeString("token", ""))
                 .build();
 
         return chain.proceed(request);

+ 1 - 0
base/src/main/java/com/ysnows/base/net/IResp.kt

@@ -9,5 +9,6 @@ interface IResp<D> {
     fun total(): Int
     fun more(page: Int): Boolean
     fun empty(): Boolean
+    fun isLogin():Int
     fun more(page: Int, pageCount: Int): Boolean
 }

+ 27 - 9
base/src/main/java/com/ysnows/base/net/Resp.kt

@@ -4,15 +4,18 @@ import com.ysnows.base.base.BApp
 import com.ysnows.base.utils.Toasts
 
 open class Resp<D>(
-    val status: Int = 0,
-    val message: String? = null,
-    val total: Int = 0,
-    val count: Int = 10,
-    val datas: D? = null
+        val code: Int = 0,//接口访问失败 1接口访问成功
+        val msg: String? = null,
+        val total: Int = 0,
+        val count: Int = 10,
+        val data: D? = null,
+        val is_login:Int=0//0 登录超时 1登录成功
+
 ) : IResp<D> {
 
     override fun ok(showError: Boolean): Boolean {
-        val ok = status == 1
+
+        val ok = code == 1
 
 //        if (showError && !ok) {
 //            Toasts.toast(BApp.instance(), msg())
@@ -20,11 +23,20 @@ open class Resp<D>(
         if (showError) {//状态成功的时候也可以提示
             Toasts.toast(BApp.instance(), msg())
         }
+
+//        val ok = status == 1
+//
+////        if (showError && !ok) {
+////            Toasts.toast(BApp.instance(), msg())
+////        }
+//        if (showError) {//状态成功的时候也可以提示
+//            Toasts.toast(BApp.instance(), msg())
+//        }
         return ok
     }
 
     override fun code(): Int {
-        return status
+        return code
     }
 
     override fun count(): Int {
@@ -36,11 +48,11 @@ open class Resp<D>(
     }
 
     override fun msg(): String? {
-        return message
+        return msg
     }
 
     override fun data(): D? {
-        return datas
+        return data
     }
 
     override fun more(page: Int): Boolean {
@@ -54,4 +66,10 @@ open class Resp<D>(
     override fun empty(): Boolean {
         return total() <= 0
     }
+
+    override fun isLogin(): Int {
+        return isLogin()
+    }
+
+
 }

+ 1 - 1
settings.gradle

@@ -1,5 +1,5 @@
 include ':jpush'
-include ':umeng'
+//include ':umeng'
 include ':update'
 //include ':gaode'
 include ':lookimg'