18034727885
2026-07-24 6180e2986ca3c39262486458cee97e54d5f67450
app/src/main/java/com/igo/user/ui/trip/TargetOrderActivity.kt
@@ -4,6 +4,7 @@
import android.content.Intent
import android.view.View
import android.widget.TextView
import cn.sinata.rxnetty.LogHelper
import cn.sinata.xldutils.callPhone
import cn.sinata.xldutils.utils.myToast
import cn.sinata.xldutils.utils.optInt
@@ -61,10 +62,30 @@
                myToast(getString(R.string.请填写目的地))
            }else{
                tv_action.isEnabled = false
                HttpManager.addTaxiOrder(endName,endLat,endLon,2,type,IGoApplication.lat,IGoApplication.lon, startName,
                    startLat,startLon,0,0, System.currentTimeMillis().toTime("yyyy-MM-dd HH:mm"),
                    driver.id,null,null,null,1,type).request(this,success = {_,data->
                val currentLocation = IGoApplication.getCurrentLocation()
                HttpManager.addTaxiOrder(
                    endName,
                    endLat,
                    endLon,
                    2,
                    type,
                    currentLocation.latitude,
                    currentLocation.longitude,
                    startName,
                    startLat,
                    startLon,
                    0,
                    0,
                    System.currentTimeMillis().toTime("yyyy-MM-dd HH:mm"),
                    driver.id,
                    null,
                    null,
                    null,
                    1,
                    type
                ).request(this, success = { _, data ->
                    data?.let {
                        LogHelper.logRecord("下单orderId:${it.optInt("id")} orderType:${type}")
                        startActivity<TripActivity>("type" to type,"id" to it.optInt("id"))
                        setResult(Activity.RESULT_OK)
                        finish()