package com.dahe.gldriver.net

import WayBill2
import com.dahe.gldriver.BuildConfig
import com.dahe.glex.bean.*
import com.dahe.mylibrary.net.CommonResponseBean
import io.reactivex.rxjava3.core.Observable
import retrofit2.http.Body
import retrofit2.http.POST
import retrofit2.http.Query


/**
 * Created by Administrator on 2018/8/8 0008.
 */
interface Api {
    /*-------------------登录----------------------------*/
    @POST(BASE_URL + "common/register")
    fun log(@Body logBean: LogBean?): Observable<CommonResponseBean<UserBean>>

    //运单列表
    @POST(BASE_URL + "app/driver/waybill/listV2")
    fun orderList(@Body bean: RefreshBean?): Observable<CommonResponseBean<CommListBean>>

    //获取正在执行的运单/运单详情
    @POST(BASE_URL + "app/driver/waybill/getExecuteWaybill")
    fun getExecuteWaybill(@Body bean: WayBillBean?): Observable<CommonResponseBean<WayBill2>>
    fun getExecuteWaybill2(@Query("waybillId") waybillId: String?): Observable<CommonResponseBean<UserBean>>

    companion object {
        //    String BASE_URL = "https://tmstest.dahehuoyun.com/";
        const val BASE_URL = BuildConfig.BASE_URL

        //获取版本
        const val VERSION = BASE_URL + "app/version"
    }
}