HomeImpl.kt 1.34 KB
Newer Older
徐健 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package com.yidianling.home.event

import android.content.Context
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.Utils
import com.yidianling.home.constract.IHomeContract

/**
 * @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
 * @描述: 首页点击事件实现类
 * @Copyright Copyright (c) 2019
 * @Company 壹点灵
 * @date 2019/02/13
 */
konghaorui committed
17
open class HomeImpl(context: Context, homeView: IHomeContract.View) : HomeBaseImpl(context, homeView), IHomeEvent {
徐健 committed
18 19 20 21 22
    override fun museMoreClick(dataJson: String) {
        if (Utils.isFastClick()) {
            //防止连击
            return
        }
23 24 25 26
        YDLRouterManager.router(
            IYDLRouterConstant.ROUTER_MUSE,
            YDLRouterParams().putExtra(IYDLRouterConstant.MUSIC_URL, "")
                .putExtra(IYDLRouterConstant.DATA_JSON, dataJson))
徐健 committed
27 28 29 30 31 32 33
    }

    override fun museClick(musicUrl: String, dataJson: String) {
        if (Utils.isFastClick()) {
            //防止连击
            return
        }
34 35 36 37
        YDLRouterManager.router(
            IYDLRouterConstant.ROUTER_MUSE,
            YDLRouterParams().putExtra(IYDLRouterConstant.MUSIC_URL, musicUrl)
                .putExtra(IYDLRouterConstant.DATA_JSON, dataJson))
徐健 committed
38 39 40
    }

}