添加首页
|
|
@ -178,6 +178,7 @@ dependencies {
|
||||||
implementation 'com.github.Dimezis:BlurView:version-2.0.6' //毛玻璃效果
|
implementation 'com.github.Dimezis:BlurView:version-2.0.6' //毛玻璃效果
|
||||||
implementation 'com.bytedance.ads:AppConvert:2.0.0' //巨量融合
|
implementation 'com.bytedance.ads:AppConvert:2.0.0' //巨量融合
|
||||||
implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:4.1.14' // 滚轮选择器
|
implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:4.1.14' // 滚轮选择器
|
||||||
|
implementation 'com.github.lihangleo2:ShadowLayout:3.4.1' //阴影布局
|
||||||
//media3视频播放
|
//media3视频播放
|
||||||
implementation "androidx.media3:media3-exoplayer:1.4.1"
|
implementation "androidx.media3:media3-exoplayer:1.4.1"
|
||||||
implementation "androidx.media3:media3-ui:1.4.1"
|
implementation "androidx.media3:media3-ui:1.4.1"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class AttachmentBean(
|
||||||
|
val id: String = "",
|
||||||
|
val url: String,
|
||||||
|
val type: String,
|
||||||
|
val title: String
|
||||||
|
): Serializable
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class BidDetailBean(
|
||||||
|
val city: Int,
|
||||||
|
val city_id: String,
|
||||||
|
val city_name: String,
|
||||||
|
val contact: List<ContactsInfoBean>,
|
||||||
|
val contact_name: String,
|
||||||
|
val contact_phone: String,
|
||||||
|
val content_type: String,
|
||||||
|
val id: String,
|
||||||
|
val info_source: String,
|
||||||
|
val is_fav: Boolean,
|
||||||
|
val issue_time: String,
|
||||||
|
val origin_attachment: List<AttachmentBean>,
|
||||||
|
val origin_title: String,
|
||||||
|
val origin_content: Any,
|
||||||
|
val origin_url: String,
|
||||||
|
val project_amount: String,
|
||||||
|
val project_amount_money: String,
|
||||||
|
val project_amount_show: String,
|
||||||
|
val share_url: String,
|
||||||
|
val src_id: Int,
|
||||||
|
val src_name: String,
|
||||||
|
val subject: String,
|
||||||
|
val tips_time: String,
|
||||||
|
val type_id: String,
|
||||||
|
val type_name: String,
|
||||||
|
val status: String, //1. 待审核 2. 通过 3.驳回
|
||||||
|
val review_remark: String,
|
||||||
|
val review_time: String,
|
||||||
|
val star: String
|
||||||
|
): Serializable
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
|
|
||||||
|
data class BidItemBean(
|
||||||
|
val id: String,
|
||||||
|
val recommend_id: String, //订阅消息
|
||||||
|
val info_source: String,
|
||||||
|
val title: String,
|
||||||
|
val content: String,
|
||||||
|
val regionName: String,
|
||||||
|
val typeName: String,
|
||||||
|
val money: String,
|
||||||
|
val tipsTime: String,
|
||||||
|
val star: String
|
||||||
|
) {
|
||||||
|
fun getShortName(): String {
|
||||||
|
return when (typeName) {
|
||||||
|
"招标计划" -> "招标"
|
||||||
|
"采购公告" -> "采购"
|
||||||
|
"招标公告" -> "预告"
|
||||||
|
"合同公告" -> "合同"
|
||||||
|
"中标公告" -> "中标"
|
||||||
|
"竞争性磋商" -> "竞争性磋商"
|
||||||
|
"更正公告" -> "更正"
|
||||||
|
"终止公告" -> "终止"
|
||||||
|
else -> "其他"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getTypeColor(): Int {
|
||||||
|
return when (typeName) {
|
||||||
|
"招标计划" -> Color.parseColor("#2B88F9")
|
||||||
|
"采购公告" -> Color.parseColor("#FF7344")
|
||||||
|
"招标公告" -> Color.parseColor("#14CEB3")
|
||||||
|
"合同公告" -> Color.parseColor("#FFA91D")
|
||||||
|
"中标公告" -> Color.parseColor("#FF1B1B")
|
||||||
|
"竞争性磋商" -> Color.parseColor("#0DA9FF")
|
||||||
|
"更正公告" -> Color.parseColor("#7066FF")
|
||||||
|
"终止公告" -> Color.parseColor("#8C9199")
|
||||||
|
else -> Color.parseColor("#EEEEEE")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class BidTypeBean(
|
||||||
|
val id: String = "",
|
||||||
|
val name: String = "",
|
||||||
|
val sort: Int = 0,
|
||||||
|
val keyword: String = "",
|
||||||
|
val priority_keyword: String = "",
|
||||||
|
var isChecked: Boolean = false
|
||||||
|
) : Serializable
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
class CityBean(
|
||||||
|
val id: Int = 0,
|
||||||
|
val pid: Int = 0,
|
||||||
|
val name: String = "",
|
||||||
|
val amount: String = "",
|
||||||
|
var children: MutableList<CityBean> = mutableListOf(),
|
||||||
|
var isChecked: Boolean = false
|
||||||
|
) : Serializable
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class CompanyBean(
|
||||||
|
val city_id: String,
|
||||||
|
val city_name: String,
|
||||||
|
val company_name: String,
|
||||||
|
val contact: List<ContactsInfoBean>,
|
||||||
|
val create_time: String,
|
||||||
|
val extra: Any?,
|
||||||
|
val file_id: String,
|
||||||
|
val file_url: String,
|
||||||
|
val id: String,
|
||||||
|
val review_time: String,
|
||||||
|
val remark: String,
|
||||||
|
val status: String,
|
||||||
|
val update_time: String
|
||||||
|
) : Serializable
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
class ContactsInfoBean(
|
||||||
|
var name: String,
|
||||||
|
var phone: String,
|
||||||
|
var job: String
|
||||||
|
): Serializable {
|
||||||
|
class Job(
|
||||||
|
val name: String,
|
||||||
|
var isChecked: Boolean = false
|
||||||
|
): Serializable
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun getPositionList(): List<Job> {
|
||||||
|
return listOf(
|
||||||
|
Job("企业负责人"),
|
||||||
|
Job("总经理"),
|
||||||
|
Job("经理"),
|
||||||
|
Job("业务总监"),
|
||||||
|
Job("销售总监"),
|
||||||
|
Job("市场总监"),
|
||||||
|
Job("业务经理"),
|
||||||
|
Job("销售经理"),
|
||||||
|
Job("市场经理"),
|
||||||
|
Job("销售/业务员"),
|
||||||
|
Job("项目经理"),
|
||||||
|
Job("工程师")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class CorpInfoBean(
|
||||||
|
val id: String,
|
||||||
|
val corp_name: String,
|
||||||
|
val sub_user_limit: String,
|
||||||
|
val bind_count: String,
|
||||||
|
val vip_expire_time: String,
|
||||||
|
val create_time: String,
|
||||||
|
val update_time: String
|
||||||
|
): Serializable
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class GuideTotalBidInfoBean(
|
||||||
|
val bidCount: Int,
|
||||||
|
val hasContact: Int,
|
||||||
|
val maxMoney: Int,
|
||||||
|
val yesterdayCount: Int
|
||||||
|
): Serializable
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
data class GuideUpdateInfoBean(
|
||||||
|
val count: Int,
|
||||||
|
val day: String
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class HotWordBean(
|
||||||
|
val id: Int,
|
||||||
|
val name: String,
|
||||||
|
val children: List<Child> = emptyList(),
|
||||||
|
var icon: Int = 0,
|
||||||
|
var isChecked: Boolean = false,
|
||||||
|
var anim: Boolean = true
|
||||||
|
): Serializable {
|
||||||
|
data class Child(
|
||||||
|
val amount: String = "0",
|
||||||
|
val children: List<Child> = emptyList(),
|
||||||
|
val id: Int = 0,
|
||||||
|
val name: String,
|
||||||
|
val pid: Int = 0,
|
||||||
|
val status: String = "",
|
||||||
|
val type: String = "",
|
||||||
|
val weight: String = "",
|
||||||
|
var isChecked: Boolean = false
|
||||||
|
): Serializable
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import com.cheng.bole.R
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class MenuEntity(
|
||||||
|
val id: String,
|
||||||
|
val resId: Int,
|
||||||
|
val title: String
|
||||||
|
): Serializable {
|
||||||
|
companion object {
|
||||||
|
fun getHomeMenu(): List<MenuEntity> {
|
||||||
|
val list = mutableListOf<MenuEntity>()
|
||||||
|
list.add(MenuEntity("1", R.mipmap.ic_home_icon1, "代理记账"))
|
||||||
|
list.add(MenuEntity("2", R.mipmap.ic_home_icon2, "企业注册"))
|
||||||
|
list.add(MenuEntity("3", R.mipmap.ic_home_icon3, "标书制作"))
|
||||||
|
list.add(MenuEntity("4", R.mipmap.ic_home_icon4, "资质代办"))
|
||||||
|
list.add(MenuEntity("5", R.mipmap.ic_home_icon5, "招标公告"))
|
||||||
|
list.add(MenuEntity("6", R.mipmap.ic_home_icon6, "采购公告"))
|
||||||
|
list.add(MenuEntity("7", R.mipmap.ic_home_icon7, "招标预告"))
|
||||||
|
list.add(MenuEntity("8", R.mipmap.ic_home_icon8, "合同公告"))
|
||||||
|
list.add(MenuEntity("9", R.mipmap.ic_home_icon9, "中标结果"))
|
||||||
|
list.add(MenuEntity("10", R.mipmap.ic_home_icon10, "竟争性磋商"))
|
||||||
|
list.add(MenuEntity("11", R.mipmap.ic_home_icon11, "更正公告"))
|
||||||
|
list.add(MenuEntity("12", R.mipmap.ic_home_icon12, "终止公告"))
|
||||||
|
return list
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class MerchantGoodsBean(
|
||||||
|
val city_id: String,
|
||||||
|
val city_name: String,
|
||||||
|
val company: CompanyBean,
|
||||||
|
val contact: List<ContactsInfoBean>,
|
||||||
|
val create_time: String,
|
||||||
|
val file: List<UploadFileBean>,
|
||||||
|
val goods_description: String,
|
||||||
|
val goods_name: String,
|
||||||
|
val goods_price: String,
|
||||||
|
val goods_price_show: String,
|
||||||
|
val goods_price_type: String,
|
||||||
|
val id: String,
|
||||||
|
val remark: String,
|
||||||
|
val review_time: String,
|
||||||
|
val status: String,
|
||||||
|
val type: String,
|
||||||
|
val update_time: String,
|
||||||
|
val user_id: String,
|
||||||
|
val view_count: String,
|
||||||
|
val is_broadcast: Boolean
|
||||||
|
) : Serializable
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
package com.cheng.bole.bean
|
|
||||||
|
|
||||||
data class NoticeEntity(
|
|
||||||
val loop: Boolean,
|
|
||||||
val notice: List<String>?
|
|
||||||
) {
|
|
||||||
data class NoticeItem(
|
|
||||||
val message: String,
|
|
||||||
var loop: Boolean = false
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class QualificationInfoBean(
|
||||||
|
val id: String,
|
||||||
|
val name: String,
|
||||||
|
val createTime: String,
|
||||||
|
val equitment: String,
|
||||||
|
val level: String,
|
||||||
|
val performance: String,
|
||||||
|
val person: String,
|
||||||
|
val property: String,
|
||||||
|
val range: String,
|
||||||
|
val status: String,
|
||||||
|
val updateTime: String,
|
||||||
|
val children: List<QualificationInfoBean>
|
||||||
|
) : Serializable
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class SeatItemBean(
|
||||||
|
val avatar: String,
|
||||||
|
val create_time: String,
|
||||||
|
val id: String,
|
||||||
|
val phone: String,
|
||||||
|
val update_time: String,
|
||||||
|
val user_name: String
|
||||||
|
): Serializable
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class SourceBean(
|
||||||
|
val id: String,
|
||||||
|
val name: String
|
||||||
|
): Serializable
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class SubscriptionBean(
|
||||||
|
val city_id: List<String>,
|
||||||
|
val city_name: ArrayList<String>,
|
||||||
|
val create_time: String,
|
||||||
|
val id: String,
|
||||||
|
val info_type: List<String>,
|
||||||
|
val keyword: List<String>,
|
||||||
|
val name: String,
|
||||||
|
val push_receiver: String,
|
||||||
|
val push_receiver_ks: String,
|
||||||
|
val push_type: String,
|
||||||
|
val source: List<SourceBean>,
|
||||||
|
val source_id: List<String>,
|
||||||
|
val source_name: List<String>,
|
||||||
|
val type: Int,
|
||||||
|
val update_time: String,
|
||||||
|
val user_id: String
|
||||||
|
): Serializable
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
data class SubscriptionMessageBean(
|
||||||
|
val id: String,
|
||||||
|
val title: String,
|
||||||
|
val message: String,
|
||||||
|
val type: String,
|
||||||
|
val create_time: String,
|
||||||
|
val extra: BidItemBean
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class UploadFileBean(
|
||||||
|
var id: String = "",
|
||||||
|
var url: String = ""
|
||||||
|
): Serializable
|
||||||
|
|
@ -2,7 +2,7 @@ package com.cheng.bole.bean
|
||||||
|
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
|
||||||
data class VipPermissionEntity(
|
data class UserAuthBean(
|
||||||
val auth: Boolean,
|
val auth: Boolean,
|
||||||
val auth_ad: Boolean,
|
val auth_ad: Boolean,
|
||||||
val scene: String,
|
val scene: String,
|
||||||
|
|
@ -14,10 +14,4 @@ data class VipPermissionEntity(
|
||||||
val vip_message: String,
|
val vip_message: String,
|
||||||
val vip_name: String,
|
val vip_name: String,
|
||||||
var type: Int
|
var type: Int
|
||||||
) : Serializable {
|
): Serializable
|
||||||
|
|
||||||
companion object {
|
|
||||||
const val TYPE_SHARE = 1
|
|
||||||
const val TYPE_DOWNLOAD = 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -30,7 +30,6 @@ object Constants {
|
||||||
val almmsht = Typeface.createFromAsset(Utils.getApp().assets, "fonts/Alimama ShuHeiTi.ttf")
|
val almmsht = Typeface.createFromAsset(Utils.getApp().assets, "fonts/Alimama ShuHeiTi.ttf")
|
||||||
val dDIN_PRO_M = Typeface.createFromAsset(Utils.getApp().assets, "fonts/D-DIN-PRO-500-Medium.otf")
|
val dDIN_PRO_M = Typeface.createFromAsset(Utils.getApp().assets, "fonts/D-DIN-PRO-500-Medium.otf")
|
||||||
val youSheBiaoTiHei = Typeface.createFromAsset(Utils.getApp().assets, "fonts/YouSheBiaoTiHei.ttf")
|
val youSheBiaoTiHei = Typeface.createFromAsset(Utils.getApp().assets, "fonts/YouSheBiaoTiHei.ttf")
|
||||||
|
|
||||||
val douyinsansB = Typeface.createFromAsset(Utils.getApp().assets, "fonts/DouyinSansBold.otf")
|
val douyinsansB = Typeface.createFromAsset(Utils.getApp().assets, "fonts/DouyinSansBold.otf")
|
||||||
|
val pmzdbt = Typeface.createFromAsset(Utils.getApp().assets, "fonts/PangMenZhengDaoBiaoTiTi.ttf")
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,21 @@
|
||||||
package com.cheng.bole.net
|
package com.cheng.bole.net
|
||||||
|
|
||||||
|
import com.cheng.bole.bean.BidDetailBean
|
||||||
|
import com.cheng.bole.bean.BidItemBean
|
||||||
|
import com.cheng.bole.bean.BidTypeBean
|
||||||
|
import com.cheng.bole.bean.CityBean
|
||||||
|
import com.cheng.bole.bean.CompanyBean
|
||||||
|
import com.cheng.bole.bean.CorpInfoBean
|
||||||
|
import com.cheng.bole.bean.GuideTotalBidInfoBean
|
||||||
|
import com.cheng.bole.bean.GuideUpdateInfoBean
|
||||||
|
import com.cheng.bole.bean.HotWordBean
|
||||||
|
import com.cheng.bole.bean.MerchantGoodsBean
|
||||||
|
import com.cheng.bole.bean.QualificationInfoBean
|
||||||
|
import com.cheng.bole.bean.SeatItemBean
|
||||||
|
import com.cheng.bole.bean.SourceBean
|
||||||
|
import com.cheng.bole.bean.SubscriptionBean
|
||||||
|
import com.cheng.bole.bean.SubscriptionMessageBean
|
||||||
|
import com.cheng.bole.bean.UserAuthBean
|
||||||
import com.cheng.bole.net.model.HttpBaseResult
|
import com.cheng.bole.net.model.HttpBaseResult
|
||||||
import com.cheng.bole.net.model.HttpListResult
|
import com.cheng.bole.net.model.HttpListResult
|
||||||
import com.ylqh.cube.bean.CouponActivityEntity
|
import com.ylqh.cube.bean.CouponActivityEntity
|
||||||
|
|
@ -12,10 +28,16 @@ import retrofit2.http.Multipart
|
||||||
import retrofit2.http.POST
|
import retrofit2.http.POST
|
||||||
import retrofit2.http.PUT
|
import retrofit2.http.PUT
|
||||||
import retrofit2.http.Part
|
import retrofit2.http.Part
|
||||||
|
import retrofit2.http.Path
|
||||||
import retrofit2.http.Query
|
import retrofit2.http.Query
|
||||||
import retrofit2.http.QueryMap
|
import retrofit2.http.QueryMap
|
||||||
|
|
||||||
interface ApiService {
|
interface ApiService {
|
||||||
|
/**
|
||||||
|
* 获取服务器时间
|
||||||
|
*/
|
||||||
|
@GET("/api/time")
|
||||||
|
suspend fun getServerTime(): HttpBaseResult<String>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取客户端配置
|
* 获取客户端配置
|
||||||
|
|
@ -108,12 +130,6 @@ interface ApiService {
|
||||||
@POST("/api/user/feedback")
|
@POST("/api/user/feedback")
|
||||||
suspend fun feedback(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
suspend fun feedback(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户公告
|
|
||||||
*/
|
|
||||||
@GET("/api/user/notice")
|
|
||||||
suspend fun notice(): HttpBaseResult<com.cheng.bole.bean.NoticeEntity>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取VIP套餐列表
|
* 获取VIP套餐列表
|
||||||
*/
|
*/
|
||||||
|
|
@ -148,11 +164,279 @@ interface ApiService {
|
||||||
* 权限验证
|
* 权限验证
|
||||||
*/
|
*/
|
||||||
@GET("/api/user/auth")
|
@GET("/api/user/auth")
|
||||||
suspend fun checkPermission(@Query("scene") info: String?): HttpBaseResult<com.cheng.bole.bean.VipPermissionEntity>
|
suspend fun checkAuth(@Query("scene") scene: String? = "info"): HttpBaseResult<UserAuthBean>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限上报
|
* 权限上报
|
||||||
*/
|
*/
|
||||||
@POST("/api/user/auth")
|
@POST("/api/user/auth")
|
||||||
suspend fun sendCheckPermission(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
suspend fun sendAuth(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 引导页推荐热词树
|
||||||
|
*/
|
||||||
|
@GET("/api/hot_word")
|
||||||
|
suspend fun getHotWordList(): HttpBaseResult<List<HotWordBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 城市列表
|
||||||
|
*/
|
||||||
|
@GET("/api/city")
|
||||||
|
suspend fun getCityList(): HttpBaseResult<List<CityBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前城市
|
||||||
|
*/
|
||||||
|
@GET("/api/city/default")
|
||||||
|
suspend fun getUserCity(): HttpBaseResult<CityBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总计商机
|
||||||
|
*/
|
||||||
|
@GET("/api/search/preview")
|
||||||
|
suspend fun getTotalBidInfo(
|
||||||
|
@Query("keyword") keywords: String,
|
||||||
|
@Query("city_id") cityIds: String,
|
||||||
|
@Query("second_kind_num") kindCount: String
|
||||||
|
): HttpBaseResult<GuideTotalBidInfoBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每日更新
|
||||||
|
*/
|
||||||
|
@GET("/api/info/update/num")
|
||||||
|
suspend fun getUpdateNum(@Query("size") size: String): HttpBaseResult<List<GuideUpdateInfoBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员页轮播提示
|
||||||
|
*/
|
||||||
|
@GET("/api/pay/tips")
|
||||||
|
suspend fun getPayUserTips(): HttpBaseResult<List<String>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订阅列表
|
||||||
|
*/
|
||||||
|
@GET("/api/recommend/subscription")
|
||||||
|
suspend fun getSubscriptionList(): HttpBaseResult<HttpListResult<SubscriptionBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订阅推荐列表
|
||||||
|
*/
|
||||||
|
@GET("/api/recommend")
|
||||||
|
suspend fun getRecommendList(@QueryMap map: Map<String, String>): HttpBaseResult<HttpListResult<BidItemBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加订阅
|
||||||
|
*/
|
||||||
|
@POST("/api/recommend/subscription")
|
||||||
|
suspend fun addSubscription(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订阅
|
||||||
|
*/
|
||||||
|
@PUT("/api/recommend/subscription")
|
||||||
|
suspend fun updateSubscription(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订阅
|
||||||
|
*/
|
||||||
|
@DELETE("/api/recommend/subscription")
|
||||||
|
suspend fun deleteSubscription(@Query("id") id: String): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 招标公告类型
|
||||||
|
*/
|
||||||
|
@GET("api/info/type")
|
||||||
|
suspend fun getBidTypeList(): HttpBaseResult<List<BidTypeBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标讯详情
|
||||||
|
*
|
||||||
|
* source:search 搜索 | recommend 首页 | push 推送| favorite 关注列表| history 历史记录
|
||||||
|
*/
|
||||||
|
@GET("/api/info/json")
|
||||||
|
suspend fun getBidDetail(
|
||||||
|
@Query("id") id: String,
|
||||||
|
@Query("source") source: String,
|
||||||
|
@Query("info_source") infoSource: String
|
||||||
|
): HttpBaseResult<BidDetailBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收藏列表
|
||||||
|
*/
|
||||||
|
@GET("/api/info/favorite/search")
|
||||||
|
suspend fun getFavoriteList(): HttpBaseResult<HttpListResult<BidItemBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收藏标讯
|
||||||
|
*/
|
||||||
|
@POST("/api/info/favorite")
|
||||||
|
suspend fun favorite(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消收藏标讯
|
||||||
|
*/
|
||||||
|
@DELETE("/api/info/favorite")
|
||||||
|
suspend fun favoriteCancel(@Query("infoId") id: String): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 热词推荐
|
||||||
|
*/
|
||||||
|
@GET("/api/search/words")
|
||||||
|
suspend fun getHotKeywords(@QueryMap map: Map<String, String>): HttpBaseResult<List<String>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 热门数据源
|
||||||
|
*/
|
||||||
|
@GET("/api/source/hot")
|
||||||
|
suspend fun getHotSources(): HttpBaseResult<HttpListResult<SourceBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索数据源
|
||||||
|
*/
|
||||||
|
@GET("/api/source/search")
|
||||||
|
suspend fun searchSource(@Query("keyword") keyword: String, @Query("size") size: String = "10"): HttpBaseResult<HttpListResult<SourceBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索页最新标讯和本地标讯
|
||||||
|
*/
|
||||||
|
@GET("/api/info/ks/search")
|
||||||
|
suspend fun getNewestLocalBidList(@QueryMap map: Map<String, String>): HttpBaseResult<HttpListResult<BidItemBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目搜索
|
||||||
|
*/
|
||||||
|
@GET("/api/search")
|
||||||
|
suspend fun search(@QueryMap map: Map<String, String>): HttpBaseResult<HttpListResult<BidItemBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商搜索
|
||||||
|
*/
|
||||||
|
@GET("/api/user/goods/search")
|
||||||
|
suspend fun searchSupplier(@QueryMap map: Map<String, String>): HttpBaseResult<HttpListResult<MerchantGoodsBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浏览历史
|
||||||
|
*/
|
||||||
|
@GET("/api/info/history")
|
||||||
|
suspend fun getViewHistoryList(): HttpBaseResult<HttpListResult<BidDetailBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加代办
|
||||||
|
*/
|
||||||
|
@POST("/api/agency/clew")
|
||||||
|
suspend fun addAgency(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资质代办列表
|
||||||
|
*/
|
||||||
|
@GET("/api/agency/cert")
|
||||||
|
suspend fun getAgencyList(@QueryMap map: Map<String, String>): HttpBaseResult<HttpListResult<QualificationInfoBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的标讯列表
|
||||||
|
*/
|
||||||
|
@GET("/api/user/info")
|
||||||
|
suspend fun getMyBidList(@QueryMap map: Map<String, String>): HttpBaseResult<HttpListResult<BidDetailBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标讯
|
||||||
|
*/
|
||||||
|
@GET("/api/user/info/{id}")
|
||||||
|
suspend fun getBidInfo(@Path("id") id: String): HttpBaseResult<BidItemBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加标讯
|
||||||
|
*/
|
||||||
|
@POST("/api/user/info")
|
||||||
|
suspend fun addBidInfo(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标讯
|
||||||
|
*/
|
||||||
|
@PUT("/api/user/info")
|
||||||
|
suspend fun updateBidInfo(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标讯
|
||||||
|
*/
|
||||||
|
@DELETE("/api/user/info/{id}")
|
||||||
|
suspend fun deleteBidInfo(@Path("id") id: String): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的商品列表
|
||||||
|
*/
|
||||||
|
@GET("/api/user/goods")
|
||||||
|
suspend fun getMyGoodsList(@QueryMap map: Map<String, String>): HttpBaseResult<HttpListResult<MerchantGoodsBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品
|
||||||
|
*/
|
||||||
|
@GET("/api/user/goods/{id}")
|
||||||
|
suspend fun getGoodsInfo(@Path("id") id: String): HttpBaseResult<MerchantGoodsBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加商品
|
||||||
|
*/
|
||||||
|
@POST("/api/user/goods")
|
||||||
|
suspend fun addGoodsInfo(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品
|
||||||
|
*/
|
||||||
|
@PUT("/api/user/goods")
|
||||||
|
suspend fun updateGoodsInfo(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品
|
||||||
|
*/
|
||||||
|
@DELETE("/api/user/goods/{id}")
|
||||||
|
suspend fun deleteGoodsInfo(@Path("id") id: String): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户公司信息
|
||||||
|
*/
|
||||||
|
@GET("/api/user/company")
|
||||||
|
suspend fun getCompanyInfo(): HttpBaseResult<CompanyBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交用户公司信息
|
||||||
|
*/
|
||||||
|
@POST("/api/user/company")
|
||||||
|
suspend fun addCompanyInfo(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户公司信息
|
||||||
|
*/
|
||||||
|
@PUT("/api/user/company")
|
||||||
|
suspend fun updateCompanyInfo(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 席位信息
|
||||||
|
*/
|
||||||
|
@GET("/api/corp")
|
||||||
|
suspend fun getSeatInfo(): HttpBaseResult<CorpInfoBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 席位列表
|
||||||
|
*/
|
||||||
|
@GET("/api/corp/user")
|
||||||
|
suspend fun getSeatList(@Query("page") page: String = "1", @Query("size") size: String = "100"): HttpBaseResult<HttpListResult<SeatItemBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加席位
|
||||||
|
*/
|
||||||
|
@POST("/api/corp/user")
|
||||||
|
suspend fun addSeat(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除席位
|
||||||
|
*/
|
||||||
|
@DELETE("/api/corp/user")
|
||||||
|
suspend fun deleteSeat(@Query("id") id: String): HttpBaseResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订阅消息列表
|
||||||
|
*/
|
||||||
|
@GET("/api/message/ks")
|
||||||
|
suspend fun getSubscriptionMessage(@QueryMap map: Map<String, String>): HttpBaseResult<HttpListResult<SubscriptionMessageBean>>
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.cheng.bole.ui.fragment.home
|
||||||
|
|
||||||
|
import android.text.Html
|
||||||
|
import android.text.TextUtils
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.cheng.bole.R
|
||||||
|
import com.cheng.bole.bean.BidItemBean
|
||||||
|
import com.cheng.bole.widget.CommonShapeView
|
||||||
|
import com.example.base.ui.list.LoadMoreAdapter
|
||||||
|
import java.text.DecimalFormat
|
||||||
|
|
||||||
|
class BidAdapter(private val showTipsTime: Boolean = false) : LoadMoreAdapter<BidItemBean>(R.layout.listitem_bid) {
|
||||||
|
|
||||||
|
override fun convert(holder: BaseViewHolder, item: BidItemBean) {
|
||||||
|
val tvTag = holder.getView<CommonShapeView>(R.id.tv_tag)
|
||||||
|
tvTag.setBgColor(item.getTypeColor())
|
||||||
|
|
||||||
|
holder.setText(R.id.tv_title, Html.fromHtml(item.title, Html.FROM_HTML_MODE_LEGACY))
|
||||||
|
holder.setText(R.id.tv_content, Html.fromHtml(item.content, Html.FROM_HTML_MODE_LEGACY))
|
||||||
|
holder.setText(R.id.tv_location, if (TextUtils.isEmpty(item.regionName)) "全国" else item.regionName)
|
||||||
|
holder.setText(R.id.tv_amount, item.money)
|
||||||
|
holder.setText(R.id.tv_time, item.tipsTime)
|
||||||
|
holder.setText(R.id.tv_rate, DecimalFormat("0.0").format(item.star.toFloat()))
|
||||||
|
|
||||||
|
holder.setGone(R.id.tv_amount, TextUtils.isEmpty(item.money))
|
||||||
|
holder.setGone(R.id.tv_time, !showTipsTime || TextUtils.isEmpty(item.tipsTime))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,12 +1,82 @@
|
||||||
package com.cheng.bole.ui.fragment.home
|
package com.cheng.bole.ui.fragment.home
|
||||||
|
|
||||||
|
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
import androidx.recyclerview.widget.RecyclerView.HORIZONTAL
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.cheng.bole.bean.BidItemBean
|
||||||
|
import com.cheng.bole.bean.MenuEntity
|
||||||
|
import com.cheng.bole.common.Constants
|
||||||
import com.cheng.bole.databinding.FragmentHomeBinding
|
import com.cheng.bole.databinding.FragmentHomeBinding
|
||||||
|
import com.efs.sdk.memleaksdk.monitor.internal.bi
|
||||||
|
import com.example.base.decoration.GridSpaceItemDecoration
|
||||||
|
import com.example.base.decoration.SpacesItemDecoration
|
||||||
|
import com.example.base.extensions.onClick
|
||||||
import com.example.base.ui.BaseFragment
|
import com.example.base.ui.BaseFragment
|
||||||
|
import com.example.base.ui.list.ListFragment
|
||||||
|
import com.example.base.utils.DensityUtils
|
||||||
|
import com.example.base.utils.L
|
||||||
|
import kotlin.math.abs
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页
|
* 首页
|
||||||
*/
|
*/
|
||||||
class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>() {
|
class HomeFragment : ListFragment<FragmentHomeBinding, HomeViewModel, BidItemBean>() {
|
||||||
|
private val menuAdapter by lazy { HomeMenuAdapter() }
|
||||||
|
|
||||||
|
private val keywordAdapter by lazy { HomeKeywordAdapter() }
|
||||||
|
|
||||||
|
override fun noDataClick() {}
|
||||||
|
|
||||||
|
override fun bindAdapter() = BidAdapter()
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
super.initView()
|
||||||
|
binding.tvTitle.typeface = Constants.pmzdbt
|
||||||
|
binding.tvHotTitle.typeface = Constants.pmzdbt
|
||||||
|
binding.tvBidTitleNew.typeface = Constants.pmzdbt
|
||||||
|
binding.tvBidTitle.typeface = Constants.pmzdbt
|
||||||
|
|
||||||
|
binding.rvMenu.adapter = menuAdapter
|
||||||
|
binding.rvMenu.addItemDecoration(GridSpaceItemDecoration(4, DensityUtils.dp2px(16f), 0))
|
||||||
|
menuAdapter.setList(MenuEntity.getHomeMenu())
|
||||||
|
|
||||||
|
binding.rvHotKeyword.adapter = keywordAdapter
|
||||||
|
binding.rvHotKeyword.addItemDecoration(SpacesItemDecoration(DensityUtils.dp2px(8f), HORIZONTAL))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
super.initData()
|
||||||
|
mViewModel.getHotKeywordList("")
|
||||||
|
firstLoad()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initListener() {
|
||||||
|
super.initListener()
|
||||||
|
binding.appBarLayout.addOnOffsetChangedListener { _, verticalOffset ->
|
||||||
|
val lp = binding.layoutContent.layoutParams as CoordinatorLayout.LayoutParams
|
||||||
|
if (abs(verticalOffset) >= binding.appBarLayout.height - DensityUtils.dp2px(45f)) {
|
||||||
|
lp.topMargin = (-DensityUtils.dp2px(25f) * (1f - abs(verticalOffset).toFloat() / (binding.appBarLayout.height - DensityUtils.dp2px(20f)))).toInt()
|
||||||
|
} else {
|
||||||
|
lp.topMargin = -DensityUtils.dp2px(65f)
|
||||||
|
}
|
||||||
|
binding.layoutContent.layoutParams = lp
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.ivRefresh.onClick {
|
||||||
|
if (keywordAdapter.data.isNotEmpty()) {
|
||||||
|
mViewModel.getHotKeywordList(keywordAdapter.data.last())
|
||||||
|
} else {
|
||||||
|
mViewModel.getHotKeywordList("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initObserve() {
|
||||||
|
super.initObserve()
|
||||||
|
mViewModel.recommendLiveData.observe(this) {
|
||||||
|
keywordAdapter.setList(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.cheng.bole.ui.fragment.home
|
||||||
|
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.cheng.bole.R
|
||||||
|
|
||||||
|
class HomeKeywordAdapter: BaseQuickAdapter<String, BaseViewHolder>(R.layout.listitem_home_hot_keyword) {
|
||||||
|
override fun convert(holder: BaseViewHolder, item: String) {
|
||||||
|
holder.setText(R.id.tv_name, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.cheng.bole.ui.fragment.home
|
||||||
|
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.cheng.bole.R
|
||||||
|
import com.cheng.bole.bean.MenuEntity
|
||||||
|
|
||||||
|
class HomeMenuAdapter: BaseQuickAdapter<MenuEntity, BaseViewHolder>(R.layout.listitem_home_menu) {
|
||||||
|
override fun convert(holder: BaseViewHolder, item: MenuEntity) {
|
||||||
|
holder.setImageResource(R.id.iv_icon, item.resId)
|
||||||
|
holder.setText(R.id.tv_title, item.title)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,48 @@
|
||||||
package com.cheng.bole.ui.fragment.home
|
package com.cheng.bole.ui.fragment.home
|
||||||
|
|
||||||
import com.example.base.viewmodel.BaseViewModel
|
import androidx.collection.ArrayMap
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import com.cheng.bole.bean.BidItemBean
|
||||||
|
import com.cheng.bole.bean.UserAuthBean
|
||||||
|
import com.cheng.bole.net.ApiFactory
|
||||||
|
import com.cheng.bole.net.model.toListResult
|
||||||
|
import com.example.base.extensions.toast
|
||||||
|
import com.example.base.utils.L
|
||||||
|
import com.example.base.viewmodel.ListViewModel
|
||||||
|
|
||||||
class HomeViewModel : BaseViewModel() {
|
class HomeViewModel : ListViewModel<BidItemBean>() {
|
||||||
|
override suspend fun requestApi(params: ArrayMap<String, String>): Result<List<BidItemBean>> {
|
||||||
|
return ApiFactory.apiService.getRecommendList(params).toListResult()
|
||||||
|
}
|
||||||
|
|
||||||
|
val authLiveData = MutableLiveData<UserAuthBean>()
|
||||||
|
val recommendLiveData = MutableLiveData<List<String>>()
|
||||||
|
|
||||||
|
fun getHotKeywordList(query: String) {
|
||||||
|
launchOnUiTryCatch({
|
||||||
|
val params = mutableMapOf<String, String>()
|
||||||
|
params["query"] = query
|
||||||
|
params["size"] = "4"
|
||||||
|
val response = ApiFactory.apiService.getHotKeywords(params)
|
||||||
|
if (response.status) {
|
||||||
|
recommendLiveData.postValue(response.data)
|
||||||
|
} else toast(response.message, true)
|
||||||
|
}, {
|
||||||
|
setError(it)
|
||||||
|
L.d(it)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fun checkAuth() {
|
||||||
|
launchOnUiTryCatch({
|
||||||
|
val response = ApiFactory.apiService.checkAuth()
|
||||||
|
if (response.status) {
|
||||||
|
authLiveData.postValue(response.data)
|
||||||
|
} else toast(response.message, true)
|
||||||
|
}, {
|
||||||
|
setError(it)
|
||||||
|
L.d(it)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -18,9 +18,11 @@ import com.cheng.bole.ui.activity.PublicActivity
|
||||||
import com.cheng.bole.ui.base.BasePageAdapter
|
import com.cheng.bole.ui.base.BasePageAdapter
|
||||||
import com.cheng.bole.ui.dialog.VipLoginTipDialog
|
import com.cheng.bole.ui.dialog.VipLoginTipDialog
|
||||||
import com.cheng.bole.ui.fragment.home.HomeFragment
|
import com.cheng.bole.ui.fragment.home.HomeFragment
|
||||||
|
import com.cheng.bole.ui.fragment.merchant.MerchantFragment
|
||||||
import com.cheng.bole.ui.fragment.mine.MineFragment
|
import com.cheng.bole.ui.fragment.mine.MineFragment
|
||||||
import com.cheng.bole.ui.fragment.mine.coupon.CouponFragment
|
import com.cheng.bole.ui.fragment.mine.coupon.CouponFragment
|
||||||
import com.cheng.bole.ui.fragment.mine.vip.VipFragment
|
import com.cheng.bole.ui.fragment.mine.vip.VipFragment
|
||||||
|
import com.cheng.bole.ui.fragment.push.PushFragment
|
||||||
import com.example.base.common.RxBus
|
import com.example.base.common.RxBus
|
||||||
import com.example.base.extensions.toast
|
import com.example.base.extensions.toast
|
||||||
import com.example.base.ui.BaseFragment
|
import com.example.base.ui.BaseFragment
|
||||||
|
|
@ -30,7 +32,7 @@ import com.huantansheng.easyphotos.EasyPhotos
|
||||||
|
|
||||||
|
|
||||||
class MainFragment : BaseFragment<FragmentMainBinding, MainViewModel>() {
|
class MainFragment : BaseFragment<FragmentMainBinding, MainViewModel>() {
|
||||||
private val tabText = listOf("首页", "我的")
|
private val tabText = listOf("首页", "推送", "合作商", "我的")
|
||||||
private val fragmentList by lazy { mutableListOf<Fragment>() }
|
private val fragmentList by lazy { mutableListOf<Fragment>() }
|
||||||
private val pageAdapter by lazy { BasePageAdapter(childFragmentManager, tabText, fragmentList, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) }
|
private val pageAdapter by lazy { BasePageAdapter(childFragmentManager, tabText, fragmentList, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) }
|
||||||
|
|
||||||
|
|
@ -53,6 +55,8 @@ class MainFragment : BaseFragment<FragmentMainBinding, MainViewModel>() {
|
||||||
|
|
||||||
private fun initFragment() {
|
private fun initFragment() {
|
||||||
fragmentList.add(HomeFragment())
|
fragmentList.add(HomeFragment())
|
||||||
|
fragmentList.add(PushFragment())
|
||||||
|
fragmentList.add(MerchantFragment())
|
||||||
fragmentList.add(MineFragment())
|
fragmentList.add(MineFragment())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -61,7 +65,9 @@ class MainFragment : BaseFragment<FragmentMainBinding, MainViewModel>() {
|
||||||
binding.rgNavigation.setOnCheckedChangeListener { _, checkedId ->
|
binding.rgNavigation.setOnCheckedChangeListener { _, checkedId ->
|
||||||
when (checkedId) {
|
when (checkedId) {
|
||||||
R.id.rb_home -> currentPosition = 0
|
R.id.rb_home -> currentPosition = 0
|
||||||
R.id.rb_mine -> currentPosition = 1
|
R.id.rb_push -> currentPosition = 1
|
||||||
|
R.id.rb_merchant -> currentPosition = 2
|
||||||
|
R.id.rb_mine -> currentPosition = 3
|
||||||
}
|
}
|
||||||
binding.viewPager.setCurrentItem(currentPosition, false)
|
binding.viewPager.setCurrentItem(currentPosition, false)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.cheng.bole.ui.fragment.merchant
|
||||||
|
|
||||||
|
import com.cheng.bole.databinding.FragmentMerchantBinding
|
||||||
|
import com.example.base.ui.BaseFragment
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合作商
|
||||||
|
*/
|
||||||
|
class MerchantFragment : BaseFragment<FragmentMerchantBinding, MerchantViewModel>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.cheng.bole.ui.fragment.merchant
|
||||||
|
|
||||||
|
import com.example.base.viewmodel.BaseViewModel
|
||||||
|
|
||||||
|
class MerchantViewModel : BaseViewModel() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.cheng.bole.ui.fragment.push
|
||||||
|
|
||||||
|
import com.cheng.bole.databinding.FragmentPushBinding
|
||||||
|
import com.example.base.ui.BaseFragment
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送
|
||||||
|
*/
|
||||||
|
class PushFragment : BaseFragment<FragmentPushBinding, PushViewModel>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.cheng.bole.ui.fragment.push
|
||||||
|
|
||||||
|
import com.example.base.viewmodel.BaseViewModel
|
||||||
|
|
||||||
|
class PushViewModel : BaseViewModel() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -355,7 +355,7 @@ class CommonShapeView @JvmOverloads constructor(
|
||||||
|
|
||||||
fun setBgColor(color: Int) {
|
fun setBgColor(color: Int) {
|
||||||
mFillColor = color
|
mFillColor = color
|
||||||
postInvalidate()
|
requestLayout()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="@color/color_125ffe" android:state_checked="true"/>
|
<item android:color="@color/color_125ffe" android:state_checked="true"/>
|
||||||
<item android:color="@color/color_676e87" android:state_checked="false"/>
|
<item android:color="@color/color_d5dae5" android:state_checked="false"/>
|
||||||
</selector>
|
</selector>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@mipmap/ic_merchant_select" android:state_checked="true"/>
|
||||||
|
<item android:drawable="@mipmap/ic_merchant_default"/>
|
||||||
|
</selector>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@mipmap/ic_push_select" android:state_checked="true"/>
|
||||||
|
<item android:drawable="@mipmap/ic_push_default"/>
|
||||||
|
</selector>
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/color_ff2222" />
|
||||||
|
<corners
|
||||||
|
android:bottomLeftRadius="@dimen/dp_2"
|
||||||
|
android:bottomRightRadius="@dimen/dp_12"
|
||||||
|
android:topLeftRadius="@dimen/dp_12"
|
||||||
|
android:topRightRadius="@dimen/dp_2" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@color/white" />
|
||||||
|
<corners android:radius="@dimen/dp_10" />
|
||||||
|
</shape>
|
||||||
|
|
@ -1,6 +1,202 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/appBarLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/transparent"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_top_bg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:src="@mipmap/ic_home_top_bg"
|
||||||
|
app:layout_constraintDimensionRatio="h,1125:786"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="?actionBarSize"
|
||||||
|
android:text="发现更多商机"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_26"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_search"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_44"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_14"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
android:background="@drawable/shape_white_cor10"
|
||||||
|
android:drawableStart="@mipmap/ic_search"
|
||||||
|
android:drawablePadding="@dimen/dp_8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingStart="@dimen/dp_12"
|
||||||
|
android:text="请搜索关键词"
|
||||||
|
android:textColor="@color/color_bcbcbc"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_hot_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_14"
|
||||||
|
android:text="热搜"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_search" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="@dimen/dp_2"
|
||||||
|
android:layout_height="@dimen/dp_18"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:background="@color/white"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_hot_title"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_hot_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_hot_title" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_hot_keyword"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_18"
|
||||||
|
android:layout_marginEnd="@dimen/dp_10"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_hot_title"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/iv_refresh"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_hot_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_hot_title"
|
||||||
|
tools:itemCount="4"
|
||||||
|
tools:listitem="@layout/listitem_home_hot_keyword" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_refresh"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
android:padding="@dimen/dp_4"
|
||||||
|
android:src="@mipmap/ic_refresh"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_hot_title"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_hot_title" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_menu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:background="@drawable/shape_white_top_cor20"
|
||||||
|
android:paddingTop="@dimen/dp_17"
|
||||||
|
android:paddingBottom="@dimen/dp_40"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_hot_title"
|
||||||
|
app:spanCount="4"
|
||||||
|
tools:listitem="@layout/listitem_home_menu" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="-65dp"
|
||||||
|
android:paddingTop="@dimen/dp_45"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_title_bg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:src="@mipmap/ic_home_title_bg"
|
||||||
|
app:layout_constraintDimensionRatio="h,1125:354"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_bid_title_new"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:text="最新"
|
||||||
|
android:textColor="@color/color_222222"
|
||||||
|
android:textSize="@dimen/sp_20"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_bid_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/shape_home_bid_title_new_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="@dimen/dp_4"
|
||||||
|
android:paddingTop="@dimen/dp_1"
|
||||||
|
android:paddingEnd="@dimen/dp_4"
|
||||||
|
android:paddingBottom="@dimen/dp_1"
|
||||||
|
android:text="标讯"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_18"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_bid_title_new"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_bid_title_new"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_bid_title_new" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_update_count"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_14"
|
||||||
|
android:text="已更新2.4万条"
|
||||||
|
android:textColor="@color/color_666666"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_bid_title"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_bid_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_bid_title" />
|
||||||
|
|
||||||
|
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||||
|
android:id="@+id/mRefreshLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_bid_title">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/mRecyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:listitem="@layout/listitem_bid" />
|
||||||
|
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -41,6 +41,39 @@
|
||||||
android:textColor="@drawable/selector_main_navigation_color"
|
android:textColor="@drawable/selector_main_navigation_color"
|
||||||
android:textSize="@dimen/sp_10" />
|
android:textSize="@dimen/sp_10" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_push"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@null"
|
||||||
|
android:button="@null"
|
||||||
|
android:drawableTop="@drawable/selector_push_navigation_icon"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="推送"
|
||||||
|
android:textColor="@drawable/selector_main_navigation_color"
|
||||||
|
android:textSize="@dimen/sp_10" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_publish"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:src="@mipmap/ic_publish" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_merchant"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@null"
|
||||||
|
android:button="@null"
|
||||||
|
android:drawableTop="@drawable/selector_merchant_navigation_icon"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="合作商"
|
||||||
|
android:textColor="@drawable/selector_main_navigation_color"
|
||||||
|
android:textSize="@dimen/sp_10" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/rb_mine"
|
android:id="@+id/rb_mine"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,140 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<com.lihang.ShadowLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
app:hl_cornerRadius="@dimen/dp_8"
|
||||||
|
app:hl_shadowColor="#0f000000"
|
||||||
|
app:hl_shadowLimit="@dimen/dp_7">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="@dimen/dp_14"
|
||||||
|
android:paddingBottom="@dimen/dp_16">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:lineHeight="@dimen/dp_20"
|
||||||
|
android:lineSpacingExtra="@dimen/dp_5"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:text="中国融通医疗健康集团有限公司气囊式体"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="中国融通电子商务平台"
|
||||||
|
android:textColor="@color/color_666666"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_info"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/tv_rate"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_content">
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/tv_tag"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_18"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:paddingStart="@dimen/dp_4"
|
||||||
|
android:paddingEnd="@dimen/dp_4"
|
||||||
|
android:text="招标"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_11"
|
||||||
|
app:csb_cornerRadius="@dimen/dp_3"
|
||||||
|
app:csb_fillColor="#2B88F9"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_title" />
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/tv_location"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_18"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:paddingStart="@dimen/dp_4"
|
||||||
|
android:paddingEnd="@dimen/dp_4"
|
||||||
|
android:text="全国"
|
||||||
|
android:textColor="#585D6C"
|
||||||
|
android:textSize="@dimen/sp_11"
|
||||||
|
app:csb_cornerRadius="@dimen/dp_3"
|
||||||
|
app:csb_fillColor="#F4F6FA"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_content" />
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/tv_amount"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_18"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:paddingStart="@dimen/dp_4"
|
||||||
|
android:paddingEnd="@dimen/dp_4"
|
||||||
|
android:text="2.71万元"
|
||||||
|
android:textColor="@color/color_ff493c"
|
||||||
|
android:textSize="@dimen/sp_11"
|
||||||
|
app:csb_cornerRadius="@dimen/dp_3"
|
||||||
|
app:csb_fillColor="#1aff493c"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_location"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_location" />
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/tv_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_18"
|
||||||
|
android:paddingStart="@dimen/dp_4"
|
||||||
|
android:paddingEnd="@dimen/dp_4"
|
||||||
|
android:text="20分钟前"
|
||||||
|
android:textColor="#22C29C"
|
||||||
|
android:textSize="@dimen/sp_11"
|
||||||
|
app:csb_cornerRadius="@dimen/dp_3"
|
||||||
|
app:csb_fillColor="#E8F8F5"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_amount"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_amount" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/tv_rate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:drawableEnd="@mipmap/ic_rate_star"
|
||||||
|
android:drawablePadding="@dimen/dp_2"
|
||||||
|
android:paddingStart="@dimen/dp_5"
|
||||||
|
android:paddingEnd="@dimen/dp_5"
|
||||||
|
android:text="4.8"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_11"
|
||||||
|
app:csb_cornerPosition="bottomLeft|topLeft"
|
||||||
|
app:csb_cornerRadius="@dimen/dp_4"
|
||||||
|
app:csb_fillColor="@color/color_ffb92d"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/layout_info" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</com.lihang.ShadowLayout>
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="国土局"
|
||||||
|
android:textColor="#E6F1FF"
|
||||||
|
android:textSize="@dimen/sp_13"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_icon"
|
||||||
|
android:layout_width="@dimen/dp_30"
|
||||||
|
android:layout_height="@dimen/dp_30"
|
||||||
|
android:src="@mipmap/ic_home_icon1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
|
android:textColor="@color/color_222222"
|
||||||
|
android:text="代理记账"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/iv_icon" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 906 B |
|
After Width: | Height: | Size: 265 KiB |
|
After Width: | Height: | Size: 703 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 621 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
|
@ -72,4 +72,8 @@
|
||||||
<color name="color_f94747">#F94747</color>
|
<color name="color_f94747">#F94747</color>
|
||||||
<color name="color_896451">#896451</color>
|
<color name="color_896451">#896451</color>
|
||||||
<color name="color_54220b">#54220B</color>
|
<color name="color_54220b">#54220B</color>
|
||||||
|
<color name="color_d5dae5">#D5DAE5</color>
|
||||||
|
<color name="color_ff2222">#FF2222</color>
|
||||||
|
<color name="color_ff493c">#FF493C</color>
|
||||||
|
<color name="color_ffb92d">#FFB92D</color>
|
||||||
</resources>
|
</resources>
|
||||||