Commit a0726ba8 by konghaorui

补充动态接口

parent 0e15c16c
package com.yidianling.dynamic.modular.service
import android.app.Activity
import android.content.Context
import android.content.Intent
import com.alibaba.android.arouter.facade.annotation.Route
import com.yidianling.dynamic.activity.TrendsReplyInfoActivity
import com.yidianling.dynamic.api.IDynamicService
import com.yidianling.dynamic.members.MembersActivity
import com.yidianling.dynamic.publishTrend.PublishTrendActivity
import com.yidianling.dynamic.topic.topicDetail.TopicDetailActivity
import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity
/**
* Created by haorui on 2019-12-17 .
* Des:
*/
@Route(path = "/dynamic/DynamicService")
class DynamicServiceImp : IDynamicService {
override fun init(context: Context?) {
}
override fun membersIntent(activity: Activity, userId: String): Intent {
return MembersActivity.newIntent(activity, userId)
}
override fun replyInfoIntent(activity: Activity, replyId: String, aid: String): Intent {
return TrendsReplyInfoActivity.newIntent(activity, replyId, aid)
}
override fun trendsDetailIntent(activity: Activity, trendId: Int): Intent {
return TrendsDetailActivity.newIntent(activity, trendId)
}
override fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean): Intent {
return TrendsDetailActivity.newIntent(activity, trendId, isScrollToZan)
}
override fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean, lastId: Int): Intent {
return TrendsDetailActivity.newIntent(activity, trendId, isScrollToZan, lastId)
}
override fun publishTrendIntent(activity: Activity, url: String, cover: String, title: String): Intent {
return PublishTrendActivity.newIntent(activity, url, cover, title)
}
override fun publishFmToTrend(activity: Activity, url: String, cover: String, title: String): Intent {
return PublishTrendActivity.newIntentForFm(activity, url, cover, title, 1)
}
override fun publishArticleToTrend(activity: Activity, url: String, cover: String, title: String): Intent {
return PublishTrendActivity.newIntentForArticle(activity, url, cover, title)
}
override fun topicDetailIntent(context: Context, isSplash: Boolean, topicId: String): Intent {
return TopicDetailActivity.newIntent(context, isSplash, topicId)
}
}
\ No newline at end of file
...@@ -8,6 +8,7 @@ import com.yidianling.dynamic.members.MembersActivity ...@@ -8,6 +8,7 @@ import com.yidianling.dynamic.members.MembersActivity
import com.yidianling.dynamic.publishTrend.PublishTrendActivity import com.yidianling.dynamic.publishTrend.PublishTrendActivity
import com.yidianling.dynamic.topic.topicDetail.TopicDetailActivity import com.yidianling.dynamic.topic.topicDetail.TopicDetailActivity
import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity
import com.yidianling.dynamic.api.IDynamicService
import com.yidianling.router.dynamic.IDynamicRouter import com.yidianling.router.dynamic.IDynamicRouter
class DynamicRouterImp : IDynamicRouter { class DynamicRouterImp : IDynamicRouter {
......
package com.yidianling.dynamic.api
import android.app.Activity
import android.content.Context
import android.content.Intent
import com.alibaba.android.arouter.facade.template.IProvider
interface IDynamicService : IProvider {
fun membersIntent(activity: Activity, userId: String): Intent
fun replyInfoIntent(activity: Activity, replyId: String, aid: String): Intent
fun trendsDetailIntent(activity: Activity, trendId: Int): Intent
fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean): Intent
fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean, lastId: Int): Intent
fun publishTrendIntent(activity: Activity, url: String, cover: String, title: String): Intent
fun publishFmToTrend(activity: Activity, url: String, cover: String, title: String): Intent
fun topicDetailIntent(context: Context, isSplash: Boolean, topicId: String): Intent
fun publishArticleToTrend(activity: Activity, url: String, cover: String, title: String): Intent
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment