Commit c9cbf9b4 by 严久程

课程播放、登录判断

parent 4261a590
ext {
kotlin_version = '1.3.21'
dev_mode = false
dev_mode = true
ydl_app = [
appName : "心理咨询壹点灵",
......@@ -173,8 +173,8 @@ ext {
"ydl-device" : 'com.ydl:device-id:0.0.7@aar',
//flutter功能组件升级===>发布ydl-flutter-base组件===>引用flutter相关的业务模块
"ydl-flutter" : 'com.ydl:ydl-flutter:0.0.6@aar',
"ydl-flutter-base" : 'com.ydl:ydl-flutter-base:0.0.2@aar',
"ydl-flutter" : 'com.ydl:ydl-flutter:0.0.7@aar',
"ydl-flutter-base" : 'com.ydl:ydl-flutter-base:0.0.3@aar',
//基础组件 <<--- 先发这个,发完改这里的版本号
"ydl-platform" : 'com.ydl:ydl-platform:0.0.18@aar',
......
......@@ -64,8 +64,9 @@ class CoursePlugin : MethodChannel.MethodCallHandler {
GETPUBLICPARAMAS -> {
val loginBean = ModularServiceManager.getPlatformUserService()?.getUser()
val mMap = mutableMapOf<String, Any>()
var uid = loginBean?.userId ?: ""
mMap["isDevelopment"] = BuildConfig.DEBUG
mMap["uid"] = loginBean?.userId ?: 0
mMap["uid"] = if (TextUtils.isEmpty(uid)) "0" else uid
mMap["accessToken"] = loginBean?.token ?: ""
?: ""
mMap["isFromApp"] = "1"
......@@ -83,6 +84,9 @@ class CoursePlugin : MethodChannel.MethodCallHandler {
if (jumpUrl!!.startsWith("http")) {
val h5Params = H5Params(jumpUrl, "")
NewH5Activity.start(mFragment!!.activity, h5Params)
PlayerFloatHelper.hide()
PlayerFloatHelper.removeView(mFragment!!.activity!!)
AudioPlayer.get().stopPlayer()
CourseSendPlugin.sendMsg(false)
return
}
......@@ -104,11 +108,17 @@ class CoursePlugin : MethodChannel.MethodCallHandler {
var uri = Uri.parse(jumpUrl)
var resultParams = uri.getQueryParameter("params")
val jsonObject = JSONObject(resultParams)
val h5Params = H5Params(CourseConstants.COURSE_DETAIL_H5 + jsonObject.getString("id"), "课程详情")
val h5Params = H5Params(
CourseConstants.COURSE_DETAIL_H5 + jsonObject.getString("id"),
"课程详情"
)
NewH5Activity.start(mFragment!!.activity, h5Params)
}
else -> YDLRouterManager.router(jumpUrl)
}
PlayerFloatHelper.hide()
PlayerFloatHelper.removeView(mFragment!!.activity!!)
AudioPlayer.get().stopPlayer()
CourseSendPlugin.sendMsg(false)
}
}
......@@ -160,8 +170,12 @@ class CoursePlugin : MethodChannel.MethodCallHandler {
if (demoType == 1) {
music.path = url
PlayerFloatHelper.show(mFragment!!.activity,playTypeEnum=PlayTypeEnum.PLAY_TYPE_COURSE)
AudioPlayer.get().singlePlay(music)
PlayerFloatHelper.show(
mFragment!!.activity,
playTypeEnum = PlayTypeEnum.PLAY_TYPE_COURSE
)
}
if (demoType == 2) {
//todo 视屏播放
......
IS_PUBLISH=true
VERSION_NAME=0.0.2
\ No newline at end of file
VERSION_NAME=0.0.3
\ 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