package com.quyunshuo.module.home.fragment.repo

import android.app.Application
import android.util.Log
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.module.database.room.SZDatabase
import com.module.pay.service.HomeApiService
import com.quyunshuo.androidbaseframemvvm.base.mvvm.m.BaseRepository
import com.quyunshuo.androidbaseframemvvm.base.utils.SpUtils
import com.quyunshuo.androidbaseframemvvm.common.bean.ProductDataBean
import com.quyunshuo.androidbaseframemvvm.common.constant.MMKVName
import javax.inject.Inject

/**
 * HomeFragment的数据仓库层
 *
 * @author Qu Yunshuo
 * @since 2021/8/5 10:59 下午
 */
class SleepFragmentRepo @Inject constructor(application: Application) : BaseRepository() {
    private val TAG = "SleepFragmentRepo"
    @Inject
    lateinit var mApi: HomeApiService

    //请求密码
    suspend fun getPwd()=request<String> {
        var map = HashMap<String,String>()
        map.put("clientId","1665390239546718508779646")
        mApi.getPwd(map).run {
            emit(data)
        }
    }

}