HomeModelImpl.kt 1.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
package com.yidianling.home.model

import com.cxzapp.yidianling_atk8.ui.homepager.http.HomeHttp
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.data.http.BaseResponse
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.mvp.base.BaseModel
import com.yidianling.home.constract.IHomeContract
import com.yidianling.home.model.bean.*
import io.reactivex.Observable
import okhttp3.MediaType
import okhttp3.RequestBody

/**
 * @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
 * @描述:
 * @Copyright Copyright (c) 2019
 * @Company 壹点灵
 * @date 2019/02/13
 */
class HomeModelImpl: BaseHomeModelImpl(), IHomeContract.Model  {

    //领取优惠券
    override fun receiveCoupon(uid: String, couponIds: String): Observable<BaseResponse<Any>> {

        return HomeHttp.getInstance().receiveCoupon(uid, couponIds)
    }

    //获取优惠券
    override fun getCoupons(uid: String): Observable<BaseResponse<List<CouponBean>>> {

        return HomeHttp.getInstance().getCoupons(uid)
    }

}