IHotSearchContract.kt 1.52 KB
Newer Older
1 2 3 4 5 6 7
package com.yidianling.consultant.contract

import android.content.Context
import com.ydl.ydlcommon.mvp.base.IModel
import com.ydl.ydlcommon.mvp.base.IPresenter
import com.ydl.ydlcommon.mvp.base.IView
import com.yidianling.consultant.bean.HotSearchBean
upwork.021 committed
8
import com.yidianling.consultant.bean.SearchWordsBean
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
import io.reactivex.Observable

/**
 * @author yuanWai
 * @描述: 搜索页面约束类
 * @Copyright Copyright (c) 2019
 * @Company 壹点灵
 * @date 2019/03/19
 */
class IHotSearchContract {

    interface View : IView {
        /**
         * 搜索页接口
         */
        fun searchDataResponse(hotSearchBean: HotSearchBean)

        /**
         * 请求失败
         */
        fun requestFail()
upwork.021 committed
30 31 32 33

        /**
         * 联想词请求成功结果
         */
34
        fun getSearchWordsSuccess(searchWordsBean: SearchWordsBean,searchContent:String,isClickWords:Boolean)
35 36 37 38 39 40 41 42 43 44 45 46
    }

    interface Presenter : IPresenter<View> {
        /**
         * 获取本地缓存
         */
        fun localData(context: Context)

        /**
         * 搜索页接口请求
         */
        fun searchData()
upwork.021 committed
47 48 49 50

        /**
         * 获取联想词
         */
51
        fun getSearchWords(map:HashMap<String,Any>,searchContent:String,isClickWords:Boolean)
52 53 54 55 56 57 58
    }

    interface Model : IModel {
        /**
         * 搜索页接口
         */
        fun searchData(): Observable<HotSearchBean>
upwork.021 committed
59 60 61 62 63

        /**
         * 获取到联想词
         */
        fun getSearchWords(map:HashMap<String,Any>): Observable<SearchWordsBean>
64 65
    }
}