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
859a19a6
Commit
859a19a6
authored
Feb 04, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.测试模块,登录接入优先一键登录功能
parent
a69ee716
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
15 deletions
+19
-15
TestHomeEventImpl.kt
m-tests/src/main/java/com/yidianling/tests/home/event/TestHomeEventImpl.kt
+1
-5
TestPlugin.kt
m-tests/src/main/java/com/yidianling/tests/home/plugin/TestPlugin.kt
+1
-3
TestCategoryListActivity.kt
m-tests/src/main/java/com/yidianling/tests/list/view/TestCategoryListActivity.kt
+2
-2
TestListActivity.kt
m-tests/src/main/java/com/yidianling/tests/list/view/TestListActivity.kt
+4
-5
TestsIn.kt
m-tests/src/main/java/com/yidianling/tests/router/TestsIn.kt
+11
-0
No files found.
m-tests/src/main/java/com/yidianling/tests/home/event/TestHomeEventImpl.kt
View file @
859a19a6
...
...
@@ -33,11 +33,7 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent {
* 跳转我的界面
*/
override
fun
jumpMine
()
{
// TestHomeUtils.buildJumpMine(context!!)
if
(!
TestsIn
.
isLogin
())
{
//如果未登录 走登录逻辑
context
!!
.
startActivity
(
TestsIn
.
loginWayIntent
(
context
as
Activity
))
if
(!
TestsIn
.
loginByOneKeyLogin
(
context
as
Activity
,
true
))
{
return
}
val
testParam
=
H5Params
(
HttpConfig
.
MH5_URL
+
"ceshi/my-test"
,
"测试记录"
)
...
...
m-tests/src/main/java/com/yidianling/tests/home/plugin/TestPlugin.kt
View file @
859a19a6
...
...
@@ -67,10 +67,8 @@ class TestPlugin : MethodChannel.MethodCallHandler {
}
}
GO_MY_TESTS
->
{
// ActionCountUtils.count(TestBIConstants.YDL_TEST__MAIN_MY_TEST_CLICK)
if
(!
TestsIn
.
isLogin
())
{
if
(!
TestsIn
.
loginByOneKeyLogin
(
mActivity
!!
,
true
))
{
//如果未登录 走登录逻辑
mActivity
?.
startActivity
(
TestsIn
.
loginWayIntent
(
mActivity
!!
))
return
}
val
testParam
=
H5Params
(
HttpConfig
.
MH5_URL
+
"ceshi/my-test"
,
"测试记录"
)
...
...
m-tests/src/main/java/com/yidianling/tests/list/view/TestCategoryListActivity.kt
View file @
859a19a6
...
...
@@ -136,8 +136,8 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
BuryPointUtils
.
getInstance
().
createMap
()
.
put
(
"test_type_click"
,
testCategory
?.
get
(
position
)
?.
name
+
""
)
.
burryPoint
(
"Testtype_click"
)
if
((
"my"
==
testCategory
?.
get
(
position
)
?.
tab
||
"unpay"
==
testCategory
?.
get
(
position
)
?.
tab
)
&&
!
TestsIn
.
isLogin
()
)
{
startActivity
(
TestsIn
.
loginWayIntent
(
this
@TestCategoryListActivity
)
)
if
((
"my"
==
testCategory
?.
get
(
position
)
?.
tab
||
"unpay"
==
testCategory
?.
get
(
position
)
?.
tab
)
)
{
TestsIn
.
loginByOneKeyLogin
(
this
@TestCategoryListActivity
,
true
)
}
}
})
...
...
m-tests/src/main/java/com/yidianling/tests/list/view/TestListActivity.kt
View file @
859a19a6
...
...
@@ -57,11 +57,10 @@ class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityP
LogUtil
.
d
(
"page selected: "
+
testCategorys
?.
get
(
position
)
?.
name
)
BuryPointUtils
.
getInstance
().
createMap
()
.
put
(
"test_type_click"
,
testCategorys
?.
get
(
position
)
?.
name
+
""
)
.
burryPoint
(
"Testtype_click"
)
if
((
"my"
==
testCategorys
?.
get
(
position
)
?.
tab
||
"unpay"
==
testCategorys
?.
get
(
position
)
?.
tab
)
&&
!
TestsIn
.
isLogin
())
{
// RouterManager.startActivity(this@TestListActivity,RouterEnum.USER,null,ClassNameEnum.ChooseLoginWayActivity)
startActivity
(
TestsIn
.
loginWayIntent
(
this
@TestListActivity
))
.
put
(
"test_type_click"
,
testCategorys
?.
get
(
position
)
?.
name
+
""
)
.
burryPoint
(
"Testtype_click"
)
if
((
"my"
==
testCategorys
?.
get
(
position
)
?.
tab
||
"unpay"
==
testCategorys
?.
get
(
position
)
?.
tab
))
{
TestsIn
.
loginByOneKeyLogin
(
this
@TestListActivity
,
true
)
}
}
})
...
...
m-tests/src/main/java/com/yidianling/tests/router/TestsIn.kt
View file @
859a19a6
package
com.yidianling.tests.router
import
android.app.Activity
import
android.content.Context
import
android.content.Intent
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.router.YdlUserInfo
...
...
@@ -68,4 +69,13 @@ object TestsIn {
fun
myRedPockIntent
(
activity
:
Activity
){
getAppService
().
myRedPockIntent
(
activity
)
}
/**
* 调用优先使用一键登录,并返回调用时的登录状态,
* @param isOpenDialog true:一键登录使用弹窗展示 false:一键登录使用全屏模式
* @return true:已登录,不触发登录跳转,false:未登录,优先一键登录
* */
fun
loginByOneKeyLogin
(
context
:
Context
,
isOpenDialog
:
Boolean
)
:
Boolean
{
return
getUserService
().
loginByOneKeyLogin
(
context
,
isOpenDialog
)
}
}
\ 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