Commit 15660db7 authored by shiyl's avatar shiyl

Merge branch 'feature/dev_fight_order' of...

Merge branch 'feature/dev_fight_order' of https://git.yidian-inc.com:8021/bp/ShenghuoquanBusiness into feature/dev_fight_order
parents bee3441e 0b8423a0
...@@ -60,7 +60,6 @@ class OrderListActivity : BaseMvvmActivity<BorderActivityOrderListBinding, Order ...@@ -60,7 +60,6 @@ class OrderListActivity : BaseMvvmActivity<BorderActivityOrderListBinding, Order
private fun initClickEvent() { private fun initClickEvent() {
binding.smartRefresh.setOnRefreshListener(this) binding.smartRefresh.setOnRefreshListener(this)
binding.smartRefresh.setOnLoadMoreListener(this) binding.smartRefresh.setOnLoadMoreListener(this)
binding.smartRefresh.autoRefresh()
binding.tvRefunded.setOnClickListener { binding.tvRefunded.setOnClickListener {
vm._listType = OrderListViewModel.REFUND vm._listType = OrderListViewModel.REFUND
binding.tvRefunded.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)) binding.tvRefunded.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD))
...@@ -111,4 +110,9 @@ class OrderListActivity : BaseMvvmActivity<BorderActivityOrderListBinding, Order ...@@ -111,4 +110,9 @@ class OrderListActivity : BaseMvvmActivity<BorderActivityOrderListBinding, Order
super.onBackPressed() super.onBackPressed()
vm.goBackPointReport() vm.goBackPointReport()
} }
override fun onResume() {
super.onResume()
binding.smartRefresh.autoRefresh()
}
} }
...@@ -45,6 +45,7 @@ class OrderPickupPointInfoView @JvmOverloads constructor(context: Context, attrs ...@@ -45,6 +45,7 @@ class OrderPickupPointInfoView @JvmOverloads constructor(context: Context, attrs
private fun registerUIEvent() { private fun registerUIEvent() {
// 监听点击联系自提点 // 监听点击联系自提点
vm.contractPickupPoint.observe(context as LifecycleOwner, { phone -> vm.contractPickupPoint.observe(context as LifecycleOwner, { phone ->
if (phone.isNullOrEmpty()) return@observe
// 先判断权限 // 先判断权限
RxPermissions(context as FragmentActivity).request(Manifest.permission.CALL_PHONE).subscribe { granted -> RxPermissions(context as FragmentActivity).request(Manifest.permission.CALL_PHONE).subscribe { granted ->
if (granted) { if (granted) {
......
...@@ -16,14 +16,19 @@ ...@@ -16,14 +16,19 @@
android:orientation="horizontal" android:orientation="horizontal"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_centerHorizontal="true"> android:layout_centerHorizontal="true">
<TextView <TextView
android:id="@+id/tv_market_name" android:id="@+id/tv_market_name"
android:layout_width="wrap_content" android:layout_width="96dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:textSize="16sp" android:maxLines="1"
android:ellipsize="end"
android:text="拼餐优惠多多"
android:textColor="#333333" android:textColor="#333333"
android:text="拼餐优惠多多"> android:textSize="16sp"
>
</TextView> </TextView>
<ImageView <ImageView
android:layout_width="@dimen/dp14" android:layout_width="@dimen/dp14"
...@@ -168,14 +173,15 @@ ...@@ -168,14 +173,15 @@
android:layout_marginLeft="@dimen/dp16" android:layout_marginLeft="@dimen/dp16"
android:layout_marginTop="@dimen/dp16" android:layout_marginTop="@dimen/dp16"
android:layout_below="@+id/rl_order_image_count"> android:layout_below="@+id/rl_order_image_count">
<TextView <TextView
android:id="@+id/tv_pay_time" android:id="@+id/tv_pay_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="2010-3-24 11:07" android:text="2010-3-24 11:07"
android:textColor="#666666"> android:textColor="#666666"
android:textSize="14sp">
</TextView> </TextView>
<LinearLayout <LinearLayout
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
<import type="android.view.View" /> <import type="android.view.View" />
<import type="android.text.TextUtils" />
<variable <variable
name="vm" name="vm"
type="com.yidian.shenghuoquan.buserorder.viewmodel.OrderPickupPointViewModel" /> type="com.yidian.shenghuoquan.buserorder.viewmodel.OrderPickupPointViewModel" />
...@@ -88,7 +90,7 @@ ...@@ -88,7 +90,7 @@
android:text="@{@string/pickup_point_contract(data.contactName, data.phone)}" android:text="@{@string/pickup_point_contract(data.contactName, data.phone)}"
android:textColor="@color/color_999999" android:textColor="@color/color_999999"
android:textSize="@dimen/sp14" android:textSize="@dimen/sp14"
android:visibility="@{data != null ? View.VISIBLE : View.GONE}" android:visibility="@{!TextUtils.isEmpty(data.contactName) || !TextUtils.isEmpty(data.phone) ? View.VISIBLE : View.GONE}"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/tv_pickup_point_name" app:layout_constraintStart_toStartOf="@id/tv_pickup_point_name"
app:layout_constraintTop_toBottomOf="@id/tv_pickup_point_address" app:layout_constraintTop_toBottomOf="@id/tv_pickup_point_address"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment