| | |
| | | applicationId "com.okgoincar" |
| | | minSdkVersion 19 |
| | | targetSdkVersion 29 |
| | | versionCode 16 |
| | | versionName "16" |
| | | versionCode 17 |
| | | versionName "17" |
| | | multiDexEnabled true |
| | | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| | | ndk { |
| | |
| | | var mileage = intent.getDoubleExtra("mileage", 0.0) //里程,单位为km |
| | | callOver(contexts!!, price) |
| | | } |
| | | |
| | | "android.net.conn.CONNECTIVITY_SUCCESS", "android.net.conn.CONNECTIVITY_FAILURE", "android.net.conn.CONNECTIVITY_CHANGE" -> { |
| | | // toast("收到网络变化") |
| | | // if (NetUtils.isNetworkConnected(MyApplication.getInstance())) { |
| | | // callErrorOrder(contexts!!) |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | } catch (e: Exception) { |
| | |
| | | } else { |
| | | val bean = CacheKey.getLocalOrderBean() |
| | | bean?.let { |
| | | if (bean.money >= 0.0) { |
| | | if (bean.money > 0.0) { |
| | | return@callOver |
| | | } |
| | | bean.endTime = System.currentTimeMillis() |
| | |
| | | if (bean.money <= 0.0) { |
| | | return@let |
| | | } |
| | | CacheKey.saveLocalOrderBeanNull() |
| | | val map = getMapByAny() |
| | | map["orderId"] = bean.orderId |
| | | map["orderType"] = bean.orderType |
| | |
| | | map["travelFee"] = bean.money |
| | | callNet(contexts, "api/order/confirmFees$", map) { |
| | | toast("上传异常订单成功") |
| | | CacheKey.saveLocalOrderBeanNull() |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.ERROR_INFO)) |
| | | } |
| | | } |
| | |
| | | bean.data = dataBean |
| | | NettyClient.getInstance() |
| | | .sendMessage(Gson().toJson(bean)) |
| | | Handler(Looper.getMainLooper()).post { |
| | | toast("发送location --> $dataBean") |
| | | } |
| | | // Handler(Looper.getMainLooper()).post { |
| | | // toast("发送location --> $dataBean") |
| | | // } |
| | | sysErr(dataBean.toString()) |
| | | } |
| | | } |
| | |
| | | clickAction(responseString) |
| | | } |
| | | |
| | | override fun onError(code: Int, msg: String?, resposeString: String?) { |
| | | super.onError(code, msg, resposeString) |
| | | if (showDialog) |
| | | dismissDialog() |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | |
| | | override fun success(responseString: String?) { |
| | | dismissDialog() |
| | | clickAction(responseString) |
| | | } |
| | | |
| | | override fun onError(code: Int, msg: String?, resposeString: String?) { |
| | | super.onError(code, msg, resposeString) |
| | | dismissDialog() |
| | | } |
| | | }) |
| | | } |
| | |
| | | clickAction(responseString) |
| | | } |
| | | |
| | | override fun onError(code: Int, msg: String?, resposeString: String?) { |
| | | super.onError(code, msg, resposeString) |
| | | if (showDialog) |
| | | dismissDialog() |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | override fun onError(code: Int, msg: String?, resposeString: String?) { |
| | | dismissDialog() |
| | | clickActionError(resposeString) |
| | | } |
| | | }) |
| | |
| | | |
| | | override fun onError(code: Int, msg: String?, resposeString: String?) { |
| | | super.onError(code, msg, resposeString) |
| | | |
| | | dismissDialog() |
| | | clickActionError(msg) |
| | | } |
| | | }) |
| | |
| | | override fun success(responseString: String?) { |
| | | clickAction(responseString) |
| | | } |
| | | |
| | | override fun onError(code: Int, msg: String?, resposeString: String?) { |
| | | super.onError(code, msg, resposeString) |
| | | } |
| | | }) |
| | | } |
| | | |
| | |
| | | @Override |
| | | protected void onNetworkConnected(NetUtils.NetType type) { |
| | | super.onNetworkConnected(type); |
| | | toast("收到网络变化"); |
| | | // toast("收到网络变化"); |
| | | if (NetUtils.isNetworkConnected(MyApplication.Companion.getInstance())) { |
| | | MoneyBroadCastReceiver.Companion.callErrorOrder(this); |
| | | } |
| | |
| | | tv_current_time.text = DateUtil.getTime( |
| | | DateUtil.TYPE7, |
| | | System.currentTimeMillis() |
| | | ) + "\n" + DateUtil.getWeek(System.currentTimeMillis()) |
| | | ) + DateUtil.getWeek(System.currentTimeMillis()) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | tv_name.clickDelay { |
| | | toast("点亮网约") |
| | | } |
| | | |
| | | tv_car_num.clickDelay { |
| | |
| | | } |
| | | |
| | | tv_title_top.clickDelay { |
| | | |
| | | } |
| | | |
| | | view_mode.clickDelay { |
| | |
| | | CacheKey.putKeyStr("date_mode", System.currentTimeMillis().toString()) |
| | | CacheKey.putKeyStr("mode_now_time", "1")//记录为点击切换的颜色 1 白色 2 黑色 |
| | | setBlackMode(false) |
| | | mainFragment.adapter.notifyDataSetChanged() |
| | | } else { |
| | | CacheKey.putKeyStr("date_mode", System.currentTimeMillis().toString()) |
| | | CacheKey.putKeyStr("mode_now_time", "2") |
| | | setBlackMode(true) |
| | | mainFragment.adapter.notifyDataSetChanged() |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | override fun onLocationChanged(p0: AMapLocation?) { |
| | | if (p0 == null) { |
| | | toast("高德位置是空的") |
| | | // toast("高德位置是空的") |
| | | return |
| | | } |
| | | if (p0.errorCode == 0) { |
| | | toast("定位成功") |
| | | // toast("定位成功") |
| | | MyApplication.aMapLocation = p0 |
| | | CacheKey.putKeyStr("location", Gson().toJson(p0)) |
| | | } else { |
| | | p0.let { |
| | | toast("定位失败" + it.errorCode.toString()) |
| | | // toast("定位失败" + it.errorCode.toString()) |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.okgoincar.netUtls.timeOver |
| | | import com.okgoincar.utils.MyUtils |
| | | import kotlinx.android.synthetic.main.activity_order_over.* |
| | | import java.lang.Exception |
| | | |
| | | class SlabOrderOverActivity : MySlabBaseActivity() { |
| | | |
| | |
| | | override fun onPause() { |
| | | super.onPause() |
| | | if (time != null){ |
| | | time!!.onFinish() |
| | | time!!.cancel() |
| | | } |
| | | } |
| | | |
| | |
| | | MyUtils.getInstans().CallPhone(this, it.data.phone.toString()) |
| | | } |
| | | tv_pay_result_money.text = "¥" + it.data.orderMoney.toString() |
| | | tv_pay_result_small_money.text = "¥" + it.data.tipMoney.toString() |
| | | tv_time.text = it.data.travelTime |
| | | tv_start_address.text = it.data.startAddress |
| | | tv_end_address.text = it.data.endAddress |
| | |
| | | if (it.status == 8||it.status == 7) { |
| | | tv_pay_result_money.textColor(this@SlabOrderOverActivity,R.color.slab_green_over) |
| | | Handler(Looper.getMainLooper()).post { |
| | | time = timeOver (5000){ |
| | | time = timeOver (20000){ |
| | | tv_title_slab.text = "已完成($it)" |
| | | if (it == 0){ |
| | | onBackPressed() |
| | | if (time != null){ |
| | | time!!.cancel() |
| | | } |
| | | try { |
| | | onBackPressed() |
| | | }catch (e:Exception){ |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | tv_name.textColor(this, R.color.black) |
| | | tv_car_num.textColor(this, R.color.black) |
| | | tv_phone.textColor(this, R.color.black) |
| | | tv_phone.setDrawableNull() |
| | | tv_phone.setDrawableLeft(R.mipmap.car_phone_bkack) |
| | | tv_time.textColor(this, R.color.black) |
| | | tv_start_address.textColor(this, R.color.black) |
| | | tv_end_address.textColor(this, R.color.black) |
| | |
| | | tv_current_time.text = DateUtil.getTime( |
| | | DateUtil.TYPE7, |
| | | System.currentTimeMillis() |
| | | ) + "\n" + DateUtil.getWeek(System.currentTimeMillis()) |
| | | ) + DateUtil.getWeek(System.currentTimeMillis()) |
| | | } |
| | | } |
| | | |
| | |
| | | getAllMark(it) |
| | | when (it.data.orderState) { |
| | | 2, 3 -> { |
| | | toast("点亮网约") |
| | | clickBroad() |
| | | iv_to_gd.visible() |
| | | makeMarker?.isVisible = true |
| | |
| | | } |
| | | } |
| | | 4 -> { |
| | | toast("点亮网约") |
| | | clickBroad() |
| | | iv_to_gd.gone() |
| | | closeLine() |
| | |
| | | android:id="@+id/tv_pay_result_small_money" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="¥2.00" |
| | | android:text="" |
| | | android:textColor="@color/main_yellow_qian_y" |
| | | android:textSize="26sp"/> |
| | | |
| | |
| | | android:id="@+id/btn_start" |
| | | android:layout_width="wrap_content" |
| | | android:layout_marginStart="150dp" |
| | | android:visibility="gone" |
| | | android:text="开始行程" |
| | | android:layout_height="match_parent"/> |
| | | |
| | |
| | | android:id="@+id/btn_end" |
| | | android:layout_width="wrap_content" |
| | | android:layout_marginStart="300dp" |
| | | android:visibility="gone" |
| | | android:text="结束行程" |
| | | android:layout_height="match_parent"/> |
| | | |
| | |
| | | android:layout_width="200dp" |
| | | android:layout_height="200dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_marginTop="153dp" |
| | | android:layout_marginTop="160dp" |
| | | android:layout_marginEnd="26dp" /> |
| | | |
| | | <TextView |
| | |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_head" |
| | | android:layout_width="170dp" |
| | | android:layout_height="170dp" |
| | | android:layout_marginTop="75dp" |
| | | android:layout_width="200dp" |
| | | android:layout_height="200dp" |
| | | android:layout_marginTop="80dp" |
| | | android:layout_marginEnd="26dp" |
| | | android:elevation="5dp" |
| | | android:scaleType="centerCrop" |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <background android:drawable="@drawable/ic_launcher_background" /> |
| | | <foreground android:drawable="@drawable/ic_launcher_foreground" /> |
| | | <background android:drawable="@color/ic_launcher_background"/> |
| | | <foreground android:drawable="@mipmap/ic_launcher_foreground"/> |
| | | </adaptive-icon> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <background android:drawable="@drawable/ic_launcher_background" /> |
| | | <foreground android:drawable="@drawable/ic_launcher_foreground" /> |
| | | <background android:drawable="@color/ic_launcher_background"/> |
| | | <foreground android:drawable="@mipmap/ic_launcher_foreground"/> |
| | | </adaptive-icon> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <resources> |
| | | <color name="ic_launcher_background">#FFFFFF</color> |
| | | </resources> |