package com.yidianling.tests.modular

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.tests.api.service.ITestsApiService

/**
 * Created by haorui on 2019-10-31 .
 * Des:
 */
@Route(path = "/tests/TestsApiService")
public class TestsApiServiceImp : ITestsApiService {

    override fun init(context: Context?) {
    }

    override fun testH5Result(testResultId: String) {
        YDLRouterManager.router(
            IYDLRouterConstant.ROUTER_H5_H5,
            YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, HttpConfig.MH5_URL+"ceshi/result/"+testResultId),"")
    }

    override fun testDetailH5(testId: String) {
        YDLRouterManager.router(
            IYDLRouterConstant.ROUTER_H5_H5,
            YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, HttpConfig.MH5_URL+"ceshi/"+testId),"")
    }
}