package com.zswc.creativity.utils.net

import com.zswc.creativity.model.*
import com.ysnows.base.net.PageResp
import com.ysnows.base.net.Resp
import io.reactivex.Observable
import okhttp3.MultipartBody
import retrofit2.http.*
import java.util.*

/**
 * Created by xianguangjin on 16/5/18.
 */
interface ApiService {

    /**
     *首页banner
     * @return
     */
    @GET("Index/getBanner")
    suspend fun getBanner(): Resp<List<HomeBanner>>


    /**
     *首页精选 列表
     * @return
     */
    @GET("Index/indexCollectionList")
    suspend fun getCollectionList(): Resp<List<CollectionList>>

    /**
     * 登录
     * @return
     */
    @FormUrlEncoded
    @POST("Login/passwordLogin")
    suspend fun getLogin(
            @Field("phone") phone: String?,
            @Field("password") password: String?
    ): Resp<Any>

    /**
     * 我的订单-待支付，已购买-分页
     * @return
     */
    @FormUrlEncoded
    @POST("Order/getMyOrderList")
    suspend fun getMyOrderList(
            @Field("status") status: String?,
            @Field("page_num") page_num: Int?,
            @Field("page") page: Int?
    ): PageResp<MyOrderInfo>

    /**
     * 我的订单-已转赠-分页
     * @return
     */
    @FormUrlEncoded
    @POST("Order/getMySendList")
    suspend fun getMySendList(
            @Field("page_num") page_num: Int?,
            @Field("page") page: Int?
    ): PageResp<MyOrderInfo>

    /**
     * 寄售订单--分页
     * @return
     */
    @FormUrlEncoded
    @POST("Secondary/secondaryOrderList")
    suspend fun getSecondaryOrderList(
            @Field("status") status: String?,
            @Field("page_num") page_num: Int?,
            @Field("page") page: Int?
    ): PageResp<SecondList>


    /**
     * 文章详情
     * @return
     * 7平台服务协议8平台运输协议9隐私政策10用户协议11关于我们
     */
    @GET("Publics/config_info")
    suspend fun articleInfo(): Resp<ArticleInfo>


    /**
     * 消息-分页
     * @return
     */
    @FormUrlEncoded
    @POST("User_center/messageList")
    suspend fun msgListPage(
            @Field("page_num") page_num: Int?,
            @Field("page") page: Int?
    ): PageResp<MsgList>

    /**
     * 消息-已读
     * @return
     */
    @GET("Index/CollectionDetail")
    suspend fun CollectionDetail(@Query("id") id: String?): Resp<TibetaDetails>

    /**
     * 用户信息
     * @return
     */
    @GET("User_center/getUserInfo")
    suspend fun getUser(): Resp<User>

    /**
     *首页公告
     * @return
     */
    @FormUrlEncoded
    @POST("User_center/messageList")
    suspend fun getMessageList(@Field("page_num") page_num: Int?,
                               @Field("page") page: Int?): Resp<MessageListBean>


    /**
     * 获取验证码-忘记密码发送短信
     *
     * @return
     */
    @POST("Sms/send")
    @FormUrlEncoded
    suspend fun getPassword(@Field("event") event: String?, @Field("phone") phone: String?): Resp<Any>

    /**
     * 重置密码
     * @return
     */
    @POST("Login/ForgetPassword")
    @FormUrlEncoded
    suspend fun setPassword(@Field("phone") phone: String?, @Field("ver_code") ver_code: String?,
                            @Field("password") password: String?, @Field("confirm_password") confirm_password: String?): Resp<Any>

    /**
     * 注册
     * @return
     */
    @POST("Login/Register")
    @FormUrlEncoded
    suspend fun setRegister(
            @Field("phone") phone: String?, @Field("ver_code") ver_code: String?,
            @Field("password") password: String?, @Field("confirm_password") confirm_password: String?,
            @Field("second_password") second_password: String?, @Field("confirm_second_password") confirm_second_password: String?,
            @Field("invite_code") invite_code: String?,
    ): Resp<Any>

    /**
     * 填写实名认证信息
     * @return
     */
    @POST("User_center/userCertification")
    @FormUrlEncoded
    suspend fun setUserCertification(
            @Field("true_name") true_name: String?,
            @Field("id_card") id_card: String?,
            @Field("phone") phone: String?,
    ): Resp<Any>


    /**
     * 我的 -我的藏品
     * @return
     */
    @GET("User_center/myCollection")
    suspend fun getMyCollection(): Resp<List<MyCollection>>


    /**
     * 购买-钱包购买
     * @return
     */
    @POST("Order/createOrder")
    @FormUrlEncoded
    suspend fun setCreateOrder(@Field("from") from: String?, @Field("id") id: String?,
                               @Field("num") num: String?, @Field("pay_type") pay_type: String?,
                               @Field("second_password") second_password: String?
    ): Resp<Any>



    /**
     * 订单详情
     * @return
     */
    @POST("Order/MyOrderListDetail")
    @FormUrlEncoded
    suspend fun setMyOrderListDetail(@Field("order_no") order_no: String?,
                                     @Field("type") type: String?,
                                     ): Resp<MyOrderListDetail>


    /**
     * 订单详情/已转赠
     * @return
     */
    @POST("Order/getMySendListDetail")
    @FormUrlEncoded
    suspend fun getMySendListDetail(@Field("order_id") order_id: String?): Resp<MyOrderListDetail>


    /**
     * 我的钱包明细-分页
     * @return
     */
    @FormUrlEncoded
    @POST("User_center/moneyLog")
    suspend fun moneyLog(
            @Field("type") type: String?,
            @Field("page_num") page_num: Int?,
            @Field("page") page: Int?
    ): PageResp<MoneyList>






//    @GET("api/msg/msgList")
//    suspend fun msgListPage(@Query("p") p: Int): PageResp<MsgList>

//////--------------------------------------------------------------------------------

    /**
     * 消息-已读
     * @return
     */
    @GET("api/msg/msgRead")
    suspend fun msgRead(@Query("arr") arr: String?): Resp<Any>


    /**
     * 地址列表
     * @return
     */
    @GET("api/address/addressList")
    suspend fun addressList(
            @Query("type") type: String?,
            @Query("k") k: String, @Query("p") p: Int
    ): Resp<List<AddressBean>>


//    ------------


    @POST("api/common/getOssSign")
    @FormUrlEncoded
    fun getSignedUrl(@Field("type") type: String?): Observable<Resp<ImageSign>>


    /**
     * 极光一键登录
     *
     * @return
     */
    @POST("api/index/jiguangLogin")
    @FormUrlEncoded
    fun jiguangLogin(@Field("loginToken") loginToken: String): Observable<Resp<LoginBean>>

    /**
     * 注册
     *
     * @return
     */

    @POST("api/index/register")
    @FormUrlEncoded
    fun register(
            @Field("name") name: String?,
            @Field("mobile") mobile: String?,
            @Field("code") code: String?,
            @Field("type") type: String?,
            @Field("openid") openid: String? = null,
            @Field("unionid") unionId: String? = null
    ): Observable<Resp<LoginBean>>


    /**
     *密码登录
     *
     * @return
     */
    @POST("api/index/pwdLogin")
    @FormUrlEncoded
    fun login(
            @Field("mobile") mobile: String?,
            @Field("pwd") pwd: String?
    ): Observable<Resp<LoginBean>>

    /**
     *短信登录
     *
     * @return
     */
    @POST("api/index/smslogin")
    @FormUrlEncoded
    fun smsLogin(
            @Field("mobile") mobile: String?,
            @Field("code") code: String?
    ): Observable<Resp<LoginBean>>

    /**
     *微信登录
     *
     * @return
     */
    @POST("api/index/wxLogin")
    @FormUrlEncoded
    fun wxLogin(@Field("code") code: String?): Observable<Resp<LoginBean>>


    /**
    简易版注册
     *
     * @return
     */
    @POST("api/index/siml_register")
    @FormUrlEncoded
    fun simlRegister(
            @Field("mobile") mobile: String?,
            @Field("type") type: String?
    ): Observable<Resp<LoginBean>>


    /**
     * 获取区域
     * @return
     */
    @GET("api/common/getArea")
    suspend fun getArea(
            @Query("code") code: String?,
            @Query("page") page: Int
    ): Resp<List<AreaBean>>


    /**
     * 添加编辑地址
     *
     * @return
     */
    @POST("api/address/addressEdit")
    @FormUrlEncoded
    fun addressEdit(
            @Field("addr_id") addr_id: String?, @Field("lat") lat: String?,
            @Field("lng") lng: String?, @Field("province") province: String?,
            @Field("city") city: String?, @Field("area") area: String?,
            @Field("address") address: String?, @Field("name") name: String?,
            @Field("mobile") mobile: String?, @Field("type") type: String?,
            @Field("is_default") is_default: String?
    ): Observable<Resp<Any>>


    /**
     * 获取详情-地址
     * @return
     */
    @GET("api/address/addressGet")
    fun getAddress(@Query("addr_id") addr_id: String?): Observable<Resp<AddressDetailsBean>>


    /**
     * 删除-地址
     * @return
     */
    @GET("api/address/addressDel")
    fun setAddressDel(@Query("addr_id") addr_id: String?): Observable<Resp<Any>>

    /**
     * 货源详情-货主端
     * @return
     */
    @GET("api/info/infoGet")
    fun infoGet(@Query("info_id") info_id: String?): Observable<Resp<DataInfoBean>>


    /**
     * 运单详情-货主端
     * @return
     */
    @GET("api/info/orderGet")
    fun orderGet(@Query("order_id") order_id: String?): Observable<Resp<WaybillDetails>>


    /**
     * 添加编辑信息-货源管理
     * @return
     */
    @POST("api/info/infoEdit")
    @FormUrlEncoded
    fun infoEdit(
            @Field("info_id") info_id: String?,
            @Field("type_id") type_id: String?,
            @Field("total") total: String?,
            @Field("driver") driver: String?,
            @Field("nums") nums: String?,
            @Field("is_public") is_public: String?,
            @Field("is_insurance") is_insurance: String?,
            @Field("type") type: String?,
            @Field("data") data: String?,
            @Field("send") send: String?,
            @Field("receive") receive: String?
    ): Observable<Resp<InfoEditBean>>


    /**
     * 货源支付
     * @return
     */
    @POST("api/info/infoPay")
    @FormUrlEncoded
    fun infoGetPay(
            @Field("info_id") info_id: String?,
            @Field("pay_pwd") pay_pwd: String?
    ): Observable<Resp<Any>>


    /**
     * 货源取消
     * @return
     */
    @GET("api/info/infoCancel")
    fun infoCancel(@Query("info_id") info_id: String?): Observable<Resp<Any>>

    /**
     * 货源列表
     * @return
     */
    @GET("api/info/infoList")
    suspend fun infoList(
            @Query("k") k: String?,
            @Query("sp") sp: String?,
            @Query("sc") sc: String?,
            @Query("sa") sa: String?,
            @Query("rp") rp: String?,
            @Query("rc") rc: String?,
            @Query("ra") ra: String?,
            @Query("type_id") type_id: String?,
            @Query("s_time1") s_time1: String?,
            @Query("s_time2") s_time2: String?,
            @Query("r_time1") r_time1: String?,
            @Query("r_time2") r_time2: String?,
            @Query("price1") price1: String?,
            @Query("price2") price2: String?,
            @Query("sort") sort: String?,
            @Query("asc") asc: String?,

            @Query("info_state") info_state: String?,
            @Query("goods_type") goods_type: String?,
            @Query("p") p: Int
    ): Resp<List<InfoListBean>>


    /**
     * 常用司机
     * @return
     */
    @GET("api/driver/myDriver")
    suspend fun myDriver(@Query("k") k: String?, @Query("p") p: Int): Resp<List<DriverBean>>


    /**
     * 所有司机
     * @return
     */
    @GET("api/driver/allDriver")
    suspend fun allDriver(@Query("k") k: String?, @Query("p") p: Int): Resp<List<DriverBean>>

    /**
     * 常用司机-添加收藏
     * @return
     */
    @POST("api/driver/setDriver")
    @FormUrlEncoded
    fun setDriver(@Field("arr") arr: String): Observable<Resp<Any>>


    /**
     * 身份认证
     * @return
     */
    @POST("api/user/setInfo")
    @FormUrlEncoded
    fun setInfo(
            @Field("idcard_z") idcard_z: String?, @Field("idcard_f") idcard_f: String?,
            @Field("name") name: String?, @Field("idcard") idcard: String?
    ): Observable<Resp<Any>>

    /**
     * 银行卡信息-保存
     * @return
     */
    @POST("api/user/setCard")
    @FormUrlEncoded
    fun setCardBank(
            @Field("name") name: String?, @Field("number") number: String?,
            @Field("bank") bank: String?, @Field("kbank") kbank: String?,
            @Field("image") image: String?
    ): Observable<Resp<Any>>


    /**
     * 获取信息-认证信息 身份 车辆 公司 银行卡  7账单列表筛选条件 6：车辆类型
     * @return
     */
    @GET("api/user/getInfo")
    fun getInfo(@Query("type") type: String?): Observable<Resp<InfoBean>>


    /**
     * 公司认证
     * @return
     */
    @POST("api/user/setCompany")
    @FormUrlEncoded
    fun setCompany(
            @Field("license_img") license_img: String?, @Field("license_sn") license_sn: String?,
            @Field("company_name") company_name: String?, @Field("company_addr") company_addr: String?
    ): Observable<Resp<Any>>


    /**
     * 车辆认证-保存
     * @return
     */
    @POST("api/user/setCar")
    @FormUrlEncoded
    fun setCar(
            @Field("driver_img") driver_img: String?, @Field("driving_z") driving_z: String?,
            @Field("driving_f") driving_f: String?, @Field("tonnage") tonnage: String?,
            @Field("license_dl") license_dl: String?, @Field("license_cy") license_cy: String?,
            @Field("number") number: String?,
            @Field("color") color: String?, @Field("car_type") car_type: String?,
            @Field("car_load") car_load: String?, @Field("car_brand") car_brand: String?,
            @Field("driving_sn") driving_sn: String?, @Field("car_weight") car_weight: String?,
            @Field("car_size_l") car_size_l: String?, @Field("car_size_w") car_size_w: String?,
            @Field("car_size_h") car_size_h: String?,
            @Field("car_cate") car_cate: String?,
            @Field("car_energy") car_energy: String?, @Field("car_own") car_own: String?,
            @Field("car_use") car_use: String?, @Field("car_sn") car_sn: String?,
            @Field("organization") organization: String?, @Field("reg_date") reg_date: String?,
            @Field("cert_date") cert_date: String?, @Field("driver_org") driver_org: String?,
            @Field("start_date") start_date: String?, @Field("end_date") end_date: String?,
            @Field("car_class") car_class: String?

    ): Observable<Resp<Any>>


    /**
     * 密码/支付密码
     * @return
     */
//    @POST("api/user/setPwd")
//    @FormUrlEncoded
//    fun setPwd(@Field("code") code: String?,@Field("oldpwd") oldpwd: String?, @Field("newpwd") newpwd: String?,
//               @Field("type") type: String?): Observable<Resp<Any>>
    @POST("api/user/setPwd")
    @FormUrlEncoded
    fun setPwd(@FieldMap params: HashMap<String, String>): Observable<Resp<Any>>


    /**
     * 编辑发票抬头
     * @return
     */
    @POST("api/invoice/invoiceEdit")
    @FormUrlEncoded
    fun invoiceEdit(
            @Field("invoice_id") invoice_id: String?, @Field("company") company: String?,
            @Field("sn") sn: String?, @Field("addr") addr: String?,
            @Field("tel") tel: String?, @Field("bank") bank: String?,
            @Field("number") number: String?
    ): Observable<Resp<Any>>


    /**
     * 获取信息-发票抬头
     * @return
     */
    @GET("api/invoice/invoiceGet")
    fun invoiceGet(): Observable<Resp<Invoice>>


    /**
     * 发票列表
     * @return
     */
    @GET("api/invoice/invoiceList")
    suspend fun invoiceList(@Query("p") p: Int): Resp<ArrayList<Invoice>>


    /**
     * 货源列表-司机
     * @return
     */
    @GET("api/order/infoList")
    suspend fun infoListDriver(
            @Query("k") k: String?,
            @Query("sp") sp: String?,
            @Query("sc") sc: String?,
            @Query("sa") sa: String?,
            @Query("rp") rp: String?,
            @Query("rc") rc: String?,
            @Query("ra") ra: String?,
            @Query("type_id") type_id: String?,
            @Query("s_time1") s_time1: String?,
            @Query("s_time2") s_time2: String?,
            @Query("r_time1") r_time1: String?,
            @Query("r_time2") r_time2: String?,
            @Query("price1") price1: String?,
            @Query("price2") price2: String?,
            @Query("sort") sort: String?,
            @Query("asc") asc: String?,
            @Query("goods_type") goods_type: String?,
            @Query("p") p: Int
    ): Resp<List<InfoListBean>>


    /**
     * 货源详情-司机端
     * @return
     */
    @GET("api/order/infoGet")
    suspend fun infoGetDriver(@Query("info_id") info_id: String?): Resp<DataInfoBean>


    /**
     * 运单详情-司机端
     * @return
     */
    @GET("api/info/orderGet")
    fun orderGetDriver(@Query("order_id") order_id: String?): Observable<Resp<WaybillDetails>>


    /**
     * 抢单-司机端
     * @return
     */
    @GET("api/order/getInfo")
    fun getInfoDriver(@Query("info_id") info_id: String?): Observable<Resp<GrabInfo>>


    /**
     * 我的运单-司机端
     * @return
     */
    @GET("api/order/myList")
    suspend fun myList(
            @Query("k") k: String?,
            @Query("sp") sp: String?,
            @Query("sc") sc: String?,
            @Query("sa") sa: String?,
            @Query("rp") rp: String?,
            @Query("rc") rc: String?,
            @Query("ra") ra: String?,
            @Query("type_id") type_id: String?,
            @Query("s_time1") s_time1: String?,
            @Query("s_time2") s_time2: String?,
            @Query("r_time1") r_time1: String?,
            @Query("r_time2") r_time2: String?,
            @Query("price1") price1: String?,
            @Query("price2") price2: String?,
            @Query("sort") sort: String?,
            @Query("asc") asc: String?,

            @Query("order_state") order_state: String?,
            @Query("goods_type") goods_type: String?,
            @Query("p") p: Int
    ): Resp<List<InfoListBean>>


    /**
     * 抢单-司机端
     * @return
     */
    @FormUrlEncoded
    @POST("api/order/setStatus")
    fun setStatus(@FieldMap params: HashMap<String, String>): Observable<Resp<Any>>


    /**
     * 识别身份证-OCR
     * @return
     */
    @GET("api/wxocr/cv_idcard")
    fun cvIdcard(@Query("img") img: String?): Observable<Resp<Idcard>>


    /**
     * 识别营业执照-OCR
     * @return
     */
    @GET("api/wxocr/cv_businessLicense")
    fun cvBusinessLicense(@Query("img") img: String?): Observable<Resp<Business>>


    /**
     * 识别身份证-OCR
     * @return
     */
    @GET("api/wxocr/cv_bankCard")
    fun cvBankCard(@Query("img") img: String?): Observable<Resp<BankCard>>


    /**
     * 识别驾驶证-OCR
     * @return
     */
    @GET("api/wxocr/cv_vehicle")
    fun cvVehicle(@Query("img") img: String?): Observable<Resp<CvVehicle>>

    /**
     * 识别行驶证-OCR
     * @return
     */
    @GET("api/wxocr/cv_driving")
    fun cvDriving(@Query("img") img: String?): Observable<Resp<CvDriving>>


    /**
     * 金额统计-资金
     * @return
     */
    @GET("api/amount/amountCount")
    fun amountCount(): Observable<Resp<AmountCount>>


    /**
     * 明细列表-资金
     * @return
     */
    @GET("api/amount/amountList")
    suspend fun amountList(
            @Query("status") status: String,
            @Query("type") type: String,
            @Query("time_start") time_start: String,
            @Query("time_end") time_end: String,
            @Query("p") p: Int
    ): Resp<List<AmountList>>

    /**
     * 资金提现-资金
     * @return
     */
    @POST("api/amount/withdraw")
    @FormUrlEncoded
    fun withdraw(
            @Field("money") money: String?, @Field("name") name: String?,
            @Field("bank") bank: String?, @Field("kbank") kbank: String?,
            @Field("number") number: String?
    ): Observable<Resp<Any>>

    /**
     *明细列表统计-资金
     * @return
     */
    @GET("api/amount/amountTotal")
    fun amountTotal(
            @Query("status") status: String,
            @Query("type") type: String,
            @Query("time_start") time_start: String,
            @Query("time_end") time_end: String,
            @Query("p") p: Int
    ): Observable<Resp<AmountCount>>


    /**
     * 系统卡号-资金
     * @return
     */
    @GET("api/amount/getCard")
    fun getCard(): Observable<Resp<Card>>


//    /**
//     * 资金充值-资金
//     * @return
//     */
//    @POST("api/amount/amountAdd")
//    @FormUrlEncoded
//    fun amountAdd(
//            @Field("money") money: String?,
//            @Field("pic") pic: String?
//    ): Observable<Resp<Any>>

    /**
     * 资金充值-资金
     * @return
     */
    @POST("api/amount/recharge2")
    @FormUrlEncoded
    suspend fun amountAdd(@Field("money") money: String?,
                          @Field("pay_type") pay_type: String?
    ): Resp<OrderPay>


    /**
     * 接单车辆-货主端
     * @return
     */
    @GET("api/info/carList")
    suspend fun carList(
            @Query("info_id") info_id: String?,
            @Query("p") p: Int
    ): Resp<List<DriverBean>>


    /**
     * 支付车主-货主
     * @return
     */
    @POST("api/info/carPay")
    @FormUrlEncoded
    fun carPay(
            @Field("money") money: String?,
            @Field("order_id") order_id: String?,
            @Field("pay_pwd") pay_pwd: String?
    ): Observable<Resp<Any>>


    /**
     * 评论
     * @return
     */
    @POST("api/info/eva")
    @FormUrlEncoded
    fun eva(
            @Field("order_id") order_id: String?, @Field("score") score: String?,
            @Field("content") content: String?
    ): Observable<Resp<Any>>


    /**
     * 订单评论
     * @return
     */
    @GET("api/info/orderEva")
    suspend fun orderEva(
            @Query("order_id") order_id: String?,
            @Query("p") p: Int
    ): Resp<List<OrderEva>>


    /**
     *统计-评论列表
     * @return
     */
    @GET("api/evaluate/evaCount")
    suspend fun evaCount(@Query("p") p: Int): Resp<AmountCount>


    /**
     * 明细列表-资金
     * @return
     */
    @GET("api/evaluate/evaList")
    suspend fun evaList(@Query("p") p: Int): Resp<List<OrderEva>>


    /**
     * 我的货主-列表
     * @return
     */
    @GET("api/owner/myOwn")
    suspend fun myOwn(@Query("k") k: String, @Query("p") p: Int): Resp<List<Own>>


    /**
     * 所有货主-列表
     * @return
     */
    @GET("api/owner/allOwn")
    suspend fun allOwn(@Query("k") k: String, @Query("p") p: Int): Resp<List<Own>>


    /**
     * 添加收藏-货主
     * @return
     */
    @GET("api/owner/setOwn")
    suspend fun setOwn(@Query("arr") arr: String?): Resp<Any>


    /**
     * 编辑-意见反馈
     * @return
     */
    @POST("api/guestbook/guestEdit")
    @FormUrlEncoded
    suspend fun guestEdit(
            @Field("fk_id") fk_id: String?, @Field("title") title: String?,
            @Field("content") content: String?, @Field("mobile") mobile: String?,
            @Field("image") image: String?, @Field("type") type: String?
    ): Resp<Any>


    /**
     * 列表-消息
     * @return
     */
    @GET("api/msg/msgList")
    suspend fun msgList(): Resp<List<MsgList>>


    /**
     * 修改资料
     * @return
     */
    @POST("api/user/setProfile")
    @FormUrlEncoded
    suspend fun setProfile(
            @Field("avatar") avatar: String?,
            @Field("name") name: String?
    ): Resp<Any>


    /**
     * 待开票列表-发票
     * @return
     */
    @GET("api/invoice/infoList")
    suspend fun infoList(
            @Query("start_time") start_time: String,
            @Query("end_time") end_time: String,
            @Query("p") p: Int
    ): Resp<List<InvoiceList>>


    /**
     * 可开发票金额
     * @return
     */
    @GET("api/invoice/invoiceTotal")
    suspend fun invoiceTotal(@Query("time") time: String, @Query("p") p: Int): Resp<InvoiceTotal>


    /**
     * 申请发票
     * @return
     */
    @POST("api/invoice/invoiceAdd")
    @FormUrlEncoded
    suspend fun invoiceAdd(
            @Field("ids") ids: String?, @Field("money") money: String?
    ): Resp<Any>


    /**
     * 删除收藏
     */
    @GET("api/driver/delDriver")
    suspend fun delDriver(@Query("arr") arr: String?): Resp<Any>


    /**
     * 统计折线-货主
     * @return
     */
    @GET("api/amount/amountLine")
    suspend fun amountLine(
            @Query("start_time") start_time: String?,
            @Query("end_time") end_time: String?, @Query("k") k: String?
    ): Resp<IconData>


    /**
     *凭证编辑 -司机端
     * @return
     */
    @FormUrlEncoded
    @POST("api/order/setImg")
    suspend fun setImg(@FieldMap params: HashMap<String, String>): Resp<Any>


    /**
     * 消息详情
     * @return
     */
    @GET("api/msg/msgGet")
    suspend fun msgGet(@Query("id") id: String?): Resp<MsgGet>


    /**
     * 获取验证码-修改支付密码
     *
     * @return
     */
    @GET("api/user/getSmsCode")
    suspend fun getSmsCode(): Resp<SendSmsBean>


    /**
     * 解绑微信
     *
     * @return
     */
    @GET("api/user/unBind")
    suspend fun unBind(): Resp<Any>

    /**
     * 绑定微信
     *
     * @return
     */
    @GET("api/user/wxBind")
    suspend fun wxBind(@Query("code") code: String?): Resp<Bind>


    /**
     * 应付保费试算
     * @return
     */
    @FormUrlEncoded
    @POST("api/baoxian/premiumTrial")
    suspend fun premiumTrial(
            @Field("amount") amount: String?,
            @Field("schemeCode") schemeCode: String?
    ): Resp<PremiumTrial>

    /**
     * 投保方案
     * @return
     */
    @POST("api/baoxian/insurancePlan")
    suspend fun insurancePlan(): Resp<List<InsurancePlan>>


    /**
     * 投保接口
     * @return
     */
    @FormUrlEncoded
    @POST("api/baoxian/insure")
    suspend fun insure(@FieldMap params: HashMap<String, String>): Resp<List<Any>>


    /**
     * 投保接口
     * @return
     */
    @FormUrlEncoded
    @POST("api/baoxian/insure")
    suspend fun insure(
            @Field("order_id") order_id: String,
            @Field("amount") amount: String,
            @Field("payMoney") payMoney: String,
            @Field("schemeCode") schemeCode: String,
            @Field("start_areaName") start_areaName: String,
            @Field("start_areaCode") start_areaCode: String,
            @Field("finish_areaName") finish_areaName: String,
            @Field("finish_areaCode") finish_areaCode: String,
            @Field("transfer_areaName[]") transfer_areaName: List<String>,
            @Field("transfer_areaCode[]") transfer_areaCode: List<String>,
            @Field("goodsName") goodsName: String,
            @Field("name") name: String,
            @Field("personnelType") personnelType: String,
            @Field("certificateType") certificateType: String,
            @Field("certificateNo") certificateNo: String,
            @Field("mobile") mobile: String,
            @Field("licensePlateNo") licensePlateNo: String,
            @Field("licensePlateType") licensePlateType: String,
    ): Resp<Any>


    /**
     *投保信息
     *
     * @return
     */
    @GET("api/baoxian/orderGet")
    suspend fun baoxianOrderGet(@Query("order_id") order_id: String?): Resp<OrderGet>


    /**
     *  保单详情
     * @return
     */
    @GET("api/baoxian/getInfo")
    suspend fun baoxianGetInfo(@Query("order_id") order_id: String?): Resp<OrderGet>


    /**
     *  司机来单提示
     * @return
     */
    @GET("api/info/checkdrive")
    suspend fun checkdrive(): Resp<Checkdrive>

}
