From b7062b3c0bb06a5f62e3723412211bfba3147132 Mon Sep 17 00:00:00 2001
From: liugl <liugl@sinata.cn>
Date: 星期一, 24 八月 2020 15:30:45 +0800
Subject: [PATCH] 8.24 资格证号错误
---
app/src/main/java/com/okgoincar/slab/SlabGetOrderFragment.kt | 30 ++++++++++++++++++++++++++----
1 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/app/src/main/java/com/okgoincar/slab/SlabGetOrderFragment.kt b/app/src/main/java/com/okgoincar/slab/SlabGetOrderFragment.kt
index aa3823b..02a0379 100644
--- a/app/src/main/java/com/okgoincar/slab/SlabGetOrderFragment.kt
+++ b/app/src/main/java/com/okgoincar/slab/SlabGetOrderFragment.kt
@@ -17,6 +17,7 @@
import com.okgoincar.base.AMapKit
import com.okgoincar.base.MyApplication
import com.okgoincar.bean.OrderBean
+import com.okgoincar.bean.ServerVoiceBean
import com.okgoincar.netUtls.Api
import kotlinx.android.synthetic.main.item_get_order.*
import kotlinx.android.synthetic.main.item_map_market.view.*
@@ -48,6 +49,7 @@
//设置竖屏显示
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
callOrderDetail()
+ callVideo()
var strBtn = "抢单"
if (type == 2){
strBtn = "确定"
@@ -59,9 +61,11 @@
tv_sure.text = strBtn + it.toString() + "秒"
}
}
+
tv_close.clickDelay {
finish()
}
+
tv_sure.clickDelay {
if (type == 1){
showGetOrder()
@@ -71,6 +75,23 @@
}
}
setblack(getNowTimeBlack())
+ }
+
+ private fun callVideo() {
+ var map = getMapByAny()
+ map["orderId"] = orderId
+ map["orderType"] = orderType
+ map["lat"] = MyApplication.getLocation().latitude
+ map["lon"] = MyApplication.getLocation().longitude
+ callNet(this,Api.queryVoiceBroadcast,map){
+ var bean = Gson().fromJson<ServerVoiceBean>(it,ServerVoiceBean::class.java)
+ if (!bean.data.isNullOrEmpty()){
+ MyApplication.getTTsManager().setVideoText(bean.data)
+ var str = bean.data
+ str = str.substring(7,str.indexOf("公里,"))
+ tv_title.text = "距您约"+str+"公里"
+ }
+ }
}
override fun initView() {
@@ -115,8 +136,8 @@
lineTance: Float,
lineTime: Long
) {
- MyApplication.getTTsManager().setVideoText("收到新的"+UiUtil.getNameByType(orderType!!)+"订单,"+"从"+data.startAddress+"出发,距您约"+AMapKit.getTance(lineTance))
- tv_title.text = "距您约" + AMapKit.getTance(lineTance)
+// MyApplication.getTTsManager().setVideoText("收到新的"+
+// UiUtil.getNameByType(orderType!!)+"订单,"+"从"+data.startAddress+"出发,距您约"+AMapKit.getTance(lineTance))
}
})
}
@@ -130,6 +151,7 @@
tv_start.textColor(this,R.color.white)
tv_end.textColor(this,R.color.white)
tv_money.textColor(this,R.color.white)
+ tv_title.textColor(this,R.color.slab_yellow_zhong)
}else{
rl_top_back.setBackgroundResource(R.color.white)
ll_order_top.setBackgroundResource(R.color.white)
@@ -137,7 +159,7 @@
tv_start.textColor(this,R.color.black)
tv_end.textColor(this,R.color.black)
tv_money.textColor(this,R.color.black)
-
+ tv_title.textColor(this,R.color.yellow_ffa72d)
}
}
@@ -147,7 +169,7 @@
map["orderId"] = orderId
map["orderType"] = orderType
showDialog()
- callNet(this, Api.grabOrder, map, {
+ callNet(this, Api.grabOrder_, map, {
dismissDialog()
Toast.create(this).show("抢单成功")
onBackPressed()
--
Gitblit v1.7.1