Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
c9cbf9b4
Commit
c9cbf9b4
authored
Nov 15, 2019
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程播放、登录判断
parent
4261a590
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
8 deletions
+22
-8
config.gradle
config.gradle
+3
-3
CoursePlugin.kt
m-course/src/main/java/com/yidianling/course/flutterPlugin/CoursePlugin.kt
+17
-3
gradle.properties
ydl-flutter-base/gradle.properties
+2
-2
No files found.
config.gradle
View file @
c9cbf9b4
ext
{
kotlin_version
=
'1.3.21'
dev_mode
=
fals
e
dev_mode
=
tru
e
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'
,
...
...
m-course/src/main/java/com/yidianling/course/flutterPlugin/CoursePlugin.kt
View file @
c9cbf9b4
...
...
@@ -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 视屏播放
...
...
ydl-flutter-base/gradle.properties
View file @
c9cbf9b4
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment