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
6f5136e9
Commit
6f5136e9
authored
Aug 01, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-member-john' of
http://113.105.137.151:22280/lify/rvapp
parents
28e683c8
e525a0e9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
16 deletions
+61
-16
HomeFragment.java
...java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
+8
-15
HomePresenter.java
.../home/rv/module/ui/main/home/presenter/HomePresenter.java
+52
-0
ShareActivity.java
plugin_share/src/main/java/com/rv/share/ShareActivity.java
+1
-1
icon_share.jpg
plugin_share/src/main/res/drawable-xhdpi/icon_share.jpg
+0
-0
icon_share.png
plugin_share/src/main/res/drawable-xhdpi/icon_share.png
+0
-0
No files found.
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
View file @
6f5136e9
...
@@ -70,6 +70,7 @@ import com.rv.home.rv.module.ui.main.home.bean.ListsBean;
...
@@ -70,6 +70,7 @@ import com.rv.home.rv.module.ui.main.home.bean.ListsBean;
import
com.rv.home.rv.module.ui.main.home.bean.OrderDataBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderDataBean
;
import
com.rv.home.rv.module.ui.main.home.bean.SelectedActivitiesBean
;
import
com.rv.home.rv.module.ui.main.home.bean.SelectedActivitiesBean
;
import
com.rv.home.rv.module.ui.main.home.bean.ShopListBean
;
import
com.rv.home.rv.module.ui.main.home.bean.ShopListBean
;
import
com.rv.home.rv.module.ui.main.home.presenter.HomePresenter
;
import
com.yuyife.banner.Banner
;
import
com.yuyife.banner.Banner
;
import
com.yuyife.banner.BannerConfig
;
import
com.yuyife.banner.BannerConfig
;
import
com.yuyife.banner.listener.OnBannerListener
;
import
com.yuyife.banner.listener.OnBannerListener
;
...
@@ -91,7 +92,7 @@ import io.reactivex.functions.Consumer;
...
@@ -91,7 +92,7 @@ import io.reactivex.functions.Consumer;
/**
/**
* 首页
* 首页
*/
*/
public
class
HomeFragment
extends
BaseFragment
<
Common
Presenter
>
implements
ObservableScrollView
.
ScrollViewListener
,
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
public
class
HomeFragment
extends
BaseFragment
<
Home
Presenter
>
implements
ObservableScrollView
.
ScrollViewListener
,
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
Unbinder
unbinder
;
Unbinder
unbinder
;
@BindView
(
R2
.
id
.
ll_layout_renting_a_car
)
@BindView
(
R2
.
id
.
ll_layout_renting_a_car
)
LinearLayout
llLayoutRentingACar
;
LinearLayout
llLayoutRentingACar
;
...
@@ -303,12 +304,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -303,12 +304,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
SelectedActivitiesBean
.
SelectedActivityItem
item
=
(
SelectedActivitiesBean
.
SelectedActivityItem
)
adapter
.
getItem
(
position
);
SelectedActivitiesBean
.
SelectedActivityItem
item
=
(
SelectedActivitiesBean
.
SelectedActivityItem
)
adapter
.
getItem
(
position
);
if
(
item
!=
null
&&
!
TextUtils
.
isEmpty
(
item
.
getUrl
())
&&
!
TextUtils
.
isEmpty
(
item
.
getName
()))
{
if
(
item
!=
null
&&
!
TextUtils
.
isEmpty
(
item
.
getUrl
())
&&
!
TextUtils
.
isEmpty
(
item
.
getName
()))
{
ComponentName
componentName
=
new
ComponentName
(
getActivity
(),
"com.rv.share.WebViewActivity"
);
mPresenter
.
toTarget
(
getActivity
(),
item
.
getUrl
(),
item
.
getName
());
Intent
intent
=
new
Intent
();
intent
.
setComponent
(
componentName
);
intent
.
putExtra
(
"url"
,
item
.
getUrl
());
intent
.
putExtra
(
"title"
,
item
.
getName
());
startActivity
(
intent
);
}
}
}
}
});
});
...
@@ -920,12 +916,9 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -920,12 +916,9 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
if
(
listsBanners
.
size
()
>
0
)
{
if
(
listsBanners
.
size
()
>
0
)
{
BeanHomeBanner
.
DataBean
bean
=
listsBanners
.
get
(
position
);
BeanHomeBanner
.
DataBean
bean
=
listsBanners
.
get
(
position
);
ComponentName
componentName
=
new
ComponentName
(
getActivity
(),
"com.rv.share.WebViewActivity"
);
if
(
bean
!=
null
&&
!
TextUtils
.
isEmpty
(
bean
.
getUrl
()))
{
Intent
intent
=
new
Intent
();
mPresenter
.
toTarget
(
getActivity
(),
bean
.
getUrl
(),
bean
.
getTitle
());
intent
.
setComponent
(
componentName
);
}
intent
.
putExtra
(
"url"
,
bean
.
getUrl
());
intent
.
putExtra
(
"title"
,
bean
.
getTitle
());
startActivity
(
intent
);
}
}
/* if (localImages != null && localImages.size() > 0) {
/* if (localImages != null && localImages.size() > 0) {
...
@@ -967,8 +960,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -967,8 +960,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
}
}
}
else
{
}
else
{
headTvGetShop
.
setText
(
""
);
headTvGetShop
.
setText
(
""
);
la
tLatitude
=
0
;
ge
tLatitude
=
0
;
lon
Longitude
=
0
;
get
Longitude
=
0
;
headTvOutShop
.
setText
(
""
);
headTvOutShop
.
setText
(
""
);
outLatitude
=
0
;
outLatitude
=
0
;
outLongitude
=
0
;
outLongitude
=
0
;
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/presenter/HomePresenter.java
0 → 100644
View file @
6f5136e9
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
presenter
;
import
android.content.ComponentName
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.text.TextUtils
;
import
com.rv.home.rv.module.basic.presenter.CommonPresenter
;
public
class
HomePresenter
extends
CommonPresenter
{
/******
* 打开目标页面
* @param context
* @param url
* @param title
*/
public
void
toTarget
(
Context
context
,
String
url
,
String
title
)
{
if
(
url
.
startsWith
(
"http"
))
{
ComponentName
componentName
=
new
ComponentName
(
context
,
"com.rv.share.WebViewActivity"
);
Intent
intent
=
new
Intent
();
intent
.
setComponent
(
componentName
);
intent
.
putExtra
(
"url"
,
url
);
intent
.
putExtra
(
"title"
,
title
);
context
.
startActivity
(
intent
);
}
else
if
(
url
.
startsWith
(
"app:"
))
{
String
target
=
null
;
String
[]
params
=
null
;
if
(
url
.
contains
(
"?"
))
{
target
=
url
.
substring
(
url
.
indexOf
(
":"
)
+
1
,
url
.
indexOf
(
"?"
));
String
paramsString
=
url
.
substring
(
url
.
indexOf
(
"?"
)
+
1
);
params
=
paramsString
.
split
(
"&"
);
}
else
{
target
=
url
.
substring
(
url
.
indexOf
(
":"
)
+
1
);
}
if
(!
TextUtils
.
isEmpty
(
target
))
{
ComponentName
componentName
=
new
ComponentName
(
context
,
target
);
Intent
intent
=
new
Intent
();
intent
.
setComponent
(
componentName
);
if
(
params
!=
null
&&
params
.
length
>
0
)
{
for
(
String
param
:
params
)
{
String
[]
values
=
param
.
split
(
"="
);
if
(
values
.
length
==
2
)
{
intent
.
putExtra
(
values
[
0
],
values
[
1
]);
}
}
}
context
.
startActivity
(
intent
);
}
}
}
}
plugin_share/src/main/java/com/rv/share/ShareActivity.java
View file @
6f5136e9
...
@@ -112,7 +112,7 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
...
@@ -112,7 +112,7 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
int
id
=
view
.
getId
();
int
id
=
view
.
getId
();
if
(
TextUtils
.
isEmpty
(
shareUrl
))
{
if
(
TextUtils
.
isEmpty
(
shareUrl
))
{
String
code
=
Cookie
.
getStringValue
(
getApplicationContext
(),
SPConstance
.
USER_JSON_CODE
,
""
);
String
code
=
Cookie
.
getStringValue
(
getApplicationContext
(),
SPConstance
.
USER_JSON_CODE
,
""
);
shareUrl
=
RvFrameConfig
.
HOST
+
"/h5/appHtml/view/invitationCourtesyShare.html?code="
+
code
+
"_P0101"
;
shareUrl
=
RvFrameConfig
.
HOST
+
"/h5/appHtml/view/invitationCourtesyShare.html?code="
+
code
;
}
}
if
(
id
==
R
.
id
.
tv_weixin
)
{
if
(
id
==
R
.
id
.
tv_weixin
)
{
mPresenter
.
shareWx
(
shareUrl
,
"新人专享大礼包,快去领!"
,
" "
);
mPresenter
.
shareWx
(
shareUrl
,
"新人专享大礼包,快去领!"
,
" "
);
...
...
plugin_share/src/main/res/drawable-xhdpi/icon_share.jpg
deleted
100644 → 0
View file @
28e683c8
49.1 KB
plugin_share/src/main/res/drawable-xhdpi/icon_share.png
0 → 100644
View file @
6f5136e9
18.3 KB
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