添加我的页面相关二级页面
|
|
@ -1,7 +1,5 @@
|
|||
package com.cheng.bole.bean
|
||||
|
||||
import android.graphics.Color
|
||||
|
||||
data class BidItemBean(
|
||||
val id: String,
|
||||
val recommend_id: String, //订阅消息
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.cheng.bole.bean
|
||||
|
||||
import android.R
|
||||
import java.io.Serializable
|
||||
|
||||
class ContactsInfoBean(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
package com.cheng.bole.bean
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class OrderBean(
|
||||
val create_time: String,
|
||||
val goods_name: String,
|
||||
val id: String,
|
||||
val invoice_major: Boolean,
|
||||
val invoice_status: String,
|
||||
val out_trade_no: String,
|
||||
val pay_params: String,
|
||||
val pay_time: String,
|
||||
val pay_type: String,
|
||||
val status: String,
|
||||
val total_fee: String
|
||||
):Serializable {
|
||||
data class TransInfo(
|
||||
val accountName: String,
|
||||
val accountNo: String,
|
||||
val appId: String,
|
||||
val bankName: String,
|
||||
val bankNo: String,
|
||||
val orderId: String,
|
||||
val outTradeNo: String,
|
||||
val unifyOrderId: String
|
||||
)
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
package com.cheng.bole.bean
|
||||
|
||||
class VipGoodsEntity {
|
||||
import java.io.Serializable
|
||||
|
||||
class VipGoodsEntity: Serializable {
|
||||
var checked: Boolean = false
|
||||
var goods_id: String = ""
|
||||
var goods_name: String = ""
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@ object EventConstants {
|
|||
|
||||
const val JUMP_TO_MESSAGE = "client.jump.to.message" //跳转到消息页
|
||||
|
||||
const val JUMP_TO_AUTH = "client.jump.to.auth" //跳转到企业认证
|
||||
|
||||
const val JUMP_TO_SEAT_MANAGE = "client.jump.to.seat.manage" //跳转到席位管理
|
||||
|
||||
const val JUMP_TO_FEEDBACK = "client.jump.to.feedback" //跳转到意见反馈
|
||||
|
||||
const val JUMP_TO_SERVICE = "client.jump.to.service" //跳转到联系客服
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
package com.cheng.bole.event
|
||||
|
||||
class CompanyAuthEvent {
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package com.cheng.bole.event
|
||||
|
||||
class OrderEvent {
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package com.cheng.bole.manager
|
||||
|
||||
import android.R
|
||||
import android.text.TextUtils
|
||||
import com.cheng.bole.bean.ContactsInfoBean
|
||||
import com.example.base.utils.MMKVUtils
|
||||
|
|
@ -15,6 +14,17 @@ object ContactsManager {
|
|||
MMKVUtils.put("contacts_list", Gson().toJson(list))
|
||||
}
|
||||
|
||||
fun update(contacts: ContactsInfoBean) {
|
||||
val list = all()
|
||||
val oldContacts = list.find { it.id == contacts.id }
|
||||
if (oldContacts != null) {
|
||||
val index = list.indexOf(oldContacts)
|
||||
list.removeAt(index)
|
||||
list.add(index, contacts)
|
||||
}
|
||||
MMKVUtils.put("contacts_list", Gson().toJson(list))
|
||||
}
|
||||
|
||||
fun delete(id: String) {
|
||||
val list = all()
|
||||
val contacts = list.find { it.id == id }
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.cheng.bole.bean.GuideUpdateInfoBean
|
|||
import com.cheng.bole.bean.HotWordBean
|
||||
import com.cheng.bole.bean.LoginEntity
|
||||
import com.cheng.bole.bean.MerchantGoodsBean
|
||||
import com.cheng.bole.bean.OrderBean
|
||||
import com.cheng.bole.bean.OrderPayEntity
|
||||
import com.cheng.bole.bean.ZZDBInfoBean
|
||||
import com.cheng.bole.bean.SeatItemBean
|
||||
|
|
@ -170,6 +171,24 @@ interface ApiService {
|
|||
@POST("/api/order")
|
||||
suspend fun payCreateOrder(@Body requestBody: RequestBody): HttpBaseResult<OrderPayEntity>
|
||||
|
||||
/**
|
||||
* 订单列表查询
|
||||
*/
|
||||
@GET("/api/order")
|
||||
suspend fun getOrderList(@Query("status") status: String): HttpBaseResult<List<OrderBean>>
|
||||
|
||||
/**
|
||||
* 订单查询
|
||||
*/
|
||||
@GET("/api/order")
|
||||
suspend fun getOrderInfo(@Query("order_id") orderId: String): HttpBaseResult<OrderBean>
|
||||
|
||||
/**
|
||||
* 更新订单
|
||||
*/
|
||||
@PUT("/api/order")
|
||||
suspend fun updateOrder(@Body requestBody: RequestBody): HttpBaseResult<Any>
|
||||
|
||||
/**
|
||||
* 权限验证
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class RequestHeaderInterceptor : Interceptor {
|
|||
.addHeader("x-mobile-brand", android.os.Build.BRAND)
|
||||
.addHeader("x-mobile-model", android.os.Build.MODEL)
|
||||
.addHeader("x-base-version", AppUtils.getAppVersionName())
|
||||
.addHeader("x-channel", "jk_${ChannelUtils.getChannel()}")
|
||||
.addHeader("x-channel", "bole_${ChannelUtils.getChannel()}")
|
||||
.addHeader("x-click-id", UserConfigManager.getBDVID())
|
||||
.addHeader("x-app-id", Constants.APP_ID)
|
||||
.addHeader("x-package", BuildConfig.APPLICATION_ID)
|
||||
|
|
@ -40,7 +40,7 @@ class RequestHeaderInterceptor : Interceptor {
|
|||
stringBuilder.append("x-mobile-brand = ${android.os.Build.BRAND}\n")
|
||||
stringBuilder.append("x-mobile-model = ${android.os.Build.MODEL}\n")
|
||||
stringBuilder.append("x-base-version = ${AppUtils.getAppVersionName()}\n")
|
||||
stringBuilder.append("x-channel = jk_${ChannelUtils.getChannel()}\n")
|
||||
stringBuilder.append("x-channel = bole_${ChannelUtils.getChannel()}\n")
|
||||
stringBuilder.append("x-click-id = ${UserConfigManager.getBDVID()}\n")
|
||||
stringBuilder.append("x-package = ${BuildConfig.APPLICATION_ID}\n")
|
||||
stringBuilder.append("-------------header end-------------")
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import com.example.base.utils.ScreenUtils
|
|||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.AccountEntity
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.databinding.DialogAccountListBinding
|
||||
import com.cheng.bole.manager.DialogEnum
|
||||
|
|
@ -57,7 +58,7 @@ class AccountListDialog : DialogFragment() {
|
|||
|
||||
val listStr = arguments?.getString("list")
|
||||
if (!TextUtils.isEmpty(listStr)) {
|
||||
val list = Gson().fromJson<List<com.cheng.bole.bean.AccountEntity>>(listStr, object : TypeToken<List<com.cheng.bole.bean.AccountEntity>>(){}.type)
|
||||
val list = Gson().fromJson<List<AccountEntity>>(listStr, object : TypeToken<List<AccountEntity>>(){}.type)
|
||||
mAdapter.setList(list)
|
||||
}
|
||||
|
||||
|
|
@ -80,7 +81,7 @@ class AccountListDialog : DialogFragment() {
|
|||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance(list: List<com.cheng.bole.bean.AccountEntity>, btnText: String? = null): AccountListDialog {
|
||||
fun newInstance(list: List<AccountEntity>, btnText: String? = null): AccountListDialog {
|
||||
val arg = Bundle()
|
||||
arg.putString("list", Gson().toJson(list))
|
||||
arg.putString("btnText", btnText)
|
||||
|
|
@ -90,14 +91,18 @@ class AccountListDialog : DialogFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
class AccountAdapter: BaseQuickAdapter<com.cheng.bole.bean.AccountEntity, BaseViewHolder>(R.layout.listitem_account_login_tip) {
|
||||
override fun convert(holder: BaseViewHolder, item: com.cheng.bole.bean.AccountEntity) {
|
||||
class AccountAdapter: BaseQuickAdapter<AccountEntity, BaseViewHolder>(R.layout.listitem_account_login_tip) {
|
||||
override fun convert(holder: BaseViewHolder, item: AccountEntity) {
|
||||
if (item.vip_type == "1") {
|
||||
holder.setGone(R.id.iv_vip_tag, true)
|
||||
} else if (item.vip_type == "2" || item.vip_type == "3") {
|
||||
holder.setImageResource(R.id.iv_vip_tag, if (item.vip_type == "2") R.mipmap.ic_vip_tag1 else R.mipmap.ic_vip_tag2)
|
||||
holder.setGone(R.id.iv_vip_tag, false)
|
||||
} else if (item.vip_type == "12" || item.vip_type == "11") {
|
||||
holder.setImageResource(R.id.iv_vip_tag, if (item.vip_type == "12") R.mipmap.ic_vip_tag3 else R.mipmap.ic_vip_tag4)
|
||||
holder.setGone(R.id.iv_vip_tag, false)
|
||||
}
|
||||
|
||||
holder.setText(R.id.tv_username, item.name)
|
||||
holder.setText(R.id.tv_create_time, "${item.create_time} 注册")
|
||||
holder.setGone(R.id.iv_bind_wx, !item.bind.contains("weixin"))
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import com.example.base.extensions.toast
|
|||
import com.example.base.utils.RegexUtils
|
||||
import com.example.base.utils.ScreenUtils
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.databinding.DialogBindPhoneBinding
|
||||
import com.cheng.bole.impl.TextWatcherImpl
|
||||
import com.cheng.bole.utils.KeyboardUtils
|
||||
|
|
@ -62,6 +63,8 @@ class BindPhoneDialog : DialogFragment(), KeyboardUtils.OnSoftInputChangedListen
|
|||
|
||||
binding = DialogBindPhoneBinding.bind(view)
|
||||
|
||||
binding.tvTitle.typeface = Constants.douyinsansB
|
||||
|
||||
binding.etPhone.addTextChangedListener(textWatcher)
|
||||
|
||||
binding.ivClose.onClick {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,298 @@
|
|||
package com.cheng.bole.ui.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Dialog
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.OrderPayEntity
|
||||
import com.cheng.bole.bean.VipGoodsEntity
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.common.EventConstants
|
||||
import com.cheng.bole.databinding.DialogBuySeatBinding
|
||||
import com.cheng.bole.event.PayStatusEnum
|
||||
import com.cheng.bole.event.PayStatusEvent
|
||||
import com.cheng.bole.event.PaySuccessEvent
|
||||
import com.cheng.bole.manager.EventReportManager
|
||||
import com.cheng.bole.manager.LoginManager
|
||||
import com.cheng.bole.manager.UserConfigManager
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.cheng.bole.utils.pay.PayUtils
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.dialog.LoadingDialog
|
||||
import com.example.base.extensions.gone
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.extensions.visible
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.utils.ScreenUtils
|
||||
import com.example.base.utils.SpanUtils
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.JsonObject
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPI
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory
|
||||
import io.reactivex.disposables.Disposable
|
||||
import kotlinx.coroutines.launch
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class BuySeatDialog : DialogFragment() {
|
||||
private lateinit var api: IWXAPI
|
||||
|
||||
private var payType = 0 // 0 微信 1 支付宝
|
||||
|
||||
private var goodsEntity: VipGoodsEntity? = null
|
||||
private var orderEntity: OrderPayEntity? = null
|
||||
|
||||
private var count = 1
|
||||
private var totalPrice = 0f
|
||||
|
||||
private val loadingDialog by lazy { LoadingDialog(requireContext()) }
|
||||
|
||||
private var payStatusDisposable: Disposable? = null
|
||||
|
||||
private var mOnBackListener: (() -> Unit)? = null //回调事件
|
||||
|
||||
private lateinit var binding: DialogBuySeatBinding
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
val window = dialog?.window
|
||||
val windowParams = window?.attributes
|
||||
windowParams?.dimAmount = 0.7f
|
||||
windowParams?.width = ScreenUtils.getWindowSize().x
|
||||
windowParams?.gravity = Gravity.BOTTOM
|
||||
windowParams?.windowAnimations = R.style.dialog_bottom
|
||||
dialog?.window?.attributes = windowParams
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||
return super.onCreateView(inflater, container, savedInstanceState)
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val view = layoutInflater.inflate(R.layout.dialog_buy_seat, null)
|
||||
|
||||
binding = DialogBuySeatBinding.bind(view)
|
||||
|
||||
initView()
|
||||
initListener()
|
||||
initObserver()
|
||||
initData()
|
||||
|
||||
val dialog = Dialog(requireContext())
|
||||
dialog.setContentView(view)
|
||||
return dialog
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
binding.tvTitle.typeface = Constants.douyinsansB
|
||||
binding.tvPrice.typeface = Constants.dDIN_PRO_M
|
||||
binding.tvCount.typeface = Constants.dDIN_PRO_M
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun initData() {
|
||||
api = WXAPIFactory.createWXAPI(requireContext(), Constants.WechatAppId)
|
||||
|
||||
goodsEntity = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
arguments?.getSerializable("goods", VipGoodsEntity::class.java)
|
||||
} else {
|
||||
arguments?.getSerializable("goods") as? VipGoodsEntity
|
||||
}
|
||||
if (goodsEntity != null) {
|
||||
binding.tvName.text = goodsEntity!!.goods_name
|
||||
SpanUtils.with(binding.tvOriginPrice)
|
||||
.append("原价:${DecimalFormat("0.##").format(goodsEntity!!.origin_price.toFloat())}元/个")
|
||||
.setStrikethrough()
|
||||
.create()
|
||||
totalPrice = goodsEntity!!.price.toFloat()
|
||||
binding.tvPrice.text = "¥${DecimalFormat("0.##").format(totalPrice)}"
|
||||
releasePayType()
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun initListener() {
|
||||
binding.ivClose.onClick { dismiss() }
|
||||
|
||||
binding.ivAdd.onClick {
|
||||
count++
|
||||
binding.tvCount.text = "$count"
|
||||
totalPrice = goodsEntity!!.price.toFloat() * count
|
||||
binding.tvPrice.text = "¥${DecimalFormat("0.##").format(totalPrice)}"
|
||||
binding.ivSubtract.setImageResource(R.mipmap.ic_subtract_count_enable)
|
||||
}
|
||||
|
||||
binding.ivSubtract.onClick {
|
||||
if (count > 1) {
|
||||
count--
|
||||
binding.tvCount.text = "$count"
|
||||
totalPrice = goodsEntity!!.price.toFloat() * count
|
||||
binding.tvPrice.text = "¥${DecimalFormat("0.##").format(totalPrice)}"
|
||||
binding.ivSubtract.setImageResource(if (count > 1) R.mipmap.ic_subtract_count_enable else R.mipmap.ic_subtract_count_disable)
|
||||
}
|
||||
}
|
||||
|
||||
binding.tvWxPay.onClick {
|
||||
payType = 0
|
||||
checkPayType()
|
||||
}
|
||||
|
||||
binding.tvAliPay.onClick {
|
||||
payType = 1
|
||||
checkPayType()
|
||||
}
|
||||
|
||||
binding.btnPay.onClick {
|
||||
if (goodsEntity == null) return@onClick
|
||||
if (!UserConfigManager.getNoLoginPay() && !LoginManager.isLogin()) {
|
||||
toast("请登录后支付")
|
||||
return@onClick
|
||||
}
|
||||
if (payType == 0 && !api.isWXAppInstalled) {
|
||||
toast("您没有安装微信客户端,请先下载安装")
|
||||
return@onClick
|
||||
}
|
||||
if (payType == 0) {
|
||||
payCreateOrder("weixin")
|
||||
} else if (payType == 1) {
|
||||
payCreateOrder("alipay")
|
||||
}
|
||||
EventReportManager.eventReport(
|
||||
EventConstants.PAY_PAY,
|
||||
if (payType == 0) "weixin" else "alipay",
|
||||
Gson().toJson(goodsEntity)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun initObserver() {
|
||||
payStatusDisposable = RxBus.defaultInstance.toObservable(PayStatusEvent::class.java).subscribe {
|
||||
when (it.payStatus) {
|
||||
PayStatusEnum.PAY_SUCCESS -> {
|
||||
toast("支付成功")
|
||||
EventReportManager.eventReport(
|
||||
EventConstants.PAY_SUCCESS,
|
||||
if (payType == 0) "weixin" else "alipay",
|
||||
"{orderId:${orderEntity?.orderId}, meal:${Gson().toJson(goodsEntity)}}"
|
||||
)
|
||||
RxBus.defaultInstance.post(PaySuccessEvent())
|
||||
}
|
||||
|
||||
PayStatusEnum.PAY_CANCEL -> {
|
||||
toast("已取消支付")
|
||||
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{orderId:${orderEntity?.orderId}")
|
||||
}
|
||||
|
||||
else -> {
|
||||
toast("已取消支付")
|
||||
EventReportManager.eventReport(if (payType == 0) EventConstants.ERROR_CLIENT_WXPAY_ERR else EventConstants.ERROR_CLIENT_ALIPAY_ERR, "{orderId:${orderEntity?.orderId}", it.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun payCreateOrder(payType: String) {
|
||||
loadingDialog.show()
|
||||
lifecycleScope.launch {
|
||||
try {
|
||||
val json = JsonObject()
|
||||
json.addProperty("goods_id", goodsEntity!!.goods_id)
|
||||
json.addProperty("pay_type", payType)
|
||||
json.addProperty("source", "corp")
|
||||
json.addProperty("pay_source", "app")
|
||||
val extra = JsonObject()
|
||||
extra.addProperty("add_corp_limit", "$count")
|
||||
json.add("extra", extra)
|
||||
|
||||
val response = ApiFactory.apiService.payCreateOrder(json.toString().toRequestBody())
|
||||
if (response.status) {
|
||||
orderEntity = response.data
|
||||
if (this@BuySeatDialog.payType == 0) {
|
||||
PayUtils.toWXPay(requireActivity(), response.data)
|
||||
} else if (this@BuySeatDialog.payType == 1) {
|
||||
PayUtils.toAliPay(requireActivity(), response.data.payParam, "")
|
||||
}
|
||||
} else toast(response.message, true)
|
||||
loadingDialog.dismiss()
|
||||
} catch (e: Exception) {
|
||||
loadingDialog.dismiss()
|
||||
L.d(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun releasePayType() {
|
||||
val list = goodsEntity?.pay_type?.split(",")?.map { it.trim() }?.toList()
|
||||
if (list?.find { it == "alipay" } != null) {
|
||||
binding.tvAliPay.visible()
|
||||
} else {
|
||||
binding.tvAliPay.gone()
|
||||
}
|
||||
if (list?.find { it == "weixin" } != null) {
|
||||
binding.tvWxPay.visible()
|
||||
} else {
|
||||
binding.tvWxPay.gone()
|
||||
}
|
||||
|
||||
if (goodsEntity?.pay_type!!.startsWith("weixin")) {
|
||||
payType = 0
|
||||
}
|
||||
if (goodsEntity?.pay_type!!.startsWith("alipay")) {
|
||||
payType = 1
|
||||
}
|
||||
|
||||
checkPayType()
|
||||
}
|
||||
|
||||
private fun checkPayType() {
|
||||
if (payType == 0) {
|
||||
val start1 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_wx_pay)
|
||||
val end1 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_pay_checked3)
|
||||
binding.tvWxPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start1, null, end1, null)
|
||||
|
||||
val start2 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_ali_pay)
|
||||
val end2 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_pay_default3)
|
||||
binding.tvAliPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start2, null, end2, null)
|
||||
} else if (payType == 1) {
|
||||
val start1 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_ali_pay)
|
||||
val end1 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_pay_checked3)
|
||||
binding.tvAliPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start1, null, end1, null)
|
||||
|
||||
val start2 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_wx_pay)
|
||||
val end2 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_pay_default3)
|
||||
binding.tvWxPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start2, null, end2, null)
|
||||
}
|
||||
}
|
||||
|
||||
fun setOnSelectListener(listener: () -> Unit) {
|
||||
mOnBackListener = listener
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
payStatusDisposable?.dispose()
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance(goods: VipGoodsEntity): BuySeatDialog {
|
||||
val arg = Bundle()
|
||||
arg.putSerializable("goods", goods)
|
||||
val fragment = BuySeatDialog()
|
||||
fragment.arguments = arg
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.cheng.bole.ui.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Dialog
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.databinding.DialogSeatAuthBinding
|
||||
import com.cheng.bole.utils.KeyboardUtils
|
||||
import com.example.base.extensions.getColor
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.ScreenUtils
|
||||
import com.example.base.utils.SpanUtils
|
||||
|
||||
class SeatAuthDialog : DialogFragment(), KeyboardUtils.OnSoftInputChangedListener {
|
||||
private var mOnBackListener: ((String) -> Unit)? = null //回调事件
|
||||
|
||||
private lateinit var binding: DialogSeatAuthBinding
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
val window = dialog?.window
|
||||
val windowParams = window?.attributes
|
||||
windowParams?.dimAmount = 0.7f
|
||||
windowParams?.width = ScreenUtils.getWindowSize().x
|
||||
windowParams?.gravity = Gravity.BOTTOM
|
||||
windowParams?.windowAnimations = R.style.dialog_bottom
|
||||
dialog?.window?.attributes = windowParams
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||
KeyboardUtils.registerSoftInputChangedListener(requireActivity(), this)
|
||||
return super.onCreateView(inflater, container, savedInstanceState)
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val view = layoutInflater.inflate(R.layout.dialog_seat_auth, null)
|
||||
|
||||
binding = DialogSeatAuthBinding.bind(view)
|
||||
|
||||
binding.tvTitle.typeface = Constants.douyinsansB
|
||||
|
||||
SpanUtils.with(binding.tvTip)
|
||||
.append("注:授权者需提前到")
|
||||
.append("设置-绑定账号-手机号绑定")
|
||||
.setForegroundColor(getColor(R.color.color_ff8518))
|
||||
.append("才能正常授权")
|
||||
.create()
|
||||
|
||||
binding.ivClose.onClick { dismiss() }
|
||||
|
||||
binding.btnNext.onClick {
|
||||
val phone = binding.etPhone.text.toString()
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
toast("请输入手机号")
|
||||
return@onClick
|
||||
}
|
||||
mOnBackListener?.invoke(phone)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
val dialog = Dialog(requireContext())
|
||||
dialog.setContentView(view)
|
||||
return dialog
|
||||
}
|
||||
|
||||
override fun onSoftInputChanged(height: Int) {
|
||||
val lp = binding.layoutContent.layoutParams as ConstraintLayout.LayoutParams
|
||||
lp.bottomMargin = height
|
||||
binding.layoutContent.layoutParams = lp
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
KeyboardUtils.unregisterSoftInputChangedListener(requireActivity().window)
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
fun setOnSelectListener(listener: (String) -> Unit) {
|
||||
mOnBackListener = listener
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance(): SeatAuthDialog {
|
||||
val arg = Bundle()
|
||||
val fragment = SeatAuthDialog()
|
||||
fragment.arguments = arg
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.cheng.bole.ui.fragment.bid.publish.contacts
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.text.TextUtils
|
||||
|
|
@ -10,12 +11,10 @@ import com.cheng.bole.event.ContactsEvent
|
|||
import com.cheng.bole.manager.ContactsManager
|
||||
import com.cheng.bole.manager.DialogEnum
|
||||
import com.cheng.bole.ui.dialog.TipDialog
|
||||
import com.efs.sdk.memleaksdk.monitor.internal.bi
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.decoration.GridSpaceItemDecoration
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.extensions.visible
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.utils.DensityUtils
|
||||
import java.util.UUID
|
||||
|
|
@ -44,6 +43,7 @@ class AddContactsFragment: BaseFragment<FragmentAddContactsBinding, AddContactsV
|
|||
setData()
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
mAdapter.setOnItemClickListener { _, _, i ->
|
||||
|
|
@ -71,13 +71,13 @@ class AddContactsFragment: BaseFragment<FragmentAddContactsBinding, AddContactsV
|
|||
|
||||
binding.btnNext.onClick {
|
||||
val name = binding.etName.text.toString().trim()
|
||||
val contacts = binding.etPhone.text.toString().trim()
|
||||
val phone = binding.etPhone.text.toString().trim()
|
||||
val job = binding.etJob.text.toString().trim()
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
toast("请输入姓名")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(contacts)) {
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
toast("请输入联系方式")
|
||||
return@onClick
|
||||
}
|
||||
|
|
@ -85,9 +85,16 @@ class AddContactsFragment: BaseFragment<FragmentAddContactsBinding, AddContactsV
|
|||
toast("请输入职位")
|
||||
return@onClick
|
||||
}
|
||||
val contactsInfo = ContactsInfoBean(UUID.randomUUID().toString(), name, contacts, mAdapter.data.find { it.isChecked }?.name ?: job)
|
||||
ContactsManager.add(contactsInfo)
|
||||
RxBus.defaultInstance.post(ContactsEvent(contactsInfo))
|
||||
if (contactsInfo == null) {
|
||||
contactsInfo = ContactsInfoBean(UUID.randomUUID().toString(), name, phone, mAdapter.data.find { it.isChecked }?.name ?: job)
|
||||
ContactsManager.add(contactsInfo!!)
|
||||
} else {
|
||||
contactsInfo!!.name = name
|
||||
contactsInfo!!.phone = phone
|
||||
contactsInfo!!.job = job
|
||||
ContactsManager.update(contactsInfo!!)
|
||||
}
|
||||
RxBus.defaultInstance.post(ContactsEvent(contactsInfo!!))
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.cheng.bole.bean.UserEntity
|
|||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.common.EventConstants
|
||||
import com.cheng.bole.databinding.FragmentMineBinding
|
||||
import com.cheng.bole.event.CompanyAuthEvent
|
||||
import com.cheng.bole.event.MineRefreshEvent
|
||||
import com.cheng.bole.manager.EventReportManager
|
||||
import com.cheng.bole.manager.LoginManager
|
||||
|
|
@ -17,12 +18,23 @@ import com.cheng.bole.manager.UserConfigManager
|
|||
import com.cheng.bole.ui.activity.LoginActivity
|
||||
import com.cheng.bole.ui.activity.PublicActivity
|
||||
import com.cheng.bole.ui.dialog.ShareDialog
|
||||
import com.cheng.bole.ui.fragment.mine.auth.CompanyAuthFragment
|
||||
import com.cheng.bole.ui.fragment.mine.favorite.FavoriteFragment
|
||||
import com.cheng.bole.ui.fragment.mine.feedback.FeedbackFragment
|
||||
import com.cheng.bole.ui.fragment.mine.history.HistoryFragment
|
||||
import com.cheng.bole.ui.fragment.mine.message.MessageFragment
|
||||
import com.cheng.bole.ui.fragment.mine.order.OrderFragment
|
||||
import com.cheng.bole.ui.fragment.mine.seat.SeatManageFragment
|
||||
import com.cheng.bole.ui.fragment.mine.settings.SettingsFragment
|
||||
import com.cheng.bole.ui.fragment.mine.vip.VipFragment
|
||||
import com.cheng.bole.ui.fragment.push.subscribe.SubscribeFragment
|
||||
import com.efs.sdk.memleaksdk.monitor.internal.bi
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.extensions.getColor
|
||||
import com.example.base.extensions.gone
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.extensions.visible
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.utils.ClipboardUtils
|
||||
|
||||
|
|
@ -52,6 +64,7 @@ class MineFragment : BaseFragment<FragmentMineBinding, MineViewModel>() {
|
|||
}
|
||||
|
||||
override fun initData() {
|
||||
mViewModel.getCompanyInfo()
|
||||
super.initData()
|
||||
}
|
||||
|
||||
|
|
@ -78,32 +91,32 @@ class MineFragment : BaseFragment<FragmentMineBinding, MineViewModel>() {
|
|||
binding.tvExpireTime.onClick { binding.tvVipName.performClick() }
|
||||
|
||||
binding.ivSetting.onClick {
|
||||
// PublicActivity.start(requireContext(), SettingFragment::class.java)
|
||||
PublicActivity.start(requireContext(), SettingsFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_SYSTEM_SETTING, "", "")
|
||||
}
|
||||
|
||||
binding.ivMessage.onClick {
|
||||
// PublicActivity.start(requireContext(), MessageFragment::class.java)
|
||||
PublicActivity.start(requireContext(), MessageFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_MESSAGE, "", "")
|
||||
}
|
||||
|
||||
binding.layoutPush.onClick {
|
||||
// PublicActivity.start(requireContext(), SubscribeFragment::class.java)
|
||||
PublicActivity.start(requireContext(), SubscribeFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_SUBSCRIBE, "center", "")
|
||||
}
|
||||
|
||||
binding.layoutFavorite.onClick {
|
||||
// PublicActivity.start(requireContext(), FavoriteFragment::class.java)
|
||||
PublicActivity.start(requireContext(), FavoriteFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_FAVORITE, "", "")
|
||||
}
|
||||
|
||||
binding.layoutHistory.onClick {
|
||||
// PublicActivity.start(requireContext(), HistoryFragment::class.java)
|
||||
PublicActivity.start(requireContext(), HistoryFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_HISTORY, "", "")
|
||||
}
|
||||
|
||||
binding.layoutOrder.onClick {
|
||||
// PublicActivity.start(requireContext(), OrderFragment::class.java)
|
||||
PublicActivity.start(requireContext(), OrderFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_ORDER, "", "")
|
||||
}
|
||||
|
||||
|
|
@ -112,11 +125,13 @@ class MineFragment : BaseFragment<FragmentMineBinding, MineViewModel>() {
|
|||
}
|
||||
|
||||
binding.tvAuth.onClick {
|
||||
|
||||
PublicActivity.start(requireContext(), CompanyAuthFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_AUTH, "", "")
|
||||
}
|
||||
|
||||
binding.tvSeatManage.onClick {
|
||||
|
||||
PublicActivity.start(requireContext(), SeatManageFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_SEAT_MANAGE, "", "")
|
||||
}
|
||||
|
||||
binding.tvService.onClick {
|
||||
|
|
@ -144,6 +159,31 @@ class MineFragment : BaseFragment<FragmentMineBinding, MineViewModel>() {
|
|||
setUserInfo()
|
||||
}
|
||||
|
||||
mViewModel.companyLiveData.observe(this) {
|
||||
if (it != null) {
|
||||
when (it.status) {
|
||||
"2" -> {
|
||||
binding.tvAuthStatus.text = "认证成功"
|
||||
binding.tvAuthStatus.setTextColor(getColor(R.color.color_3bbf0f))
|
||||
binding.tvAuthStatus.setCompoundDrawablesWithIntrinsicBounds(R.drawable.shape_auth_success_dot, 0, 0, 0)
|
||||
}
|
||||
"3" -> {
|
||||
binding.tvAuthStatus.text = "认证失败"
|
||||
binding.tvAuthStatus.setTextColor(getColor(R.color.color_ff592b))
|
||||
binding.tvAuthStatus.setCompoundDrawablesWithIntrinsicBounds(R.drawable.shape_auth_fail_dot, 0, 0, 0)
|
||||
}
|
||||
else -> binding.tvAuthStatus.gone()
|
||||
}
|
||||
} else {
|
||||
binding.tvAuthStatus.gone()
|
||||
}
|
||||
}
|
||||
|
||||
val authEvent = RxBus.defaultInstance.toObservable(CompanyAuthEvent::class.java).subscribe {
|
||||
mViewModel.getCompanyInfo()
|
||||
}
|
||||
addDisposable(authEvent)
|
||||
|
||||
val mineRefreshEvent = RxBus.defaultInstance.toObservable(MineRefreshEvent::class.java).subscribe {
|
||||
mViewModel.userInfo()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.cheng.bole.ui.fragment.mine
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.CompanyBean
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.bean.UserEntity
|
||||
import com.cheng.bole.bean.WxServiceEntity
|
||||
import com.cheng.bole.common.Constants
|
||||
|
|
@ -15,6 +17,7 @@ import com.tencent.mm.opensdk.openapi.WXAPIFactory
|
|||
|
||||
class MineViewModel : BaseViewModel() {
|
||||
val userInfoLiveData = MutableLiveData<UserEntity>()
|
||||
val companyLiveData = MutableLiveData<CompanyBean>()
|
||||
|
||||
fun userInfo(showLoading: Boolean = false) {
|
||||
if (showLoading) showDialog()
|
||||
|
|
@ -31,6 +34,18 @@ class MineViewModel : BaseViewModel() {
|
|||
})
|
||||
}
|
||||
|
||||
fun getCompanyInfo() {
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.getCompanyInfo()
|
||||
if (response.status) {
|
||||
companyLiveData.postValue(response.data)
|
||||
} else toast(response.message, true)
|
||||
}, {
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun wxService() {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
package com.cheng.bole.ui.fragment.mine.about
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.utils.AppUtils
|
||||
import com.cheng.bole.databinding.FragmentAboutBinding
|
||||
import com.cheng.bole.ui.dialog.PopupDialog
|
||||
import com.cheng.bole.utils.ChannelUtils
|
||||
import com.cheng.bole.utils.UrlHelper
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.utils.AppUtils
|
||||
import org.jetbrains.anko.sdk27.listeners.onLongClick
|
||||
|
||||
class AboutFragment : BaseFragment<FragmentAboutBinding, AboutViewModel>() {
|
||||
|
|
@ -17,10 +17,6 @@ class AboutFragment : BaseFragment<FragmentAboutBinding, AboutViewModel>() {
|
|||
mTitleBar?.background = null
|
||||
|
||||
binding.tvVersionName.text = "版本号:${AppUtils.getAppVersionName()}"
|
||||
|
||||
if (ChannelUtils.getChannel() == "huawei") {
|
||||
binding.tvAppName.text = AppUtils.getAppName()
|
||||
}
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
|
|
@ -35,5 +31,14 @@ class AboutFragment : BaseFragment<FragmentAboutBinding, AboutViewModel>() {
|
|||
binding.tvPolicy.onClick {
|
||||
UrlHelper.startPrivacyPolicy(requireContext())
|
||||
}
|
||||
binding.tvPermissionList.onClick {
|
||||
UrlHelper.startPermissionList(requireContext())
|
||||
}
|
||||
binding.tvShareList.onClick {
|
||||
UrlHelper.startShareList(requireContext())
|
||||
}
|
||||
binding.tvSdkList.onClick {
|
||||
UrlHelper.startSDKList(requireContext())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,27 +6,43 @@ import coil.transform.CircleCropTransformation
|
|||
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.AccountEntity
|
||||
import com.cheng.bole.manager.UserConfigManager
|
||||
import com.example.base.extensions.getColor
|
||||
|
||||
class AccountAdapter:BaseQuickAdapter<com.cheng.bole.bean.AccountEntity, BaseViewHolder>(R.layout.listitem_account) {
|
||||
class AccountAdapter : BaseQuickAdapter<AccountEntity, BaseViewHolder>(R.layout.listitem_account) {
|
||||
|
||||
override fun convert(holder: BaseViewHolder, item: com.cheng.bole.bean.AccountEntity) {
|
||||
override fun convert(holder: BaseViewHolder, item: AccountEntity) {
|
||||
holder.getView<ImageView>(R.id.iv_avatar).load(item.avater) {
|
||||
transformations(CircleCropTransformation())
|
||||
placeholder(R.mipmap.ic_default_avatar)
|
||||
error(R.mipmap.ic_default_avatar)
|
||||
}
|
||||
|
||||
if (item.vip_type == "1") {
|
||||
holder.setGone(R.id.tv_vip_tag, true)
|
||||
holder.setGone(R.id.iv_vip_tag, true)
|
||||
} else if (item.vip_type == "2" || item.vip_type == "3") {
|
||||
holder.setText(R.id.tv_vip_tag, if (item.vip_type == "2") item.vip_name else "终生会员")
|
||||
holder.setGone(R.id.tv_vip_tag, false)
|
||||
holder.setImageResource(R.id.iv_vip_tag, if (item.vip_type == "2") R.mipmap.ic_vip_tag1 else R.mipmap.ic_vip_tag2)
|
||||
holder.setGone(R.id.iv_vip_tag, false)
|
||||
} else if (item.vip_type == "12" || item.vip_type == "11") {
|
||||
holder.setImageResource(R.id.iv_vip_tag, if (item.vip_type == "12") R.mipmap.ic_vip_tag3 else R.mipmap.ic_vip_tag4)
|
||||
holder.setGone(R.id.iv_vip_tag, false)
|
||||
}
|
||||
|
||||
holder.setVisible(R.id.tv_current_account, item.user_id == UserConfigManager.userInfo?.user_id)
|
||||
holder.setVisible(R.id.tv_change_account, item.user_id != UserConfigManager.userInfo?.user_id)
|
||||
holder.setVisible(R.id.tv_user_id_left, item.user_id != UserConfigManager.userInfo?.user_id)
|
||||
holder.setVisible(R.id.tv_user_id_right, item.user_id == UserConfigManager.userInfo?.user_id)
|
||||
|
||||
holder.setBackgroundColor(
|
||||
R.id.layout_title,
|
||||
if (item.user_id == UserConfigManager.userInfo?.user_id) getColor(R.color.color_dce4f3) else getColor(R.color.color_f7ebe2)
|
||||
)
|
||||
|
||||
holder.setText(R.id.tv_user_id_left, "ID:${item.user_id}")
|
||||
holder.setText(R.id.tv_user_id_right, "ID:${item.user_id}")
|
||||
|
||||
holder.setText(R.id.tv_username, item.name)
|
||||
holder.setText(R.id.tv_user_id, "ID:${item.user_id}")
|
||||
holder.setGone(R.id.iv_bind_wx, !item.bind.contains("weixin"))
|
||||
holder.setGone(R.id.iv_bind_phone, !item.bind.contains("phone"))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package com.cheng.bole.ui.fragment.mine.account
|
||||
|
||||
import android.graphics.Color
|
||||
import com.cheng.bole.bean.AccountEntity
|
||||
import com.cheng.bole.common.EventConstants
|
||||
import com.cheng.bole.databinding.FragmentAccountManageBinding
|
||||
import com.cheng.bole.event.LoginSuccessEvent
|
||||
import com.cheng.bole.manager.DialogEnum
|
||||
import com.cheng.bole.manager.EventReportManager
|
||||
import com.cheng.bole.manager.LoginManager
|
||||
|
|
@ -17,7 +19,7 @@ import org.jetbrains.anko.backgroundColor
|
|||
|
||||
class AccountManageFragment : BaseFragment<FragmentAccountManageBinding, AccountManageViewModel>() {
|
||||
private val mAdapter by lazy { AccountAdapter() }
|
||||
private var mAccount: com.cheng.bole.bean.AccountEntity? = null
|
||||
private var mAccount: AccountEntity? = null
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
|
|
@ -93,7 +95,7 @@ class AccountManageFragment : BaseFragment<FragmentAccountManageBinding, Account
|
|||
UserConfigManager.userConfig {
|
||||
toast("切换成功")
|
||||
mViewModel.dismissDialog()
|
||||
RxBus.defaultInstance.post(com.cheng.bole.event.LoginSuccessEvent())
|
||||
RxBus.defaultInstance.post(LoginSuccessEvent())
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,256 @@
|
|||
package com.cheng.bole.ui.fragment.mine.auth
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.text.TextUtils
|
||||
import android.view.ViewTreeObserver
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import coil.load
|
||||
import coil.transform.RoundedCornersTransformation
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.AreaBean
|
||||
import com.cheng.bole.bean.CompanyBean
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.databinding.FragmentCompanyAuthBinding
|
||||
import com.cheng.bole.event.CompanyAuthEvent
|
||||
import com.cheng.bole.manager.UserConfigManager
|
||||
import com.cheng.bole.ui.activity.PublicActivity
|
||||
import com.cheng.bole.ui.dialog.SelectAreaDialog
|
||||
import com.cheng.bole.ui.dialog.SelectContactsDialog
|
||||
import com.cheng.bole.ui.fragment.bid.publish.bid.AddBidContactsAdapter
|
||||
import com.cheng.bole.ui.fragment.mine.vip.VipFragment
|
||||
import com.cheng.bole.ui.fragment.photo.PhotoViewFragment
|
||||
import com.cheng.bole.utils.FileProviderUtils
|
||||
import com.cheng.bole.utils.PermissionUtils
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.extensions.gone
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.extensions.visible
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.utils.DensityUtils
|
||||
import com.google.gson.JsonArray
|
||||
import com.google.gson.JsonObject
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
|
||||
class CompanyAuthFragment : BaseFragment<FragmentCompanyAuthBinding, CompanyAuthViewModel>() {
|
||||
private var companyDetail: CompanyBean? = null
|
||||
|
||||
private var image: UploadFileEntity? = null
|
||||
|
||||
private val contactsAdapter by lazy { AddBidContactsAdapter() }
|
||||
|
||||
private var city: AreaBean? = null
|
||||
|
||||
private val imageLauncher = registerForActivityResult(ActivityResultContracts.GetContent()) {
|
||||
it?.let {
|
||||
val imagePath = FileProviderUtils.getFileAbsolutePath(requireContext(), it)
|
||||
if (!TextUtils.isEmpty(imagePath)) {
|
||||
mViewModel.uploadImage(requireContext(), imagePath!!)
|
||||
} else {
|
||||
toast("图片加载失败")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
binding.tvTitle.typeface = Constants.pmzdbt
|
||||
|
||||
binding.rvContacts.adapter = contactsAdapter
|
||||
|
||||
binding.ivTopBg.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
(binding.tvTitle.layoutParams as ConstraintLayout.LayoutParams).topMargin = (binding.ivTopBg.height * 94f / 250f).toInt()
|
||||
(binding.layoutContent.layoutParams as ConstraintLayout.LayoutParams).topMargin = (binding.ivTopBg.height * 178f / 250f).toInt()
|
||||
|
||||
binding.layoutContent.setupWith(binding.nestedScrollView).setFrameClearDrawable(binding.layoutContent.background).setBlurRadius(5f)
|
||||
binding.ivTopBg.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
mViewModel.getCompanyInfo()
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.tvArea.onClick {
|
||||
val f = SelectAreaDialog.newInstance(if (city != null) listOf(city!!) else emptyList(), true)
|
||||
f.setOnSelectListener {
|
||||
city = it[0]
|
||||
binding.tvArea.text = city!!.name
|
||||
}
|
||||
f.show(childFragmentManager, "")
|
||||
}
|
||||
|
||||
binding.ivImage.onClick {
|
||||
if (image != null) {
|
||||
PublicActivity.start(requireContext(), PhotoViewFragment::class.java, Pair("photos", listOf(image!!.url)))
|
||||
}
|
||||
}
|
||||
binding.ivAddImage.onClick {
|
||||
if (image == null) {
|
||||
PermissionUtils.checkPhotoPermission(requireActivity(), childFragmentManager) { isGranted ->
|
||||
if (isGranted) {
|
||||
imageLauncher.launch("image/*")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.ivDeleteImage.onClick {
|
||||
if (companyDetail == null && image != null) {
|
||||
mViewModel.deleteImage(image!!.id)
|
||||
}
|
||||
image = null
|
||||
binding.ivImage.load("")
|
||||
binding.ivAddImage.visible()
|
||||
binding.ivDeleteImage.gone()
|
||||
}
|
||||
|
||||
binding.ivAddContacts.onClick {
|
||||
val f = SelectContactsDialog.newInstance(contactsAdapter.data)
|
||||
f.setOnSelectListener {
|
||||
contactsAdapter.setList(it)
|
||||
binding.rvContacts.visible()
|
||||
binding.tvContacts.gone()
|
||||
if (contactsAdapter.data.size == 5) {
|
||||
binding.ivAddContacts.gone()
|
||||
}
|
||||
}
|
||||
f.show(childFragmentManager, "")
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
val name = binding.etName.text.toString().trim()
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
toast("请输入企业名称")
|
||||
return@onClick
|
||||
}
|
||||
if (city == null) {
|
||||
toast("请选择地区")
|
||||
return@onClick
|
||||
}
|
||||
if (image == null) {
|
||||
toast("请上传营业执照")
|
||||
return@onClick
|
||||
}
|
||||
if (contactsAdapter.data.isEmpty()) {
|
||||
toast("请添加联系人")
|
||||
return@onClick
|
||||
}
|
||||
if (UserConfigManager.userInfo?.vip != "1") {
|
||||
commit()
|
||||
} else {
|
||||
PublicActivity.start(requireContext(), VipFragment::class.java, Pair("origin", "enterprise_auth"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.addLiveData.observe(this) {
|
||||
toast("提交成功")
|
||||
requireActivity().finish()
|
||||
}
|
||||
|
||||
mViewModel.companyLiveData.observe(this) {
|
||||
companyDetail = it
|
||||
if (companyDetail != null) {
|
||||
setData(companyDetail!!)
|
||||
}
|
||||
}
|
||||
|
||||
mViewModel.imageLiveData.observe(this) {
|
||||
image = it
|
||||
binding.ivImage.load(it.url) {
|
||||
transformations(RoundedCornersTransformation(DensityUtils.dp2px(8f).toFloat()))
|
||||
}
|
||||
binding.ivAddImage.gone()
|
||||
binding.ivDeleteImage.visible()
|
||||
}
|
||||
}
|
||||
|
||||
private fun commit() {
|
||||
val name = binding.etName.text.toString().trim()
|
||||
val jsonObject = JsonObject()
|
||||
jsonObject.addProperty("company_name", name)
|
||||
jsonObject.addProperty("city_id", "${city!!.id}")
|
||||
jsonObject.addProperty("file_id", image!!.id)
|
||||
|
||||
val contactArray = JsonArray()
|
||||
contactsAdapter.data.forEach {
|
||||
val contactObj = JsonObject()
|
||||
contactObj.addProperty("name", it.name)
|
||||
contactObj.addProperty("phone", it.phone)
|
||||
contactObj.addProperty("job", it.job)
|
||||
contactArray.add(contactObj)
|
||||
}
|
||||
jsonObject.add("contact", contactArray)
|
||||
|
||||
if (companyDetail == null) {
|
||||
mViewModel.addCompanyInfo(jsonObject.toString().toRequestBody())
|
||||
} else {
|
||||
jsonObject.addProperty("id", companyDetail!!.id)
|
||||
mViewModel.updateCompanyInfo(jsonObject.toString().toRequestBody())
|
||||
}
|
||||
RxBus.defaultInstance.post(CompanyAuthEvent())
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun setData(detail: CompanyBean) {
|
||||
when (detail.status) {
|
||||
"1" -> {
|
||||
binding.etName.isEnabled = false
|
||||
binding.tvArea.isEnabled = false
|
||||
binding.ivAddImage.isEnabled = false
|
||||
binding.ivDeleteImage.isEnabled = false
|
||||
binding.rvContacts.isEnabled = false
|
||||
binding.ivAddContacts.isEnabled = false
|
||||
binding.btnNext.isEnabled = false
|
||||
binding.layoutRejectReason.gone()
|
||||
|
||||
binding.btnNext.text = "审核中"
|
||||
}
|
||||
"2" -> {
|
||||
binding.tvStatus.text = "认证成功"
|
||||
binding.tvStatus.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_auth_success, 0, 0, 0)
|
||||
binding.tvReason.gone()
|
||||
binding.layoutRejectReason.visible()
|
||||
|
||||
binding.btnNext.text = "重新提交"
|
||||
}
|
||||
"3" -> {
|
||||
binding.tvStatus.text = "认证失败"
|
||||
binding.tvStatus.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_auth_fail, 0, 0, 0)
|
||||
binding.tvReason.text = "理由:${detail.remark}"
|
||||
binding.layoutRejectReason.visible()
|
||||
|
||||
binding.btnNext.text = "重新提交"
|
||||
}
|
||||
else -> {
|
||||
binding.layoutRejectReason.gone()
|
||||
}
|
||||
}
|
||||
binding.etName.setText(detail.company_name)
|
||||
|
||||
city = UserConfigManager.getCityList().find { it.id == detail.city_id.toInt() }
|
||||
if (city != null) binding.tvArea.text = city!!.name
|
||||
|
||||
image = UploadFileEntity(detail.file_id, detail.file_url)
|
||||
binding.ivImage.load(image!!.url) {
|
||||
transformations(RoundedCornersTransformation(DensityUtils.dp2px(8f).toFloat()))
|
||||
}
|
||||
binding.ivAddImage.gone()
|
||||
binding.ivDeleteImage.visible()
|
||||
|
||||
contactsAdapter.setList(detail.contact)
|
||||
if (contactsAdapter.data.size == 5) {
|
||||
binding.ivAddContacts.gone()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.cheng.bole.ui.fragment.mine.auth
|
||||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.CompanyBean
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.cheng.bole.utils.BitmapUtils
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||
import okhttp3.MultipartBody
|
||||
import okhttp3.RequestBody
|
||||
|
||||
class CompanyAuthViewModel: BaseViewModel() {
|
||||
val companyLiveData = MutableLiveData<CompanyBean>()
|
||||
val addLiveData = MutableLiveData<Any>()
|
||||
val imageLiveData = MutableLiveData<UploadFileEntity>()
|
||||
|
||||
fun getCompanyInfo() {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.getCompanyInfo()
|
||||
if (response.status) {
|
||||
companyLiveData.postValue(response.data)
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun addCompanyInfo(requestBody: RequestBody) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.addCompanyInfo(requestBody)
|
||||
if (response.status) {
|
||||
addLiveData.postValue(Any())
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun updateCompanyInfo(requestBody: RequestBody) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.updateCompanyInfo(requestBody)
|
||||
if (response.status) {
|
||||
addLiveData.postValue(Any())
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun uploadImage(context: Context, path: String) {
|
||||
showDialog()
|
||||
BitmapUtils.compressImg(context, path) {
|
||||
launchOnUiTryCatch({
|
||||
val requestFile = RequestBody.create("multipart/form-data".toMediaTypeOrNull(), it)
|
||||
val filePart = MultipartBody.Part.createFormData("file", it.getName(), requestFile)
|
||||
val response = ApiFactory.apiService.upload(filePart, "company")
|
||||
if (response.status) {
|
||||
imageLiveData.postValue(response.data)
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fun deleteImage(id: String) {
|
||||
launchOnUiTryCatch({
|
||||
ApiFactory.apiService.delUserFile(id)
|
||||
}, {
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.cheng.bole.ui.fragment.mine.favorite
|
||||
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.BidItemBean
|
||||
import com.cheng.bole.databinding.FragmentFavoriteBinding
|
||||
import com.cheng.bole.event.FavoriteEvent
|
||||
import com.cheng.bole.ui.activity.PublicActivity
|
||||
import com.cheng.bole.ui.fragment.bid.BidAdapter
|
||||
import com.cheng.bole.ui.fragment.bid.detail.BidDetailFragment
|
||||
import com.cheng.bole.ui.fragment.mine.vip.VipFragment
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.ui.list.ListFragment
|
||||
|
||||
class FavoriteFragment: ListFragment<FragmentFavoriteBinding, FavoriteViewModel, BidItemBean>() {
|
||||
private var item: BidItemBean? = null
|
||||
|
||||
override fun noDataClick() {
|
||||
|
||||
}
|
||||
|
||||
override fun bindAdapter() = BidAdapter()
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mTitleBar?.background = null
|
||||
|
||||
mEmptyView.setNoDataLogo(R.mipmap.ic_empty_favorite)
|
||||
mEmptyView.setNoDataText("暂无收藏")
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
firstLoad()
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
mAdapter.setOnItemClickListener { _, _, i ->
|
||||
item = mAdapter.getItem(i)
|
||||
mViewModel.checkAuth()
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.authLiveData.observe(this) {
|
||||
if (it.auth) {
|
||||
PublicActivity.start(
|
||||
requireContext(),
|
||||
BidDetailFragment::class.java,
|
||||
Pair("id", item!!.id),
|
||||
Pair("info_source", item!!.info_source)
|
||||
)
|
||||
} else {
|
||||
PublicActivity.start(requireContext(), VipFragment::class.java, Pair("origin", "view_bid"))
|
||||
}
|
||||
}
|
||||
|
||||
val favoriteEvent = RxBus.defaultInstance.toObservable(FavoriteEvent::class.java).subscribe {
|
||||
firstLoad()
|
||||
}
|
||||
addDisposable(favoriteEvent)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.cheng.bole.ui.fragment.mine.favorite
|
||||
|
||||
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 FavoriteViewModel: ListViewModel<BidItemBean>() {
|
||||
override suspend fun requestApi(params: ArrayMap<String, String>): Result<List<BidItemBean>> {
|
||||
return ApiFactory.apiService.getFavoriteList().toListResult()
|
||||
}
|
||||
|
||||
val authLiveData = MutableLiveData<UserAuthBean>()
|
||||
|
||||
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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.cheng.bole.ui.fragment.mine.history
|
||||
|
||||
import android.text.TextUtils
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.BidDetailBean
|
||||
import com.cheng.bole.utils.BidTypeUtils
|
||||
import com.cheng.bole.widget.CommonShapeView
|
||||
import com.example.base.ui.list.LoadMoreAdapter
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class HistoryAdapter: LoadMoreAdapter<BidDetailBean>(R.layout.listitem_bid) {
|
||||
|
||||
override fun convert(holder: BaseViewHolder, item: BidDetailBean) {
|
||||
val tvTag = holder.getView<CommonShapeView>(R.id.tv_tag)
|
||||
tvTag.setBgColor(BidTypeUtils.getTypeColor(item.type_name))
|
||||
tvTag.text = BidTypeUtils.getShortName(item.type_name)
|
||||
|
||||
holder.setText(R.id.tv_title, item.origin_content.toString())
|
||||
holder.setText(R.id.tv_location, if (TextUtils.isEmpty(item.city_name)) "全国" else item.city_name)
|
||||
holder.setText(R.id.tv_amount, item.project_amount)
|
||||
holder.setText(R.id.tv_time, item.tips_time)
|
||||
holder.setText(R.id.tv_rate, DecimalFormat("0.0").format(item.star.toFloat()))
|
||||
|
||||
holder.setGone(R.id.tv_amount, TextUtils.isEmpty(item.project_amount))
|
||||
holder.setGone(R.id.tv_time, true)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.cheng.bole.ui.fragment.mine.history
|
||||
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.BidDetailBean
|
||||
import com.cheng.bole.databinding.FragmentHistoryBinding
|
||||
import com.cheng.bole.ui.activity.PublicActivity
|
||||
import com.cheng.bole.ui.fragment.bid.detail.BidDetailFragment
|
||||
import com.cheng.bole.ui.fragment.mine.vip.VipFragment
|
||||
import com.example.base.ui.list.ListFragment
|
||||
|
||||
class HistoryFragment: ListFragment<FragmentHistoryBinding, HistoryViewModel, BidDetailBean>() {
|
||||
private var item: BidDetailBean? = null
|
||||
|
||||
override fun noDataClick() {
|
||||
|
||||
}
|
||||
|
||||
override fun bindAdapter() = HistoryAdapter()
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mTitleBar?.background = null
|
||||
|
||||
mEmptyView.setNoDataLogo(R.mipmap.ic_empty_history)
|
||||
mEmptyView.setNoDataText("暂无足迹")
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
firstLoad()
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
mAdapter.setOnItemClickListener { _, _, i ->
|
||||
item = mAdapter.getItem(i)
|
||||
mViewModel.checkAuth()
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.authLiveData.observe(this) {
|
||||
if (it.auth) {
|
||||
PublicActivity.start(
|
||||
requireContext(),
|
||||
BidDetailFragment::class.java,
|
||||
Pair("id", item!!.id),
|
||||
Pair("info_source", item!!.info_source)
|
||||
)
|
||||
} else {
|
||||
PublicActivity.start(requireContext(), VipFragment::class.java, Pair("origin", "view_bid"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.cheng.bole.ui.fragment.mine.history
|
||||
|
||||
import androidx.collection.ArrayMap
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.BidDetailBean
|
||||
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 HistoryViewModel: ListViewModel<BidDetailBean>() {
|
||||
override suspend fun requestApi(params: ArrayMap<String, String>): Result<List<BidDetailBean>> {
|
||||
return ApiFactory.apiService.getViewHistoryList().toListResult()
|
||||
}
|
||||
|
||||
val authLiveData = MutableLiveData<UserAuthBean>()
|
||||
|
||||
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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.cheng.bole.ui.fragment.mine.message
|
||||
|
||||
import android.text.TextUtils
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.SubscriptionMessageBean
|
||||
import com.cheng.bole.utils.BidTypeUtils
|
||||
import com.cheng.bole.utils.StringUtils
|
||||
import com.cheng.bole.widget.CommonShapeView
|
||||
import com.example.base.ui.list.LoadMoreAdapter
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class MessageAdapter: LoadMoreAdapter<SubscriptionMessageBean>(R.layout.listitem_message) {
|
||||
override fun convert(holder: BaseViewHolder, item: SubscriptionMessageBean) {
|
||||
val tvTag = holder.getView<CommonShapeView>(R.id.tv_tag)
|
||||
tvTag.setBgColor(BidTypeUtils.getTypeColor(item.extra.typeName))
|
||||
tvTag.text = BidTypeUtils.getShortName(item.extra.typeName)
|
||||
|
||||
holder.setText(R.id.tv_time, item.create_time)
|
||||
holder.setText(R.id.tv_title, item.extra.title)
|
||||
holder.setText(R.id.tv_location, if (TextUtils.isEmpty(item.extra.regionName)) "全国" else item.extra.regionName)
|
||||
holder.setText(R.id.tv_amount, StringUtils.formatAmount(item.extra.money))
|
||||
holder.setText(R.id.tv_rate, DecimalFormat("0.0").format(item.extra.star.toFloat()))
|
||||
|
||||
holder.setGone(R.id.tv_amount, TextUtils.isEmpty(item.extra.money))
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.cheng.bole.ui.fragment.mine.message
|
||||
|
||||
import android.graphics.Color
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.SubscriptionMessageBean
|
||||
import com.cheng.bole.databinding.FragmentMessageBinding
|
||||
import com.cheng.bole.ui.activity.PublicActivity
|
||||
import com.cheng.bole.ui.fragment.bid.detail.BidDetailFragment
|
||||
import com.cheng.bole.ui.fragment.mine.vip.VipFragment
|
||||
import com.example.base.ui.list.ListFragment
|
||||
|
||||
class MessageFragment: ListFragment<FragmentMessageBinding, MessageViewModel, SubscriptionMessageBean>() {
|
||||
private var item: SubscriptionMessageBean? = null
|
||||
|
||||
override fun noDataClick() {
|
||||
}
|
||||
|
||||
override fun bindAdapter() = MessageAdapter()
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mTitleBar?.setBackgroundColor(Color.WHITE)
|
||||
|
||||
mEmptyView.setNoDataLogo(R.mipmap.ic_empty_message)
|
||||
mEmptyView.setNoDataText("暂无消息")
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
firstLoad()
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
mAdapter.setOnItemClickListener { _, _, i ->
|
||||
item = mAdapter.getItem(i)
|
||||
mViewModel.checkAuth()
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.authLiveData.observe(this) {
|
||||
if (it.auth) {
|
||||
PublicActivity.start(
|
||||
requireContext(),
|
||||
BidDetailFragment::class.java,
|
||||
Pair("id", item!!.extra.recommend_id)
|
||||
)
|
||||
} else {
|
||||
PublicActivity.start(requireContext(), VipFragment::class.java, Pair("origin", "view_bid"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.cheng.bole.ui.fragment.mine.message
|
||||
|
||||
import androidx.collection.ArrayMap
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.SubscriptionMessageBean
|
||||
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 MessageViewModel: ListViewModel<SubscriptionMessageBean>() {
|
||||
override suspend fun requestApi(params: ArrayMap<String, String>): Result<List<SubscriptionMessageBean>> {
|
||||
return ApiFactory.apiService.getSubscriptionMessage(params).toListResult()
|
||||
}
|
||||
|
||||
val authLiveData = MutableLiveData<UserAuthBean>()
|
||||
|
||||
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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.cheng.bole.ui.fragment.mine.order
|
||||
|
||||
import android.graphics.Color
|
||||
import android.graphics.Typeface
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter
|
||||
import com.angcyo.tablayout.delegate.ViewPager1Delegate
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.databinding.FragmentOrderBinding
|
||||
import com.cheng.bole.ui.base.BasePageAdapter
|
||||
import com.cheng.bole.ui.fragment.mine.order.list.OrderListFragment
|
||||
import com.example.base.ui.BaseFragment
|
||||
|
||||
class OrderFragment: BaseFragment<FragmentOrderBinding, OrderViewModel>() {
|
||||
private val tabText = listOf("全部", "待支付", "已支付")
|
||||
private val fragmentList by lazy { mutableListOf<Fragment>() }
|
||||
private val pageAdapter by lazy {
|
||||
BasePageAdapter(
|
||||
childFragmentManager,
|
||||
tabText,
|
||||
fragmentList,
|
||||
FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
|
||||
)
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mTitleBar?.background = null
|
||||
|
||||
initFragment()
|
||||
binding.viewPager.adapter = pageAdapter
|
||||
binding.viewPager.offscreenPageLimit = fragmentList.size
|
||||
binding.tabLayout.setupViewPager(ViewPager1Delegate.install(binding.viewPager, binding.tabLayout))
|
||||
}
|
||||
|
||||
private fun initFragment() {
|
||||
fragmentList.add(OrderListFragment.newInstance(""))
|
||||
fragmentList.add(OrderListFragment.newInstance("1"))
|
||||
fragmentList.add(OrderListFragment.newInstance("2"))
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.tabLayout.observeIndexChange { fromIndex, toIndex, _, _ ->
|
||||
binding.viewPager.currentItem = toIndex
|
||||
if (fromIndex != -1) {
|
||||
(binding.tabLayout.getChildAt(fromIndex) as TextView).typeface = Typeface.DEFAULT
|
||||
(binding.tabLayout.getChildAt(fromIndex) as TextView).setBackgroundResource(R.drawable.shape_push_bid_type_default)
|
||||
}
|
||||
(binding.tabLayout.getChildAt(toIndex) as TextView).typeface = Constants.douyinsansB
|
||||
(binding.tabLayout.getChildAt(toIndex) as TextView).setBackgroundResource(R.drawable.shape_push_bid_type_checked)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
package com.cheng.bole.ui.fragment.mine.order
|
||||
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
|
||||
class OrderViewModel: BaseViewModel() {
|
||||
}
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
package com.cheng.bole.ui.fragment.mine.order.cert
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.text.TextUtils
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import coil.load
|
||||
import coil.transform.RoundedCornersTransformation
|
||||
import com.cheng.bole.bean.OrderBean
|
||||
import com.cheng.bole.databinding.FragmentCertificateBinding
|
||||
import com.cheng.bole.event.OrderEvent
|
||||
import com.cheng.bole.ui.activity.PublicActivity
|
||||
import com.cheng.bole.ui.fragment.photo.PhotoViewFragment
|
||||
import com.cheng.bole.utils.FileProviderUtils
|
||||
import com.cheng.bole.utils.PermissionUtils
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.extensions.gone
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.extensions.visible
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.utils.ClipboardUtils
|
||||
import com.example.base.utils.DensityUtils
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.JsonObject
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class CertificateFragment: BaseFragment<FragmentCertificateBinding, CertificateViewModel>() {
|
||||
private val orderId by lazy { arguments?.getString("orderId") ?: "" }
|
||||
|
||||
private var orderInfo: OrderBean? = null
|
||||
private var transInfo: OrderBean.TransInfo? = null
|
||||
|
||||
private var imagePath: String? = null
|
||||
|
||||
private val imageLauncher = registerForActivityResult(ActivityResultContracts.GetContent()) {
|
||||
it?.let {
|
||||
imagePath = FileProviderUtils.getFileAbsolutePath(requireContext(), it)
|
||||
if (!TextUtils.isEmpty(imagePath)) {
|
||||
binding.ivImage.load(imagePath) {
|
||||
transformations(RoundedCornersTransformation(DensityUtils.dp2px(8f).toFloat()))
|
||||
}
|
||||
binding.ivAddImage.gone()
|
||||
binding.ivDeleteImage.visible()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
mViewModel.getOrderInfo(orderId)
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.btnCopy.onClick {
|
||||
ClipboardUtils.copyText(orderInfo!!.pay_params)
|
||||
toast("复制成功")
|
||||
}
|
||||
|
||||
binding.ivImage.onClick {
|
||||
if (!TextUtils.isEmpty(imagePath)) {
|
||||
PublicActivity.start(requireContext(), PhotoViewFragment::class.java, Pair("photos", listOf(imagePath)))
|
||||
}
|
||||
}
|
||||
binding.ivAddImage.onClick {
|
||||
if (TextUtils.isEmpty(imagePath)) {
|
||||
PermissionUtils.checkPhotoPermission(requireActivity(), childFragmentManager) { isGranted ->
|
||||
if (isGranted) {
|
||||
imageLauncher.launch("image/*")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.ivDeleteImage.onClick {
|
||||
imagePath = null
|
||||
binding.ivImage.load("")
|
||||
binding.ivAddImage.visible()
|
||||
binding.ivDeleteImage.gone()
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
if (TextUtils.isEmpty(imagePath)) {
|
||||
toast("请上传凭证")
|
||||
return@onClick
|
||||
}
|
||||
mViewModel.uploadImg(requireContext(), imagePath!!)
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.orderLiveData.observe(this) {
|
||||
orderInfo = it
|
||||
if (!TextUtils.isEmpty(it.pay_params)) {
|
||||
transInfo = Gson().fromJson(it.pay_params, OrderBean.TransInfo::class.java)
|
||||
setTransInfo()
|
||||
}
|
||||
}
|
||||
|
||||
mViewModel.imageLiveData.observe(this) {
|
||||
val jsonObject = JsonObject()
|
||||
jsonObject.addProperty("order_id", orderId)
|
||||
jsonObject.addProperty("bank_bill_url", it.url)
|
||||
mViewModel.updateOrder(jsonObject.toString().toRequestBody())
|
||||
}
|
||||
|
||||
mViewModel.updateLiveData.observe(this) {
|
||||
toast("提交成功")
|
||||
RxBus.defaultInstance.post(OrderEvent())
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun setTransInfo() {
|
||||
if (transInfo != null) {
|
||||
binding.tvAccountName.text = transInfo!!.accountName
|
||||
binding.tvAccountNo.text = transInfo!!.accountNo
|
||||
binding.tvBankName.text = transInfo!!.bankName
|
||||
binding.tvBankNo.text = transInfo!!.bankNo
|
||||
binding.tvCode.text = orderInfo!!.id
|
||||
binding.tvAmount.text = "¥${DecimalFormat("0.00").format(orderInfo!!.total_fee.toFloat())}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.cheng.bole.ui.fragment.mine.order.cert
|
||||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.OrderBean
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.cheng.bole.utils.BitmapUtils
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||
import okhttp3.MultipartBody
|
||||
import okhttp3.RequestBody
|
||||
|
||||
class CertificateViewModel : BaseViewModel() {
|
||||
val orderLiveData = MutableLiveData<OrderBean>()
|
||||
val updateLiveData = MutableLiveData<Any>()
|
||||
val imageLiveData = MutableLiveData<UploadFileEntity>()
|
||||
|
||||
fun getOrderInfo(orderId: String) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.getOrderInfo(orderId)
|
||||
if (response.status) {
|
||||
orderLiveData.postValue(response.data)
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun updateOrder(requestBody: RequestBody) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.updateOrder(requestBody)
|
||||
if (response.status) {
|
||||
updateLiveData.postValue(Any())
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun uploadImg(context: Context, path: String) {
|
||||
showDialog()
|
||||
BitmapUtils.compressImg(context, path) {
|
||||
launchOnUiTryCatch({
|
||||
val requestFile = RequestBody.create("multipart/form-data".toMediaTypeOrNull(), it)
|
||||
val filePart = MultipartBody.Part.createFormData("file", it.getName(), requestFile)
|
||||
val response = ApiFactory.apiService.upload(filePart, "certificate")
|
||||
if (response.status) {
|
||||
imageLiveData.postValue(response.data)
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
package com.cheng.bole.ui.fragment.mine.order.invoice
|
||||
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.text.TextUtils
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.OrderBean
|
||||
import com.cheng.bole.databinding.FragmentInvoiceBinding
|
||||
import com.cheng.bole.event.OrderEvent
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.extensions.gone
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.extensions.visible
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.google.gson.JsonObject
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class InvoiceFragment : BaseFragment<FragmentInvoiceBinding, InvoiceViewModel>() {
|
||||
private var userType = 0 // 0 企业 1 个人
|
||||
private var invoiceType = 0 // 0 普票 1 专票
|
||||
|
||||
private var orderInfo: OrderBean? = null
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mTitleBar?.setBackgroundColor(Color.WHITE)
|
||||
setStyle()
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
orderInfo = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
arguments?.getSerializable("item", OrderBean::class.java)
|
||||
} else {
|
||||
arguments?.getSerializable("item") as? OrderBean
|
||||
}
|
||||
|
||||
binding.tvAmount.text = DecimalFormat("0.00").format(orderInfo!!.total_fee.toFloat())
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.rgTitleType.setOnCheckedChangeListener { _, checkedId ->
|
||||
when(checkedId) {
|
||||
R.id.rb_title1 -> {
|
||||
userType = 0
|
||||
setStyle()
|
||||
}
|
||||
R.id.rb_title2 -> {
|
||||
userType = 1
|
||||
setStyle()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
binding.rgType.setOnCheckedChangeListener { _, checkedId ->
|
||||
when(checkedId) {
|
||||
R.id.rb1 -> {
|
||||
invoiceType = 0
|
||||
setStyle()
|
||||
}
|
||||
R.id.rb2 -> {
|
||||
invoiceType = 1
|
||||
setStyle()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
binding.tv1.onClick {
|
||||
binding.rb1.isChecked = true
|
||||
}
|
||||
|
||||
binding.tv2.onClick {
|
||||
binding.rb2.isChecked = true
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
commit()
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.updateLiveData.observe(this) {
|
||||
toast("提交成功")
|
||||
RxBus.defaultInstance.post(OrderEvent())
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setStyle() {
|
||||
if (userType == 0) {
|
||||
binding.layoutType.visible()
|
||||
binding.layoutEnterpriseName.visible()
|
||||
binding.layoutEnterpriseCode.visible()
|
||||
binding.layoutUsername.gone()
|
||||
binding.layoutIdCard.gone()
|
||||
if (invoiceType == 0) {
|
||||
binding.layoutEnterpriseAddress.gone()
|
||||
binding.layoutEnterprisePhone.gone()
|
||||
binding.layoutBankName.gone()
|
||||
binding.layoutBankNo.gone()
|
||||
} else {
|
||||
binding.layoutEnterpriseAddress.visible()
|
||||
binding.layoutEnterprisePhone.visible()
|
||||
binding.layoutBankName.visible()
|
||||
binding.layoutBankNo.visible()
|
||||
}
|
||||
} else {
|
||||
binding.layoutUsername.visible()
|
||||
binding.layoutIdCard.visible()
|
||||
|
||||
binding.layoutType.gone()
|
||||
binding.layoutEnterpriseName.gone()
|
||||
binding.layoutEnterpriseCode.gone()
|
||||
binding.layoutEnterpriseAddress.gone()
|
||||
binding.layoutEnterprisePhone.gone()
|
||||
binding.layoutBankName.gone()
|
||||
binding.layoutBankNo.gone()
|
||||
}
|
||||
}
|
||||
|
||||
private fun commit() {
|
||||
val enterpriseName = binding.etEnterpriseName.text.toString().trim()
|
||||
val enterpriseCode = binding.etEnterpriseCode.toString().trim()
|
||||
val enterpriseAddress = binding.etEnterpriseAddress.text.toString().trim()
|
||||
val enterprisePhone = binding.etEnterprisePhone.text.toString().trim()
|
||||
val bankName = binding.etBankName.text.toString().trim()
|
||||
val bankNo = binding.etBankNo.text.toString().trim()
|
||||
|
||||
val username = binding.etUsername.text.toString().trim()
|
||||
val idCard = binding.etIdCard.text.toString().trim()
|
||||
|
||||
val email = binding.etEmail.text.toString().trim()
|
||||
|
||||
if (userType == 0) {
|
||||
if (TextUtils.isEmpty(enterpriseName)) {
|
||||
toast("请输入企业名称")
|
||||
return
|
||||
}
|
||||
if (TextUtils.isEmpty(enterpriseCode)) {
|
||||
toast("请输入纳税人识别号")
|
||||
return
|
||||
}
|
||||
if (invoiceType == 1) {
|
||||
if (TextUtils.isEmpty(enterpriseAddress)) {
|
||||
toast("请输入详细地址")
|
||||
return
|
||||
}
|
||||
if (TextUtils.isEmpty(enterprisePhone)) {
|
||||
toast("请输入电话号码")
|
||||
return
|
||||
}
|
||||
if (TextUtils.isEmpty(bankName)) {
|
||||
toast("请输入开户行")
|
||||
return
|
||||
}
|
||||
if (TextUtils.isEmpty(bankNo)) {
|
||||
toast("请输入开户行账户")
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (TextUtils.isEmpty(username)) {
|
||||
toast("请输入您的姓名")
|
||||
return
|
||||
}
|
||||
if (TextUtils.isEmpty(idCard)) {
|
||||
toast("请输入您的身份证号码")
|
||||
return
|
||||
}
|
||||
}
|
||||
if (TextUtils.isEmpty(email)) {
|
||||
toast("请输入邮箱地址")
|
||||
return
|
||||
}
|
||||
val jsonObject = JsonObject()
|
||||
jsonObject.addProperty("order_id", orderInfo!!.id)
|
||||
jsonObject.addProperty("invoice_status", "2")
|
||||
val paramsObj = JsonObject()
|
||||
paramsObj.addProperty("email", email)
|
||||
if (userType == 0) {
|
||||
paramsObj.addProperty("name", enterpriseName)
|
||||
paramsObj.addProperty("tax_no", enterpriseCode)
|
||||
paramsObj.addProperty("invoice_type", if (invoiceType == 0) "普票" else "专票")
|
||||
if (invoiceType == 1) {
|
||||
paramsObj.addProperty("address", enterpriseAddress)
|
||||
paramsObj.addProperty("phone", enterprisePhone)
|
||||
paramsObj.addProperty("bank", bankName)
|
||||
paramsObj.addProperty("bank_number", bankNo)
|
||||
}
|
||||
} else {
|
||||
paramsObj.addProperty("name", username)
|
||||
paramsObj.addProperty("tax_no", idCard)
|
||||
}
|
||||
jsonObject.add("invoice_params", paramsObj)
|
||||
mViewModel.updateOrder(jsonObject.toString().toRequestBody())
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.cheng.bole.ui.fragment.mine.order.invoice
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
import okhttp3.RequestBody
|
||||
|
||||
class InvoiceViewModel: BaseViewModel() {
|
||||
val updateLiveData = MutableLiveData<Any>()
|
||||
|
||||
fun updateOrder(requestBody: RequestBody) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.updateOrder(requestBody)
|
||||
if (response.status) {
|
||||
updateLiveData.postValue(Any())
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.cheng.bole.ui.fragment.mine.order.list
|
||||
|
||||
import android.graphics.Color
|
||||
import android.text.TextUtils
|
||||
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.OrderBean
|
||||
import com.cheng.bole.widget.CommonShapeView
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class OrderAdapter : BaseQuickAdapter<OrderBean, BaseViewHolder>(R.layout.listitem_order) {
|
||||
|
||||
init {
|
||||
addChildClickViewIds(R.id.btn_invoice, R.id.btn_certificate)
|
||||
}
|
||||
|
||||
override fun convert(holder: BaseViewHolder, item: OrderBean) {
|
||||
holder.setText(R.id.tv_name, item.goods_name)
|
||||
holder.setText(R.id.tv_order_no, item.out_trade_no)
|
||||
holder.setText(
|
||||
R.id.tv_pay_type,
|
||||
when (item.pay_type) {
|
||||
"weixin" -> "微信支付"
|
||||
"alipay" -> "支付宝支付"
|
||||
"apple" -> "苹果支付"
|
||||
"bank" -> "对公转账"
|
||||
else -> "未知"
|
||||
}
|
||||
)
|
||||
holder.setText(R.id.tv_amount, "¥${DecimalFormat("0.00").format(item.total_fee.toFloat())}")
|
||||
holder.setText(R.id.tv_create_time, item.create_time)
|
||||
holder.setText(R.id.tv_pay_time, item.pay_time)
|
||||
|
||||
holder.setGone(R.id.tv_pay_time_title, TextUtils.isEmpty(item.pay_time))
|
||||
holder.setGone(R.id.tv_pay_time, TextUtils.isEmpty(item.pay_time))
|
||||
|
||||
val status = holder.getView<CommonShapeView>(R.id.tv_status)
|
||||
holder.setGone(R.id.btn_invoice, true)
|
||||
holder.setGone(R.id.btn_certificate, true)
|
||||
when (item.status) {
|
||||
"1" -> {
|
||||
status.text = "待支付"
|
||||
status.setTextColor(Color.parseColor("#FF4C4C"))
|
||||
status.setBgColor(Color.parseColor("#FFEDED"))
|
||||
if (item.pay_type == "bank") {
|
||||
holder.setVisible(R.id.btn_certificate, true)
|
||||
}
|
||||
}
|
||||
|
||||
"2" -> {
|
||||
status.text = "已支付"
|
||||
status.setTextColor(Color.parseColor("#2090FE"))
|
||||
status.setBgColor(Color.parseColor("#E8F3FE"))
|
||||
if (item.invoice_status == "1") {
|
||||
holder.setVisible(R.id.btn_invoice, true)
|
||||
}
|
||||
}
|
||||
|
||||
"3" -> {
|
||||
status.text = "已退款"
|
||||
status.setTextColor(Color.parseColor("#CCCCCC"))
|
||||
status.setBgColor(Color.parseColor("#EEEEEE"))
|
||||
}
|
||||
|
||||
"4" -> {
|
||||
status.text = "已取消"
|
||||
status.setTextColor(Color.parseColor("#CCCCCC"))
|
||||
status.setBgColor(Color.parseColor("#EEEEEE"))
|
||||
}
|
||||
|
||||
"5" -> {
|
||||
status.text = "待审核"
|
||||
status.setTextColor(Color.parseColor("#FF9B2F"))
|
||||
status.setBgColor(Color.parseColor("#1AFF9B2F"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package com.cheng.bole.ui.fragment.mine.order.list
|
||||
|
||||
import android.os.Bundle
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.databinding.FragmentOrderListBinding
|
||||
import com.cheng.bole.event.OrderEvent
|
||||
import com.cheng.bole.ui.activity.PublicActivity
|
||||
import com.cheng.bole.ui.fragment.mine.order.cert.CertificateFragment
|
||||
import com.cheng.bole.ui.fragment.mine.order.invoice.InvoiceFragment
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.widget.EmptyView
|
||||
import com.example.base.widget.PageStatus
|
||||
|
||||
class OrderListFragment : BaseFragment<FragmentOrderListBinding, OrderListViewModel>() {
|
||||
private val status by lazy { arguments?.getString("status") ?: "" }
|
||||
|
||||
private val mAdapter by lazy { OrderAdapter() }
|
||||
private val mEmptyView by lazy { EmptyView(requireContext()) }
|
||||
|
||||
companion object {
|
||||
fun newInstance(status: String): OrderListFragment {
|
||||
val args = Bundle()
|
||||
args.putString("status", status)
|
||||
val fragment = OrderListFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
|
||||
binding.mRecyclerView.adapter = mAdapter
|
||||
mEmptyView.setNoDataLogo(R.mipmap.ic_empty_order)
|
||||
mEmptyView.setNoDataText("暂无订单")
|
||||
mAdapter.setEmptyView(mEmptyView)
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
mViewModel.getOrderList(status)
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.mRefreshLayout.setOnRefreshListener {
|
||||
mViewModel.getOrderList(status)
|
||||
}
|
||||
|
||||
mAdapter.setOnItemChildClickListener { _, view, i ->
|
||||
val item = mAdapter.getItem(i)
|
||||
when (view.id) {
|
||||
R.id.btn_invoice -> {
|
||||
PublicActivity.start(requireContext(), InvoiceFragment::class.java, Pair("item", item))
|
||||
}
|
||||
|
||||
R.id.btn_certificate -> {
|
||||
PublicActivity.start(requireContext(), CertificateFragment::class.java, Pair("orderId", item.id))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.orderLiveData.observe(this) {
|
||||
mAdapter.setList(it)
|
||||
if (it.isNotEmpty()) {
|
||||
mEmptyView.setStatus(PageStatus.GONG)
|
||||
} else {
|
||||
mEmptyView.setStatus(PageStatus.NO_DATA)
|
||||
}
|
||||
binding.mRefreshLayout.finishRefresh()
|
||||
}
|
||||
|
||||
val orderEvent = RxBus.defaultInstance.toObservable(OrderEvent::class.java).subscribe {
|
||||
binding.mRefreshLayout.autoRefresh()
|
||||
}
|
||||
addDisposable(orderEvent)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.cheng.bole.ui.fragment.mine.order.list
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.OrderBean
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
|
||||
class OrderListViewModel : BaseViewModel() {
|
||||
val orderLiveData = MutableLiveData<List<OrderBean>>()
|
||||
|
||||
fun getOrderList(status: String) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.getOrderList(status)
|
||||
if (response.status) {
|
||||
orderLiveData.postValue(response.data)
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.cheng.bole.ui.fragment.mine.seat
|
||||
|
||||
import android.text.TextUtils
|
||||
import android.widget.ImageView
|
||||
import coil.load
|
||||
import coil.transform.CircleCropTransformation
|
||||
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.SeatItemBean
|
||||
|
||||
class SeatManageAdapter: BaseQuickAdapter<SeatItemBean, BaseViewHolder>(R.layout.listitem_seat_manage) {
|
||||
|
||||
init {
|
||||
addChildClickViewIds(R.id.btn_delete)
|
||||
}
|
||||
|
||||
override fun convert(holder: BaseViewHolder, item: SeatItemBean) {
|
||||
holder.getView<ImageView>(R.id.iv_avatar).load(item.avatar) {
|
||||
transformations(CircleCropTransformation())
|
||||
}
|
||||
holder.setText(R.id.tv_name, item.user_name)
|
||||
if (!TextUtils.isEmpty(item.phone)) {
|
||||
holder.setText(R.id.tv_phone, item.phone.replaceRange(3, 7, "****"))
|
||||
} else {
|
||||
holder.setText(R.id.tv_phone, "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
package com.cheng.bole.ui.fragment.mine.seat
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.CorpInfoBean
|
||||
import com.cheng.bole.databinding.FragmentSeatManageBinding
|
||||
import com.cheng.bole.event.PaySuccessEvent
|
||||
import com.cheng.bole.manager.DialogEnum
|
||||
import com.cheng.bole.ui.dialog.BuySeatDialog
|
||||
import com.cheng.bole.ui.dialog.SeatAuthDialog
|
||||
import com.cheng.bole.ui.dialog.TipDialog
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.widget.EmptyView
|
||||
import com.example.base.widget.PageStatus
|
||||
import com.google.gson.JsonObject
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
|
||||
class SeatManageFragment: BaseFragment<FragmentSeatManageBinding, SeatManageViewModel>() {
|
||||
private val mEmptyView by lazy { EmptyView(requireContext()) }
|
||||
private val mAdapter by lazy { SeatManageAdapter() }
|
||||
|
||||
private var corpInfo: CorpInfoBean? = null
|
||||
|
||||
private var seatDialog: BuySeatDialog? = null
|
||||
private var dismissDialog = false
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mTitleBar?.background = null
|
||||
|
||||
binding.mRecyclerView.adapter = mAdapter
|
||||
mEmptyView.setNoDataText("暂无数据")
|
||||
mEmptyView.setNoDataLogo(R.mipmap.ic_empty_seat)
|
||||
mAdapter.setEmptyView(mEmptyView)
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
mViewModel.getCorpInfo()
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.tvAdd.onClick {
|
||||
mViewModel.getGoodsList()
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
if (corpInfo!!.sub_user_limit > corpInfo!!.bind_count) {
|
||||
showSeatAuthDialog()
|
||||
} else {
|
||||
mViewModel.getGoodsList()
|
||||
}
|
||||
}
|
||||
|
||||
mAdapter.setOnItemChildClickListener { _, view, i ->
|
||||
val item = mAdapter.getItem(i)
|
||||
when(view.id) {
|
||||
R.id.btn_delete -> {
|
||||
val f = TipDialog.newInstance("解除席位授权", "是否解除尾号${item.phone.substring(7)}的用户席位?")
|
||||
f.setOnSelectListener {
|
||||
if (it == DialogEnum.CLICK_OK) {
|
||||
mViewModel.deleteSeat(item.id)
|
||||
}
|
||||
}
|
||||
f.show(childFragmentManager, TipDialog::class.java.simpleName)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.corpInfoLiveData.observe(this) {
|
||||
corpInfo = it
|
||||
mViewModel.getSeatList()
|
||||
}
|
||||
|
||||
mViewModel.seatListLiveData.observe(this) {
|
||||
mAdapter.setList(it)
|
||||
binding.tvCount.text = "当前席位(${it.size}/${corpInfo!!.sub_user_limit})"
|
||||
if (it.isNotEmpty()) {
|
||||
mEmptyView.setStatus(PageStatus.GONG)
|
||||
} else {
|
||||
mEmptyView.setStatus(PageStatus.NO_DATA)
|
||||
}
|
||||
}
|
||||
|
||||
mViewModel.addLiveData.observe(this) {
|
||||
toast("授权成功")
|
||||
mViewModel.getSeatList()
|
||||
}
|
||||
|
||||
mViewModel.deleteLiveData.observe(this) {
|
||||
toast("解除成功")
|
||||
mViewModel.getSeatList()
|
||||
}
|
||||
|
||||
mViewModel.goodsLiveData.observe(this) {
|
||||
if (it.isNotEmpty()) {
|
||||
seatDialog = BuySeatDialog.newInstance(it[0])
|
||||
seatDialog!!.show(childFragmentManager, "")
|
||||
} else {
|
||||
toast("获取商品失败,请稍后再试")
|
||||
}
|
||||
}
|
||||
|
||||
val paySuccessEvent = RxBus.defaultInstance.toObservable(PaySuccessEvent::class.java).subscribe {
|
||||
dismissDialog = true
|
||||
if (!isStateSaved) dismissSeatDialog()
|
||||
mViewModel.getCorpInfo()
|
||||
}
|
||||
addDisposable(paySuccessEvent)
|
||||
}
|
||||
|
||||
private fun showSeatAuthDialog() {
|
||||
val f = SeatAuthDialog.newInstance()
|
||||
f.setOnSelectListener { phone ->
|
||||
val jsonObject = JsonObject()
|
||||
jsonObject.addProperty("phone", phone)
|
||||
mViewModel.addSeat(jsonObject.toString().toRequestBody())
|
||||
}
|
||||
f.show(childFragmentManager, "")
|
||||
}
|
||||
|
||||
private fun dismissSeatDialog() {
|
||||
if (dismissDialog) {
|
||||
seatDialog?.dismiss()
|
||||
seatDialog = null
|
||||
dismissDialog = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
dismissSeatDialog()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package com.cheng.bole.ui.fragment.mine.seat
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.CorpInfoBean
|
||||
import com.cheng.bole.bean.SeatItemBean
|
||||
import com.cheng.bole.bean.VipGoodsEntity
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
import okhttp3.RequestBody
|
||||
|
||||
class SeatManageViewModel: BaseViewModel() {
|
||||
val goodsLiveData = MutableLiveData<List<VipGoodsEntity>>()
|
||||
val corpInfoLiveData = MutableLiveData<CorpInfoBean>()
|
||||
val seatListLiveData = MutableLiveData<List<SeatItemBean>>()
|
||||
val addLiveData = MutableLiveData<Any>()
|
||||
val deleteLiveData = MutableLiveData<Any>()
|
||||
|
||||
fun getGoodsList() {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.getGoodsList("corp_add")
|
||||
if (response.status) {
|
||||
goodsLiveData.postValue(response.data)
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun getCorpInfo() {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.getSeatInfo()
|
||||
if (response.status) {
|
||||
corpInfoLiveData.postValue(response.data)
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun getSeatList() {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.getSeatList()
|
||||
if (response.status) {
|
||||
seatListLiveData.postValue(response.data.items)
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun addSeat(requestBody: RequestBody) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.addSeat(requestBody)
|
||||
if (response.status) {
|
||||
addLiveData.postValue(Any())
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun deleteSeat(id: String) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.deleteSeat(id)
|
||||
if (response.status) {
|
||||
deleteLiveData.postValue(Any())
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -16,13 +16,16 @@ import com.cheng.bole.ui.dialog.TipDialog
|
|||
import com.cheng.bole.ui.fragment.mine.about.AboutFragment
|
||||
import com.cheng.bole.ui.fragment.mine.account.AccountManageFragment
|
||||
import com.cheng.bole.ui.fragment.mine.account.BindAccountFragment
|
||||
import com.cheng.bole.utils.AppUpdateUtils
|
||||
import com.cheng.bole.utils.DataCacheUtils
|
||||
import com.cheng.bole.utils.FileUtils
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.extensions.gone
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.extensions.visible
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.utils.AppUtils
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
|
@ -52,11 +55,16 @@ class SettingsFragment : BaseFragment<FragmentSettingsBinding, SettingsViewModel
|
|||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
binding.tvCacheSize.text = com.cheng.bole.utils.FileUtils.toFileSize(DataCacheUtils.getCacheSize())
|
||||
binding.tvCacheSize.text = FileUtils.toFileSize(DataCacheUtils.getCacheSize())
|
||||
binding.tvVersion.text = "v${AppUtils.getAppVersionName()}"
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.layoutUpdate.onClick {
|
||||
AppUpdateUtils.checkUpdate(this, false) {}
|
||||
}
|
||||
|
||||
binding.tvAbout.onClick {
|
||||
PublicActivity.start(requireContext(), AboutFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_ABOUT_US, "", "")
|
||||
|
|
@ -80,7 +88,7 @@ class SettingsFragment : BaseFragment<FragmentSettingsBinding, SettingsViewModel
|
|||
}
|
||||
binding.layoutCache.onClick {
|
||||
clearCache()
|
||||
binding.tvCacheSize.text = com.cheng.bole.utils.FileUtils.toFileSize(DataCacheUtils.getCacheSize())
|
||||
binding.tvCacheSize.text = FileUtils.toFileSize(DataCacheUtils.getCacheSize())
|
||||
EventReportManager.eventReport(EventConstants.CLEAR_CACHE, "mine", "")
|
||||
}
|
||||
binding.btnLogout.onClick {
|
||||
|
|
@ -121,8 +129,8 @@ class SettingsFragment : BaseFragment<FragmentSettingsBinding, SettingsViewModel
|
|||
DataCacheUtils.cleanInternalCache()
|
||||
withContext(Dispatchers.Main) {
|
||||
mViewModel.dismissDialog()
|
||||
toast("已清除缓存,释放空间 ${com.cheng.bole.utils.FileUtils.toFileSize(cacheSize)}")
|
||||
binding.tvCacheSize.text = com.cheng.bole.utils.FileUtils.toFileSize(DataCacheUtils.getCacheSize())
|
||||
toast("已清除缓存,释放空间 ${FileUtils.toFileSize(cacheSize)}")
|
||||
binding.tvCacheSize.text = FileUtils.toFileSize(DataCacheUtils.getCacheSize())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ import com.cheng.bole.event.PaySuccessEvent
|
|||
import com.cheng.bole.manager.EventReportManager
|
||||
import com.cheng.bole.manager.LoginManager
|
||||
import com.cheng.bole.manager.UserConfigManager
|
||||
import com.cheng.bole.ui.activity.PublicActivity
|
||||
import com.cheng.bole.ui.dialog.PayTipDialog
|
||||
import com.cheng.bole.ui.fragment.mine.order.cert.CertificateFragment
|
||||
import com.cheng.bole.utils.DateUtils
|
||||
import com.cheng.bole.utils.UrlHelper
|
||||
import com.cheng.bole.utils.pay.PayUtils
|
||||
|
|
@ -299,7 +301,7 @@ class VipFragment : BaseFragment<FragmentVipBinding, VipViewModel>() {
|
|||
} else if (payType == 1) {
|
||||
PayUtils.toAliPay(requireActivity(), it.payParam, "")
|
||||
} else {
|
||||
// PublicActivity.start(requireContext(), CertificateFragment::class.java, Pair("orderId", orderEntity!!.orderId))
|
||||
PublicActivity.start(requireContext(), CertificateFragment::class.java, Pair("orderId", orderEntity!!.orderId))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
package com.cheng.bole.utils
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.cheng.bole.BuildConfig
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.VersionEntity
|
||||
import com.cheng.bole.manager.UserConfigManager
|
||||
import com.cheng.bole.ui.dialog.UpdateVersionDialog
|
||||
import com.example.base.extensions.toast
|
||||
|
||||
object AppUpdateUtils {
|
||||
|
||||
fun checkUpdate(fragment: Fragment, isManual: Boolean, clickFun: () -> Unit?) {
|
||||
|
||||
if (isManual) {
|
||||
toast(fragment.getString(R.string.check_version_ing))
|
||||
}
|
||||
|
||||
val result: VersionEntity? = UserConfigManager.userConfig?.config?.versionEntity
|
||||
result?.apply {
|
||||
if (UIUtils.checkVersion(version, BuildConfig.VERSION_NAME)) {
|
||||
if (last_version_force == BuildConfig.VERSION_NAME) {
|
||||
force = true
|
||||
} else if (UIUtils.checkVersion(last_version_force, BuildConfig.VERSION_NAME)) {
|
||||
force = true
|
||||
}
|
||||
clickFun.invoke()
|
||||
startUpdate(result, fragment)
|
||||
} else {
|
||||
if (isManual) {
|
||||
toast(fragment.getString(R.string.curr_new_version))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun startUpdate(versionEntity: VersionEntity, fragment: Fragment) {
|
||||
UpdateVersionDialog.newInstance(versionEntity).show(fragment.childFragmentManager, null)
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import android.text.TextUtils
|
|||
import com.example.base.utils.SpanUtils
|
||||
import java.security.MessageDigest
|
||||
import java.security.NoSuchAlgorithmException
|
||||
import java.text.DecimalFormat
|
||||
import java.text.ParseException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Calendar
|
||||
|
|
@ -470,6 +471,29 @@ object StringUtils {
|
|||
return spanUtils.create()
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化金额
|
||||
*
|
||||
* @param str 金额字符串
|
||||
*/
|
||||
fun formatAmount(str: String): String {
|
||||
if (!isNumeric(str)) return str
|
||||
try {
|
||||
val formatter = DecimalFormat("0.00")
|
||||
val amount = str.toFloat()
|
||||
if (amount > 100000000) {
|
||||
return "${formatter.format(amount / 100000000)}亿元"
|
||||
} else if (amount > 10000) {
|
||||
return "${formatter.format(amount / 10000)}万元"
|
||||
} else {
|
||||
return "${formatter.format(amount)}元"
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
/**
|
||||
* 将字符串中的unicode字符转换为中文字符
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,4 +17,16 @@ object UrlHelper {
|
|||
fun startRenewAgreement(context: Context) {
|
||||
BrowserActivity.start(context, "自动续费服务规则", Constants.renewAgreement)
|
||||
}
|
||||
|
||||
fun startPermissionList(context: Context) {
|
||||
BrowserActivity.start(context, "权限说明", Constants.permissionList)
|
||||
}
|
||||
|
||||
fun startShareList(context: Context) {
|
||||
BrowserActivity.start(context, "第三方共享清单", Constants.shareList)
|
||||
}
|
||||
|
||||
fun startSDKList(context: Context) {
|
||||
BrowserActivity.start(context, "第三方SDK目录", Constants.sdkList)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_222222" android:state_checked="false" />
|
||||
</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="@drawable/shape_invoice_title_checked" android:state_checked="true" />
|
||||
<item android:drawable="@drawable/shape_invoice_title_default" android:state_checked="false" />
|
||||
</selector>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FE7C12" />
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_8"
|
||||
android:topRightRadius="@dimen/dp_8" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/color_125ffe" />
|
||||
<corners
|
||||
android:bottomRightRadius="@dimen/dp_8"
|
||||
android:topLeftRadius="@dimen/dp_8" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_4"/>
|
||||
<stroke android:color="@color/color_eeeeee" android:width="@dimen/dp_1"/>
|
||||
</shape>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#FF8340" />
|
||||
<size
|
||||
android:width="@dimen/dp_4"
|
||||
android:height="@dimen/dp_4" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_25" />
|
||||
<stroke
|
||||
android:width="@dimen/dp_1"
|
||||
android:color="@color/color_125ffe" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_25" />
|
||||
<solid android:color="@color/color_f5f5f5" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_8" />
|
||||
<solid android:color="@color/white" />
|
||||
<stroke
|
||||
android:width="@dimen/dp_1"
|
||||
android:color="@color/color_dfdfdf" />
|
||||
</shape>
|
||||
|
|
@ -2,59 +2,72 @@
|
|||
<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"
|
||||
android:background="@drawable/shape_white_top_cor20">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="绑定手机号"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:padding="@dimen/dp_3"
|
||||
android:src="@mipmap/ic_close"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_title"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:src="@mipmap/ic_close_dialog2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_title" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:background="@mipmap/ic_bind_phone_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_close">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_44"
|
||||
android:text="绑定手机号"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_18"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="享受一键快捷登录~"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title">
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_desc">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dfdfdf_line_cor8"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/shape_white_line_cor8"
|
||||
android:hint="请输入手机号"
|
||||
android:inputType="number"
|
||||
android:lineSpacingExtra="@dimen/dp_5"
|
||||
android:maxLength="11"
|
||||
android:padding="@dimen/dp_14"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="@dimen/dp_14"
|
||||
android:paddingEnd="@dimen/dp_14"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
@ -75,24 +88,27 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_phone">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:background="@drawable/shape_dfdfdf_line_cor8"
|
||||
android:background="@drawable/shape_white_line_cor8"
|
||||
android:hint="请输入验证码"
|
||||
android:inputType="number"
|
||||
android:lineSpacingExtra="@dimen/dp_5"
|
||||
android:maxLength="6"
|
||||
android:padding="@dimen/dp_14"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="@dimen/dp_14"
|
||||
android:paddingEnd="@dimen/dp_14"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
|
@ -103,41 +119,43 @@
|
|||
<TextView
|
||||
android:id="@+id/tv_send_code"
|
||||
android:layout_width="@dimen/dp_110"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_dfdfdf_line_cor8"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/shape_white_line_cor8"
|
||||
android:gravity="center"
|
||||
android:text="获取验证码"
|
||||
android:textColor="@color/color_125ffe"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/et_code"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/et_code" />
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/color_e8e8e8"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_bottom" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_46"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_code">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:csb_activeEnable="true"
|
||||
app:csb_cornerRadius="@dimen/dp_50"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintDimensionRatio="h,351:46"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,222 @@
|
|||
<?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_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:src="@mipmap/ic_close_dialog2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:background="@mipmap/ic_seat_auth_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_close">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_44"
|
||||
android:text="购买席位"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_18"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="请按需购买~"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
android:id="@+id/layout_goods"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_7"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_desc">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:paddingTop="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_16"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_seat_dialog_icon"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:text="增加席位"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_origin_price"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_origin_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:text="480元/个"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_icon"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="¥100.00"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_20"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_eeeeee_cor4"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_icon"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_subtract"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_4"
|
||||
android:src="@mipmap/ic_subtract_count_disable" />
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_eeeeee" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:minWidth="@dimen/dp_36"
|
||||
android:text="1"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_eeeeee" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_4"
|
||||
android:src="@mipmap/ic_add_count" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.lihang.ShadowLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_wx_pay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:drawableStart="@mipmap/ic_wx_pay"
|
||||
android:drawableEnd="@mipmap/ic_pay_default3"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:text="微信支付"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_goods" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ali_pay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:drawableStart="@mipmap/ic_ali_pay"
|
||||
android:drawableEnd="@mipmap/ic_pay_checked3"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:text="支付宝支付"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_wx_pay" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:background="@color/color_eeeeee"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_ali_pay" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line2">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_pay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="立即支付"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_text">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
|
|
|
|||
|
|
@ -0,0 +1,114 @@
|
|||
<?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_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:src="@mipmap/ic_close_dialog2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:background="@mipmap/ic_seat_auth_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_close">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_44"
|
||||
android:text="席位授权"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_18"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="请谨慎操作~"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_white_line_cor8"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入授权者手机号"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:singleLine="true"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_desc" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_50"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_50"
|
||||
android:gravity="center"
|
||||
android:text="注:授权者需提前到设置-绑定账号-手机号绑定才能正常授权"
|
||||
android:textColor="@color/color_999999"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_phone" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:background="@color/color_eeeeee"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_tip" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintDimensionRatio="h,351:46"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintTop_toBottomOf="@id/mRecyclerView">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintTop_toBottomOf="@id/mRecyclerView">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintTop_toBottomOf="@id/mRecyclerView">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
|
|
|
|||
|
|
@ -2,8 +2,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:background="@color/white"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
|
|
@ -53,26 +53,26 @@
|
|||
android:id="@+id/tvAgreement"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:drawableEnd="@mipmap/ic_arrow_dp16"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:paddingTop="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:text="用户协议"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvVersionName"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/tvVersionName" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:id="@+id/view_line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@color/color_eff2f7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAgreement"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAgreement" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPolicy"
|
||||
|
|
@ -87,6 +87,78 @@
|
|||
android:text="隐私政策"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@color/color_eff2f7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPolicy" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_permission_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:drawableEnd="@mipmap/ic_arrow_dp16"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:text="权限说明"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line2" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@color/color_eff2f7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_permission_list" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_share_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:drawableEnd="@mipmap/ic_arrow_dp16"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:text="第三方共享清单"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line3" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@color/color_eff2f7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_share_list" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sdk_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:drawableEnd="@mipmap/ic_arrow_dp16"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:text="第三方SDK目录"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line4" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -18,9 +18,8 @@
|
|||
android:id="@+id/rv_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@
|
|||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
|
@ -417,7 +417,7 @@
|
|||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_base_info">
|
||||
|
||||
|
|
@ -592,7 +592,7 @@
|
|||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
|
|
|
|||
|
|
@ -0,0 +1,382 @@
|
|||
<?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="match_parent">
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title="发票管理" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_bottom"
|
||||
app:layout_constraintTop_toBottomOf="@id/mTitleBar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:background="#FFF5DA"
|
||||
android:drawableStart="@mipmap/ic_worning"
|
||||
android:drawablePadding="@dimen/dp_6"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_8"
|
||||
android:paddingEnd="@dimen/dp_8"
|
||||
android:text="若上传了支付凭证我们会在24小时内处理并发放权益!"
|
||||
android:textColor="#FE9534"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
app:hl_layoutBackground="#FFF5F3"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:hl_strokeColor="@color/white"
|
||||
app:hl_strokeWith="@dimen/dp_1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_32"
|
||||
android:gravity="center_vertical"
|
||||
android:text="重点:请在银行做对公转账提交前,复制下方【一键复制转账信息】到转账备注里面后,提交转账截图上传至【支付凭证】。便于我们审核核验,否者无法找到您的订单信息,造成【会员权益】无法发放。!"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</com.lihang.ShadowLayout>
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginTop="-30dp"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_16">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="收款单位"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_account_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="重庆元里千禾科技有限公司"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="银行账号"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_account_no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="8888 8883 7345 2463"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="开户银行"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bank_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="浙江网商银行"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="银行行号"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bank_no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="323331000001"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="转账金额"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="¥398.00"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="订单识别码"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="1071759"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_copy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:text="一键复制转账信息"
|
||||
android:textColor="#337DFF"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:csb_cornerRadius="@dimen/dp_25"
|
||||
app:csb_fillColor="#F4F8FF" />
|
||||
</LinearLayout>
|
||||
</com.lihang.ShadowLayout>
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
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_10"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_20">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_add_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_image"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:background="@drawable/shape_dfdfdf_line_cor8"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_add_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/ic_add_feedback_image"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_image"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_image"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_image"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_image" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_delete_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_delete_feedback_img"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_image"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_image" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:background="@mipmap/ic_cert_divider" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="转账截图需包含以下信息:"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:lineSpacingExtra="@dimen/dp_8"
|
||||
android:text="1.转账日期和时间;\n2.转账流水号/交易编号;\n3.付款/收款方信息;\n4.转账金额;\n5.转账状态;\n6.电子印章或银行水印;"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="注:若已对公转账,请点上传支付截图;"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
</com.lihang.ShadowLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_e8e8e8"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_bottom" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="提交"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,389 @@
|
|||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nestedScrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_bottom"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_top_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_company_auth_top_bg"
|
||||
app:layout_constraintDimensionRatio="h,1125:752"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:layout_marginTop="@dimen/dp_110"
|
||||
android:text="企业认证"
|
||||
android:textColor="#000511"
|
||||
android:textSize="@dimen/sp_30"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="提高信息曝光率"
|
||||
android:textColor="#72757E"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<eightbitlab.com.blurview.BlurView
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="178dp"
|
||||
android:background="@drawable/shape_trans_top_line_cor20"
|
||||
android:paddingStart="@dimen/dp_9"
|
||||
android:paddingTop="@dimen/dp_13"
|
||||
android:paddingEnd="@dimen/dp_9"
|
||||
app:blurOverlayColor="#4DFFFFFF"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
android:id="@+id/layout_reject_reason"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
app:hl_layoutBackground="#FFF5F3"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:hl_strokeColor="@color/white"
|
||||
app:hl_strokeWith="@dimen/dp_1">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_16">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@mipmap/ic_auth_fail"
|
||||
android:drawablePadding="@dimen/dp_6"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="认证失败"
|
||||
android:textColor="@color/color_ff592b"
|
||||
android:textSize="@dimen/sp_18"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_reason"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:text="理由:图片不符合"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_status" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.lihang.ShadowLayout>
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_info_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="企业信息"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/dp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_info_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_info_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="企业名称"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_name" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_info_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="公司所在地"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_area"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_area" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:drawableEnd="@mipmap/ic_arrow_dp18"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_area_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_contacts_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="联系方式"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_area" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_contacts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_add_contacts"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_contacts_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_area" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_add_contacts"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_select_contacts"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_contacts_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_contacts_title" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_contacts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:overScrollMode="never"
|
||||
android:visibility="gone"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_add_contacts"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_contacts_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_area"
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/listitem_publish_bid_contacts" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.lihang.ShadowLayout>
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_16">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_license_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="营业执照"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/dp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_license_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_license_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_image_limit_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:text="上传营业执照,80%的用户会点击查看"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_license_title"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_license_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_license_title" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_add_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_license_title">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_image"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:background="@drawable/shape_dfdfdf_line_cor8"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_add_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/ic_add_feedback_image"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_image"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_image"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_image"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_image" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_delete_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_delete_feedback_img"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_image"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_image" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.lihang.ShadowLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_15" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</eightbitlab.com.blurview.BlurView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title=" " />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="提交"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_favorite_top_bg"
|
||||
app:layout_constraintDimensionRatio="h,1125:661"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app: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_7"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/mTitleBar">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/listitem_bid" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title">
|
||||
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_type">
|
||||
|
||||
|
|
@ -239,7 +239,7 @@
|
|||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_content">
|
||||
|
||||
|
|
@ -300,7 +300,7 @@
|
|||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@mipmap/ic_favorite_top_bg"
|
||||
app:layout_constraintDimensionRatio="h,1125:661"/>
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app: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_7"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/mTitleBar">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/listitem_bid" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,749 @@
|
|||
<?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="match_parent">
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title="发票管理" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_bottom"
|
||||
app:layout_constraintTop_toBottomOf="@id/mTitleBar">
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_5"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/mTitleBar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_title_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title_type_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="抬头类型"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_title_type_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_title_type_title" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_title_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title_type_title">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_title1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_invoice_title_rb"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:text="企业"
|
||||
android:textColor="@drawable/selector_invoice_title_color"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_title2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_invoice_title_rb"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:text="个人"
|
||||
android:textColor="@drawable/selector_invoice_title_color"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</RadioGroup>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="发票类型"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_type_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_type_title" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_type_title">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb1"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:background="@drawable/selector_rb"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:textColor="@color/color_1a1a1a" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:text="普票"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb2"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:background="@drawable/selector_rb"
|
||||
android:button="@null"
|
||||
android:textColor="@color/color_1a1a1a" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:text="专票"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</RadioGroup>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/rg_type"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_enterprise_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_enterprise_name_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="企业名称"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_enterprise_name_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_enterprise_name_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_enterprise_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:hint="请输入企业名称"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_enterprise_name_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_enterprise_name"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_enterprise_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_enterprise_code_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="信用代码"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_enterprise_code_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_enterprise_code_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_enterprise_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:digits="01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
|
||||
android:hint="请输入纳税人识别号"
|
||||
android:maxLength="18"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_enterprise_code_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_enterprise_code"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_enterprise_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_enterprise_address_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="注册地址"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_enterprise_address_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_enterprise_address_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_enterprise_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:hint="请输入详细地址"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_enterprise_address_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_enterprise_address"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_enterprise_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_enterprise_phone_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="电话号码"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_enterprise_phone_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_enterprise_phone_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_enterprise_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:hint="请输入电话号码"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_enterprise_phone_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_enterprise_phone"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bank_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bank_name_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="开户行"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_bank_name_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_bank_name_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_bank_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:hint="请输入开户行"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_bank_name_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_bank_name"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bank_no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bank_no_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="开户行账户"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_bank_no_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_bank_no_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_bank_no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:hint="请输入开户行账户"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_bank_no_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_bank_no"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_username_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="姓名"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_username_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_username_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:hint="请输入您的姓名"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_username_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_username"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_id_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_id_card_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="身份证号"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_id_card_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_id_card_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_id_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:digits="0123456789Xx"
|
||||
android:hint="请输入您的身份证号码"
|
||||
android:inputType=""
|
||||
android:maxLength="18"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_id_card_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_id_card"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="发票内容"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_content_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_content_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="“伯乐招标”软件服务"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_content_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_content"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="发票金额"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_amount_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_amount_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="1.00"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_amount_title" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:text="元"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_amount"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_amount" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_amount"
|
||||
android:background="@color/color_eaeaea" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_16">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_email_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="电子邮箱"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_email_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_email_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:hint="用于向您发送电子发票"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_email_title" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.lihang.ShadowLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="提交"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
|
@ -153,7 +153,7 @@
|
|||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_goods_info">
|
||||
|
||||
|
|
@ -235,7 +235,7 @@
|
|||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_company_info">
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title="订阅消息" />
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/mRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/mTitleBar">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/listitem_message" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<?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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@mipmap/ic_favorite_top_bg"
|
||||
app:layout_constraintDimensionRatio="h,1125:661"/>
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title="订单"/>
|
||||
|
||||
<com.angcyo.tablayout.DslTabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/mTitleBar"
|
||||
app:tab_deselect_color="@color/color_1a1a1a"
|
||||
app:tab_draw_indicator="false"
|
||||
app:tab_enable_gradient_text_size="false"
|
||||
app:tab_enable_text_bold="false"
|
||||
app:tab_item_auto_equ_width="false"
|
||||
app:tab_select_color="@color/color_125ffe"
|
||||
app:tab_text_max_size="@dimen/sp_16"
|
||||
app:tab_text_min_size="@dimen/sp_14">
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_54"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:background="@drawable/shape_white_cor6"
|
||||
android:gravity="center"
|
||||
android:text="全部" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_54"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:background="@drawable/shape_white_cor6"
|
||||
android:gravity="center"
|
||||
android:text="待支付" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_54"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:background="@drawable/shape_white_cor6"
|
||||
android:gravity="center"
|
||||
android:text="已支付" />
|
||||
|
||||
</com.angcyo.tablayout.DslTabLayout>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tabLayout" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/mRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/listitem_order" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
@ -342,7 +342,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
@ -604,7 +604,7 @@
|
|||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
@ -393,7 +393,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hl_cornerRadius="@dimen/dp_12"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
@ -509,7 +509,7 @@
|
|||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
android:visibility="gone"
|
||||
app:hl_layoutBackground="@color/white"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_search">
|
||||
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
app:hl_layoutBackground="@color/white"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_goneMarginTop="@dimen/dp_13"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_history">
|
||||
|
|
@ -218,7 +218,7 @@
|
|||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
app:hl_layoutBackground="@color/white"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_recommend">
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,82 @@
|
|||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_favorite_top_bg"
|
||||
app:layout_constraintDimensionRatio="h,1125:661"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title=" ">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count"
|
||||
style="@style/_titleTextAppearance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="当前席位(0/3)" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:drawableStart="@mipmap/ic_shopping_cart"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:text="购买席位"
|
||||
android:textColor="@color/color_125ffe"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold" />
|
||||
</com.example.base.widget.TitleBar>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_bottom"
|
||||
app:layout_constraintTop_toBottomOf="@id/mTitleBar"
|
||||
tools:listitem="@layout/listitem_seat_manage" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="添加授权"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -55,13 +55,14 @@
|
|||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:background="@color/windowBackground" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_cache"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_16">
|
||||
|
|
@ -93,6 +94,49 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@color/color_eff2f7" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_update"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_16">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="版本更新"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableEnd="@mipmap/ic_arrow_dp16"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:text="v1.0.0"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
|
|
@ -143,19 +187,18 @@
|
|||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_logout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="退出登录"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:csb_activeEnable="true"
|
||||
app:csb_cornerRadius="@dimen/dp_50"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@
|
|||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_recommend_title">
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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_marginTop="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:background="@drawable/shape_white_cor6"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_16">
|
||||
app:hl_cornerRadius="@dimen/dp_8"
|
||||
app:hl_shadowColor="#1a9399a1"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:background="@color/color_dce4f3"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_id_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:text="ID:74945"
|
||||
android:textColor="#FFF5ED"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_id_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:text="ID:74945"
|
||||
android:textColor="#E4EDFD"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_current_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/shape_current_account_bg"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_7"
|
||||
android:paddingEnd="@dimen/dp_7"
|
||||
android:text="当前登录"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_change_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/shape_change_account_bg"
|
||||
android:drawableEnd="@mipmap/ic_change_account"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:text="切换"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_title">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:src="@mipmap/ic_default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
|
@ -22,81 +96,37 @@
|
|||
android:id="@+id/tv_username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_150"
|
||||
android:singleLine="true"
|
||||
android:text="白芷"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_user_id"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_vip_tag"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_vip_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="-9dp"
|
||||
android:background="@drawable/shape_466afd_cor25"
|
||||
android:paddingStart="@dimen/dp_5"
|
||||
android:paddingTop="@dimen/dp_1"
|
||||
android:paddingEnd="@dimen/dp_5"
|
||||
android:paddingBottom="@dimen/dp_1"
|
||||
android:text="月会员"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:src="@mipmap/ic_vip_tag1"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ID:74945"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_username"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_username" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_current_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/shape_ff8340_circle_dp4"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:text="当前账号"
|
||||
android:textColor="#FF8340"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_username"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_username" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_change_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableEnd="@mipmap/ic_change_account"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:text="切换"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_username"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_username" />
|
||||
app:layout_constraintStart_toEndOf="@id/tv_username"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_user_id"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_user_id">
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bind_phone"
|
||||
|
|
@ -113,5 +143,8 @@
|
|||
app:layout_constraintStart_toEndOf="@id/iv_bind_phone" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.lihang.ShadowLayout>
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
app:hl_cornerRadius="@dimen/dp_8"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_8"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
|
|||
|
|
@ -0,0 +1,151 @@
|
|||
<?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">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:paddingStart="@dimen/dp_8"
|
||||
android:paddingEnd="@dimen/dp_8"
|
||||
android:text="17:38"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="#D3D3D3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
app:hl_cornerRadius="@dimen/dp_8"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_time"
|
||||
app:layout_goneMarginTop="@dimen/dp_10">
|
||||
|
||||
<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="@color/color_585d6c"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:csb_cornerRadius="@dimen/dp_3"
|
||||
app:csb_fillColor="@color/color_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" />
|
||||
</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>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
<?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_9"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_8"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_12">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="一元试用"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/tv_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:paddingStart="@dimen/dp_4"
|
||||
android:paddingEnd="@dimen/dp_4"
|
||||
android:text="已支付"
|
||||
android:textColor="@color/color_2090fe"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:csb_cornerRadius="@dimen/dp_4"
|
||||
app:csb_fillColor="#E8F3FE"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_name" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:background="@color/color_eaeaea"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_no_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:text="订单编号:"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_no"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ZB-20240328113713-1016332-mdk8"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_order_no_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_order_no_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_order_no_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pay_type_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:text="支付方式:"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_order_no_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pay_type"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="支付宝支付"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_pay_type_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_pay_type_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_pay_type_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_create_time_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:text="下单时间:"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_pay_type_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_create_time"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2025-07-28 11:45:23"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_create_time_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_create_time_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_create_time_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pay_time_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:text="支付时间:"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_create_time_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pay_time"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2025-07-28 11:45:23"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_pay_time_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_pay_time_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_pay_time_title" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:background="@color/color_eaeaea"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_pay_time_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="¥1.00"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/layout_actions"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/layout_actions" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/layout_actions"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line2">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_invoice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:text="开具发票"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:visibility="gone"
|
||||
app:csb_cornerRadius="@dimen/dp_25"
|
||||
app:csb_strokeColor="@color/color_cccccc"
|
||||
app:csb_strokeWidth="@dimen/dp_1" />
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_certificate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:text="上传凭证"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:visibility="gone"
|
||||
app:csb_cornerRadius="@dimen/dp_25"
|
||||
app:csb_strokeColor="@color/color_cccccc"
|
||||
app:csb_strokeWidth="@dimen/dp_1" />
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.lihang.ShadowLayout>
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<?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_10"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_16">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="@dimen/dp_46"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:src="@mipmap/ic_default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:text="木槿"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_phone"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="158****4589"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name" />
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:text="解除绑定"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:csb_cornerRadius="@dimen/dp_4"
|
||||
app:csb_strokeColor="@color/color_dfdfdf"
|
||||
app:csb_strokeWidth="@dimen/dp_1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.lihang.ShadowLayout>
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:layout_marginEnd="@dimen/dp_1"
|
||||
app:hl_cornerRadius="@dimen/dp_25"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
app:hl_cornerRadius="@dimen/dp_10"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
app:hl_cornerRadius="@dimen/dp_8"
|
||||
app:hl_shadowColor="#0d4a4f5b"
|
||||
app:hl_shadowColor="@color/color_shadow"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 604 B |
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 494 B After Width: | Height: | Size: 292 B |