Commit ff5d495d by YKai

feat: 新增js方法拆分

parent 9e1eeb54
...@@ -5,9 +5,9 @@ import android.content.Context ...@@ -5,9 +5,9 @@ import android.content.Context
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.facade.template.IProvider import com.alibaba.android.arouter.facade.template.IProvider
import com.ydl.webview.H5JsBean import com.ydl.webview.H5JsBean
import com.yidianling.consultant.OnBottomWordListener
import com.yidianling.consultant.bean.GuideBean import com.yidianling.consultant.bean.GuideBean
import com.yidianling.consultant.bean.Keyworks import com.yidianling.consultant.bean.Keyworks
import com.yidianling.consultant.OnBottomWordListener
/** /**
* Created by xj on 2019/11/14. * Created by xj on 2019/11/14.
...@@ -53,6 +53,6 @@ interface IConsultantService: IProvider { ...@@ -53,6 +53,6 @@ interface IConsultantService: IProvider {
fun getbottomWord(type: Int, listener: OnBottomWordListener) fun getbottomWord(type: Int, listener: OnBottomWordListener)
// 预览资源 // 预览资源
fun resourceToPreview(dataList:List<H5JsBean.MediaInfo>?,params:H5JsBean.H5JsCmd.Params,activity: Activity) fun resourceToPreview(dataList: List<H5JsBean.MediaInfo>?, params: H5JsBean.H5JsCmd.Params, activity: Activity)
} }
\ No newline at end of file
...@@ -154,11 +154,12 @@ class ConsultantServiceImp : IConsultantService { ...@@ -154,11 +154,12 @@ class ConsultantServiceImp : IConsultantService {
}) })
} }
override fun resourceToPreview(dataList:List<H5JsBean.MediaInfo>?,params:H5JsBean.H5JsCmd.Params,activity: Activity) { override fun resourceToPreview(dataList: List<H5JsBean.MediaInfo>?, params: H5JsBean.H5JsCmd.Params, activity: Activity) {
val mThumbViewInfoList: MutableList<UserViewInfo> = ArrayList() val mThumbViewInfoList: MutableList<UserViewInfo> = ArrayList()
dataList?.let { dataList?.let {
for (mediaInfo in it) { for (mediaInfo in it) {
val userViewInfo = UserViewInfo(mediaInfo.cover, mediaInfo.url, mediaInfo.sourcesType) val userViewInfo =
UserViewInfo(mediaInfo.cover, mediaInfo.url, mediaInfo.sourcesType)
val bounds = Rect() val bounds = Rect()
bounds.left = ScreenUtils.getScreenWidth() / 2 bounds.left = ScreenUtils.getScreenWidth() / 2
bounds.top = ScreenUtils.getScreenHeight() / 2 bounds.top = ScreenUtils.getScreenHeight() / 2
......
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