package com.cheng.bole.ui.fragment.merchant.detail

import com.cheng.bole.net.ApiFactory
import com.example.base.utils.L
import com.example.base.viewmodel.BaseViewModel
import com.google.gson.JsonObject
import okhttp3.RequestBody.Companion.toRequestBody

class MerchantGoodsDetailViewModel: BaseViewModel() {

    fun sendAuth() {
        launchOnUiTryCatch({
            val jsonObject = JsonObject()
            jsonObject.addProperty("scene", "info")
            jsonObject.addProperty("count", 1)
            ApiFactory.apiService.sendAuth(jsonObject.toString().toRequestBody())
        }, {
            L.d(it)
        })
    }
}