package com.quansu.heifengwuliu.vmodel

import android.os.Bundle
import com.quansu.heifengwuliu.activity.SourceDetailsActivity
import com.ysnows.base.base.BRRepository
import com.ysnows.base.base.BRViewModel
import com.ysnows.base.utils.UiSwitch

class OrderListVModel : BRViewModel<BRRepository>() {

//    override fun firstReq() {
//        super.firstReq()
//    }



    fun getOrderStatus(status:Int):String{
        return when (status){
            10-> "待支付"
            20-> "待接单"
            30-> "进行中"
            40-> "已完成"
            40-> "已取消"
            else-> ""
        }

    }

    fun gotoInfoDetails(info_id:String){
        //到详情界面
        UiSwitch.bundle(repository().context, SourceDetailsActivity::class.java, Bundle().apply {
            putString("info_id", info_id)
            putString("type","0")
        })


    }


}
