package com.zswc.creativity.vmodel

import android.app.Activity
import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.hwangjr.rxbus.RxBus
import com.zswc.creativity.activity.LoginActivity
import com.tencent.mmkv.MMKV
import com.ysnows.base.base.BRepository
import com.ysnows.base.base.BViewModel
import com.ysnows.base.utils.B
import com.ysnows.base.utils.UiSwitch
import com.zswc.creativity.activity.PaySuessActivity
import com.zswc.creativity.activity.TibOrderActivity
import com.zswc.creativity.config.ConfigRx

class WithdrawSuessVModel(application: Application) : BViewModel<BRepository>(application)  {

    var price = MutableLiveData<String>()
    var orderid = MutableLiveData<String>()
    var type = MutableLiveData<String>()



    fun toGoHome(){

        RxBus.get().post(ConfigRx.PAY_COMPLETE_CLOSE,"")

        ( repository().context as Activity).finish()

    }
    fun toOrderList(){

        UiSwitch.bundle(repository().context, TibOrderActivity::class.java,
                B().putString("orderid", orderid.value.toString())
                        .putString("type", type.value.toString())
                        .ok())

    }





}
