Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
lify
RvApp
Commits
d63bf6d5
Commit
d63bf6d5
authored
Sep 25, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_im' of
http://113.105.137.151:22280/lify/rvapp
into master-video
parents
d8c48563
7e4fbcbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
HomePresenter.java
.../home/rv/module/ui/main/home/presenter/HomePresenter.java
+22
-1
No files found.
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/presenter/HomePresenter.java
View file @
d63bf6d5
...
@@ -6,6 +6,8 @@ import android.content.Intent;
...
@@ -6,6 +6,8 @@ import android.content.Intent;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.rv.home.rv.module.ui.login.LoginRvActivity
;
import
com.yuyife.okgo.OkGoUtil
;
public
class
HomePresenter
extends
CommonPresenter
{
public
class
HomePresenter
extends
CommonPresenter
{
...
@@ -16,6 +18,12 @@ public class HomePresenter extends CommonPresenter {
...
@@ -16,6 +18,12 @@ public class HomePresenter extends CommonPresenter {
* @param title
* @param title
*/
*/
public
void
toTarget
(
Context
context
,
String
url
,
String
title
)
{
public
void
toTarget
(
Context
context
,
String
url
,
String
title
)
{
if
(!
TextUtils
.
isEmpty
(
url
)
&&
url
.
contains
(
"login=1"
))
{
if
(!
isLogin
(
context
))
{
return
;
}
}
if
(
url
.
startsWith
(
"http"
))
{
if
(
url
.
startsWith
(
"http"
))
{
ComponentName
componentName
=
new
ComponentName
(
context
,
"com.rv.share.WebViewActivity"
);
ComponentName
componentName
=
new
ComponentName
(
context
,
"com.rv.share.WebViewActivity"
);
Intent
intent
=
new
Intent
();
Intent
intent
=
new
Intent
();
...
@@ -45,8 +53,21 @@ public class HomePresenter extends CommonPresenter {
...
@@ -45,8 +53,21 @@ public class HomePresenter extends CommonPresenter {
}
}
}
}
}
}
context
.
startActivity
(
intent
);
}
}
}
}
}
}
/**
* 判断是否登录
*
* @return
*/
private
boolean
isLogin
(
Context
context
)
{
if
(
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
context
.
startActivity
(
LoginRvActivity
.
getIntent
(
context
,
0
));
return
false
;
}
return
true
;
}
}
}
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