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
dc7a3c15
Commit
dc7a3c15
authored
Dec 09, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
旅游和营地、活动修改
parent
e877620d
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
449 additions
and
85 deletions
+449
-85
build.gradle
RvClient/build.gradle
+2
-2
MainActivity.java
RvClient/src/main/java/com/xxfc/rv/MainActivity.java
+32
-12
shape_rv_travel_search_line.xml
...rce/src/main/res/drawable/shape_rv_travel_search_line.xml
+1
-1
AndroidManifest.xml
module_camp/src/main/AndroidManifest.xml
+4
-0
CampFragment.java
module_camp/src/main/java/com/rv/camp/CampFragment.java
+22
-4
CampSearchActivity.java
...mp/src/main/java/com/rv/camp/camp/CampSearchActivity.java
+199
-0
activity_camp.xml
module_camp/src/main/res/layout/activity_camp.xml
+69
-40
activity_camp_search.xml
module_camp/src/main/res/layout/activity_camp_search.xml
+58
-0
rv_item_camp_list.xml
module_camp/src/main/res/layout/rv_item_camp_list.xml
+2
-2
HomeFragment.java
...java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
+23
-3
TourismFragment.java
...tourism/src/main/java/com/rv/tourism/TourismFragment.java
+11
-0
activity_tourism.xml
module_tourism/src/main/res/layout/activity_tourism.xml
+0
-1
TravelSearchActivity.java
...rch/src/main/java/com/rv/search/TravelSearchActivity.java
+17
-18
RvWebView.java
plugin_share/src/main/java/com/rv/share/view/RvWebView.java
+9
-2
No files found.
RvClient/build.gradle
View file @
dc7a3c15
...
...
@@ -8,8 +8,8 @@ android {
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
flavorDimensions
"default"
versionCode
15
4
versionName
"1.5.
4
"
versionCode
15
6
versionName
"1.5.
6
"
multiDexEnabled
true
...
...
RvClient/src/main/java/com/xxfc/rv/MainActivity.java
View file @
dc7a3c15
...
...
@@ -161,6 +161,7 @@ public class MainActivity extends BaseActivity<CommonPresenter> implements DownL
private
String
imPassword
;
private
LocationManager
locationManager
;
private
ClipboardManager
cm
;
public
static
Intent
getIntent
(
Context
context
)
{
return
new
Intent
(
context
,
MainActivity
.
class
);
...
...
@@ -634,11 +635,15 @@ public class MainActivity extends BaseActivity<CommonPresenter> implements DownL
}
/**
* 获取粘贴板数据
* 获取口令
*
* @return
*/
private
void
initCopy
()
{
private
String
getCopy
()
{
String
content
=
null
;
ClipboardManager
cm
=
(
ClipboardManager
)
getSystemService
(
CLIPBOARD_SERVICE
);
String
copyCode
=
null
;
cm
=
(
ClipboardManager
)
getSystemService
(
CLIPBOARD_SERVICE
);
try
{
ClipData
data
=
cm
.
getPrimaryClip
();
ClipData
.
Item
item
=
data
.
getItemAt
(
0
);
...
...
@@ -646,19 +651,34 @@ public class MainActivity extends BaseActivity<CommonPresenter> implements DownL
if
(!
TextUtils
.
isEmpty
(
content
)
&&
content
.
contains
(
"⇥"
)
&&
content
.
contains
(
"⇤"
))
{
int
i
=
content
.
lastIndexOf
(
"⇥"
)
+
1
;
int
i2
=
content
.
lastIndexOf
(
"⇤"
);
String
copyCode
=
content
.
substring
(
i
,
i2
);
String
code
=
Cookie
.
getStringValue
(
getApplicationContext
(),
SPConstance
.
USER_JSON_CODE
,
""
);
if
(!
copyCode
.
equals
(
code
))
{
//判断是否是自己点分享,防止
getShareUser
(
copyCode
);
}
// 清除剪贴板
ClipData
clip
=
ClipData
.
newPlainText
(
""
,
""
);
cm
.
setPrimaryClip
(
clip
);
String
password
=
content
.
substring
(
i
,
i2
);
int
length
=
password
.
length
();
copyCode
=
password
.
substring
(
14
,
length
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
copyCode
;
}
/**
* 获取粘贴板数据
*/
private
void
initCopy
()
{
String
copyCode
=
getCopy
();
if
(!
TextUtils
.
isEmpty
(
copyCode
))
{
AppCookie
.
save
(
"code"
,
copyCode
);
String
code
=
Cookie
.
getStringValue
(
getApplicationContext
(),
SPConstance
.
USER_JSON_CODE
,
""
);
if
(!
code
.
equals
(
copyCode
))
{
//判断是否是自己点分享,防止
getShareUser
(
copyCode
);
}
}
// 清除剪贴板
ClipData
clip
=
ClipData
.
newPlainText
(
""
,
""
);
cm
.
setPrimaryClip
(
clip
);
cm
=
null
;
}
/**
...
...
plugin_search
/src/main/res/drawable/shape_rv_travel_search_line.xml
→
component_resource
/src/main/res/drawable/shape_rv_travel_search_line.xml
View file @
dc7a3c15
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"
@dimen/size_60
"
/>
<corners
android:radius=
"
60dp
"
/>
<solid
android:color=
"@color/colorLine"
/>
</shape>
\ No newline at end of file
module_camp/src/main/AndroidManifest.xml
View file @
dc7a3c15
...
...
@@ -2,4 +2,8 @@
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.rv.camp"
>
<application>
<activity
android:name=
".camp.CampSearchActivity"
></activity>
</application>
</manifest>
\ No newline at end of file
module_camp/src/main/java/com/rv/camp/CampFragment.java
View file @
dc7a3c15
...
...
@@ -8,7 +8,10 @@ import android.os.Bundle;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.EditText
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.baidu.location.BDAbstractLocationListener
;
...
...
@@ -29,7 +32,7 @@ import com.rv.camp.adapter.CampTypeListAdapter;
import
com.rv.camp.api.CampApi
;
import
com.rv.camp.bean.CampListBean
;
import
com.rv.camp.bean.CampTypeBean
;
import
com.rv.camp.camp.Camp
Detail
Activity
;
import
com.rv.camp.camp.Camp
Search
Activity
;
import
com.rv.camp.camp.CampShopShowActivity
;
import
com.rv.camp.presenter.CampPresenter
;
...
...
@@ -38,9 +41,10 @@ import java.util.List;
import
java.util.Map
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
butterknife.Unbinder
;
import
io.reactivex.functions.Consumer
;
import
pub.devrel.easypermissions.AppSettingsDialog
;
/**
* 营地
...
...
@@ -56,6 +60,8 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
@BindView
(
R2
.
id
.
refresh
)
SimpleRefreshLayout
mSimpleRefreshLayout
;
Unbinder
unbinder
;
private
boolean
isOpen
=
true
;
private
CampListAdapter
campAdapter
;
...
...
@@ -172,7 +178,7 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
mSimpleRefreshLayout
.
onRefreshComplete
();
}
@OnClick
({
R2
.
id
.
tv_camp_type
,
R2
.
id
.
iv_camp_map
,
R2
.
id
.
v_shadow
})
@OnClick
({
R2
.
id
.
tv_camp_type
,
R2
.
id
.
iv_camp_map
,
R2
.
id
.
v_shadow
,
R2
.
id
.
ll_item_search
})
public
void
onViewClicked
(
View
view
)
{
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
tv_camp_type
)
{
...
...
@@ -192,6 +198,9 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
rvType
.
setVisibility
(
View
.
GONE
);
vShadow
.
setVisibility
(
View
.
GONE
);
isOpen
=
true
;
}
else
if
(
id
==
R
.
id
.
ll_item_search
)
{
startActivity
(
CampSearchActivity
.
getIntent
(
_mActivity
));
}
}
...
...
@@ -244,8 +253,9 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
private
void
processData
(
CampListBean
bean
)
{
if
(
mPage
==
1
)
{
if
(
bean
.
getData
().
getTotalCount
()
==
0
)
{
campAdapter
.
getData
().
clear
();
campAdapter
.
notifyDataSetChanged
();
//
campAdapter.setEmptyView(getEmptyView(rvContent, -1, "还没有营地信息!"));
campAdapter
.
setEmptyView
(
getEmptyView
(
rvContent
,
-
1
,
"还没有营地信息!"
));
return
;
}
...
...
@@ -333,6 +343,14 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
}
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// TODO: inflate a fragment view
View
rootView
=
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
);
unbinder
=
ButterKnife
.
bind
(
this
,
rootView
);
return
rootView
;
}
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
...
...
module_camp/src/main/java/com/rv/camp/camp/CampSearchActivity.java
0 → 100644
View file @
dc7a3c15
package
com
.
rv
.
camp
.
camp
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.graphics.Rect
;
import
android.os.Bundle
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.EditText
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseStatusActivity
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.camp.CampFragment
;
import
com.rv.camp.R
;
import
com.rv.camp.R2
;
import
com.rv.camp.adapter.CampListAdapter
;
import
com.rv.camp.api.CampApi
;
import
com.rv.camp.bean.CampListBean
;
import
com.rv.camp.presenter.CampPresenter
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
/**
* 营地搜索
*/
public
class
CampSearchActivity
extends
BaseStatusActivity
<
CampPresenter
>
implements
BaseQuickAdapter
.
RequestLoadMoreListener
{
@BindView
(
R2
.
id
.
et_search
)
EditText
etSearch
;
@BindView
(
R2
.
id
.
rv_content
)
RecyclerView
rvContent
;
private
CampListAdapter
campAdapter
;
private
int
mPage
;
private
int
countPage
;
private
String
content
;
public
static
Intent
getIntent
(
Context
context
)
{
return
new
Intent
(
context
,
CampSearchActivity
.
class
);
}
@Override
protected
int
setLayout
()
{
return
R
.
layout
.
activity_camp_search
;
}
@Override
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
showTitle
(
false
);
campAdapter
=
new
CampListAdapter
();
rvContent
.
setItemAnimator
(
null
);
rvContent
.
setLayoutManager
(
new
GridLayoutManager
(
mActivity
,
2
));
rvContent
.
addItemDecoration
(
new
AbSpacesItemDecoration
(
20
,
10
));
// 分割线。
// rvContent.setNestedScrollingEnabled(false);
rvContent
.
setAdapter
(
campAdapter
);
campAdapter
.
setEmptyView
(
getEmptyView
(
rvContent
,
-
1
,
"还没有营地信息!"
));
campAdapter
.
setOnLoadMoreListener
(
new
BaseQuickAdapter
.
RequestLoadMoreListener
()
{
@Override
public
void
onLoadMoreRequested
()
{
if
(
rvContent
!=
null
)
{
rvContent
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
mPage
>=
countPage
)
{
campAdapter
.
loadMoreEnd
();
}
else
{
mPage
++;
getCampList
(
mPage
,
content
);
}
}
},
200
);
}
}
},
rvContent
);
}
/**
* 刷新数据
*/
private
void
loadDataList
(
String
content
)
{
mPage
=
1
;
getCampList
(
mPage
,
content
);
}
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
switch
(
requestType
)
{
case
0
:
processData
((
CampListBean
)
result
);
break
;
}
}
private
void
processData
(
CampListBean
bean
)
{
if
(
mPage
==
1
)
{
if
(
bean
.
getData
().
getTotalCount
()
==
0
)
{
campAdapter
.
getData
().
clear
();
campAdapter
.
notifyDataSetChanged
();
campAdapter
.
setEmptyView
(
getEmptyView
(
rvContent
,
-
1
,
"还没有营地信息!"
));
return
;
}
countPage
=
bean
.
getData
().
getTotalPage
();
if
(
bean
.
getData
().
getData
()
!=
null
)
{
campAdapter
.
setNewData
(
bean
.
getData
().
getData
());
}
}
else
{
if
(
bean
.
getData
().
getData
()
!=
null
)
{
campAdapter
.
addData
(
bean
.
getData
().
getData
());
}
campAdapter
.
loadMoreComplete
();
}
}
/**
* 获取营地列表
*/
private
void
getCampList
(
int
page
,
String
content
)
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"pageNo"
,
page
);
if
(!
TextUtils
.
isEmpty
(
content
))
{
map
.
put
(
"keyWord"
,
content
);
}
mPresenter
.
getData
(
RvFrameConfig
.
VEHICLE_CAMPLIST
,
0
,
CampApi
.
TRAVEL_CAMPSITESHOP
,
CampListBean
.
class
,
map
,
page
==
1
?
false
:
false
);
}
@Override
public
void
onLoadMoreRequested
()
{
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
// TODO: add setContentView(...) invocation
ButterKnife
.
bind
(
this
);
}
@OnClick
({
R2
.
id
.
iv_back
,
R2
.
id
.
tv_search
})
public
void
onViewClicked
(
View
view
)
{
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
iv_back
)
{
finish
();
}
else
if
(
id
==
R
.
id
.
tv_search
)
{
content
=
etSearch
.
getText
().
toString
().
trim
();
if
(
TextUtils
.
isEmpty
(
content
))
{
showToast
(
"请输入搜索内容!"
);
return
;
}
loadDataList
(
content
);
}
}
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
private
int
left
;
private
int
right
;
public
AbSpacesItemDecoration
(
int
left
,
int
right
)
{
this
.
left
=
left
;
this
.
right
=
right
;
}
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
int
childCount
=
parent
.
getChildCount
();
if
((
childCount
-
1
)
%
2
==
0
)
{
outRect
.
left
=
left
;
outRect
.
right
=
right
;
outRect
.
bottom
=
right
;
outRect
.
top
=
right
;
}
else
{
outRect
.
left
=
right
;
outRect
.
right
=
left
;
outRect
.
bottom
=
right
;
outRect
.
top
=
right
;
}
}
}
}
module_camp/src/main/res/layout/activity_camp.xml
View file @
dc7a3c15
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
>
<LinearLayout
...
...
@@ -20,35 +20,64 @@
android:orientation=
"vertical"
app:use_type=
"use_padding_top"
>
<RelativeLayout
android:background=
"@color/colorWrite"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_55"
>
<TextView
android:id=
"@+id/tv_camp_type"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/size_15"
android:drawableRight=
"@drawable/camp_open_member"
android:drawablePadding=
"@dimen/size_10"
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_55"
android:background=
"@color/colorWrite"
android:gravity=
"center_vertical"
android:text=
"类型"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:id=
"@+id/iv_camp_map"
android:layout_width=
"@dimen/size_35"
android:layout_height=
"@dimen/size_35"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/size_15"
android:padding=
"@dimen/size_8"
android:src=
"@drawable/camp_rentingcar_icon_plat"
/>
android:orientation=
"horizontal"
>
</RelativeLayout>
<TextView
android:id=
"@+id/tv_camp_type"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/size_15"
android:drawableRight=
"@drawable/camp_open_member"
android:drawablePadding=
"@dimen/size_10"
android:gravity=
"center_vertical"
android:text=
"类型"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
<LinearLayout
android:id=
"@+id/ll_item_search"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_40"
android:layout_marginLeft=
"@dimen/size_8"
android:layout_marginRight=
"@dimen/size_5"
android:layout_weight=
"1"
android:background=
"@drawable/shape_rv_travel_search_line"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/search_input"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_40"
android:layout_weight=
"1"
android:background=
"@null"
android:gravity=
"center_vertical"
android:hint=
"搜索营地"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_12"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/iv_camp_map"
android:layout_width=
"@dimen/size_35"
android:layout_height=
"@dimen/size_35"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/size_15"
android:padding=
"@dimen/size_8"
android:src=
"@drawable/camp_rentingcar_icon_plat"
/>
</LinearLayout>
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
...
...
@@ -59,30 +88,30 @@
android:layout_height=
"0dp"
android:layout_weight=
"1"
>
<com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
<com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/refresh"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_content"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_content"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout>
<View
android:id=
"@+id/v_shadow"
android:visibility=
"gone"
android:background=
"@color/gray_50000000"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
android:background=
"@color/gray_50000000"
android:visibility=
"gone"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_type"
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
android:visibility=
"gone"
/>
</RelativeLayout>
</LinearLayout>
...
...
module_camp/src/main/res/layout/activity_camp_search.xml
0 → 100644
View file @
dc7a3c15
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/colorWrite"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginTop=
"@dimen/size_10"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/iv_back"
android:layout_width=
"@dimen/size_32"
android:layout_height=
"@dimen/size_32"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/size_5"
android:padding=
"@dimen/size_8"
android:src=
"@drawable/rv_common_icon_back_dark"
/>
<EditText
android:id=
"@+id/et_search"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_40"
android:layout_weight=
"1"
android:background=
"@drawable/shape_rv_travel_search_line"
android:drawableLeft=
"@drawable/search"
android:drawablePadding=
"@dimen/size_15"
android:hint=
"搜索营地"
android:maxLines=
"1"
android:paddingLeft=
"@dimen/size_15"
android:singleLine=
"true"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_12"
/>
<TextView
android:id=
"@+id/tv_search"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_10"
android:layout_marginRight=
"@dimen/size_10"
android:padding=
"@dimen/size_5"
android:text=
"搜索"
/>
</LinearLayout>
<include
layout=
"@layout/common_line"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
</android.support.v7.widget.RecyclerView>
</LinearLayout>
\ No newline at end of file
module_camp/src/main/res/layout/rv_item_camp_list.xml
View file @
dc7a3c15
...
...
@@ -8,12 +8,12 @@
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_1
8
0"
>
android:layout_height=
"@dimen/size_1
5
0"
>
<ImageView
android:id=
"@+id/iv_icon"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_1
8
0"
android:layout_height=
"@dimen/size_1
5
0"
android:scaleType=
"centerCrop"
/>
<TextView
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
View file @
dc7a3c15
...
...
@@ -55,6 +55,7 @@ import com.ruiwenliu.wrapper.util.UtilsManager;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.ruiwenliu.wrapper.util.listener.SwitchFragment
;
import
com.ruiwenliu.wrapper.util.permission.RxPermission
;
import
com.ruiwenliu.wrapper.weight.refresh.IFooterWrapper
;
import
com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
;
import
com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshView
;
import
com.rv.component.utils.Cookie
;
...
...
@@ -741,10 +742,20 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
}
else
if
(
id
==
R
.
id
.
ll_home_item_search
)
{
//搜索
String
city
=
tvRvCity
.
getText
().
toString
().
trim
();
if
(!
TextUtils
.
isEmpty
(
city
))
{
String
hint
=
city
.
substring
(
city
.
length
()
-
1
);
if
(
"市"
.
equals
(
hint
))
{
//判断后面是否是带市结尾的,去掉
city
=
city
.
substring
(
0
,
city
.
length
()
-
1
);
}
}
ARouter
.
getInstance
()
.
build
(
Constance
.
ACTIVITY_URL_TRAVELSEARCH
)
.
withDouble
(
"latLatitude"
,
0
)
.
withDouble
(
"lonLongitude"
,
0
)
.
withString
(
"city"
,
city
)
.
navigation
();
}
else
if
(
id
==
R
.
id
.
tv_item_home_rv_tour
)
{
...
...
@@ -822,11 +833,20 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
.
city
(
tvRvCity
.
getText
().
toString
())
.
address
(
tvRvCity
.
getText
().
toString
()));
String
city
=
tvRvCity
.
getText
().
toString
().
trim
();
if
(!
TextUtils
.
isEmpty
(
city
))
{
String
hint
=
city
.
substring
(
city
.
length
()
-
1
);
if
(
"市"
.
equals
(
hint
))
{
//判断后面是否是带市结尾的,去掉
city
=
city
.
substring
(
0
,
city
.
length
()
-
1
);
}
}
ARouter
.
getInstance
()
.
build
(
Constance
.
ACTIVITY_URL_TRAVELSEARCH
)
.
withDouble
(
"latLatitude"
,
rvTourLatitude
)
.
withDouble
(
"lonLongitude"
,
rvTourLongitude
)
.
withString
(
"city"
,
tvRvCity
.
getText
().
toString
()
)
.
withDouble
(
"latLatitude"
,
0
)
.
withDouble
(
"lonLongitude"
,
0
)
.
withString
(
"city"
,
city
)
.
navigation
();
}
else
if
(
id
==
R
.
id
.
ll_home_item_rv_hot_label1
)
{
...
...
module_tourism/src/main/java/com/rv/tourism/TourismFragment.java
View file @
dc7a3c15
...
...
@@ -228,11 +228,22 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S
}
else
if
(
id
==
R
.
id
.
ll_item_search
)
{
//搜索
String
city
=
travelCityText
.
getText
().
toString
().
trim
();
if
(!
TextUtils
.
isEmpty
(
city
))
{
String
hint
=
city
.
substring
(
city
.
length
()
-
1
);
if
(
"市"
.
equals
(
hint
))
{
//判断后面是否是带市结尾的,去掉
city
=
city
.
substring
(
0
,
city
.
length
()
-
1
);
}
}
ARouter
.
getInstance
()
.
build
(
Constance
.
ACTIVITY_URL_TRAVELSEARCH
)
.
withDouble
(
"latLatitude"
,
0
)
.
withDouble
(
"lonLongitude"
,
0
)
.
withString
(
"city"
,
city
)
.
navigation
();
}
else
if
(
id
==
R
.
id
.
travel_server_image
)
{
if
(
isLogin
())
{
if
(
_mActivity
instanceof
ImInitListenter
&&
!((
ImInitListenter
)
_mActivity
).
isBindService
())
{
...
...
module_tourism/src/main/res/layout/activity_tourism.xml
View file @
dc7a3c15
...
...
@@ -5,7 +5,6 @@
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
plugin_search/src/main/java/com/rv/search/TravelSearchActivity.java
View file @
dc7a3c15
...
...
@@ -36,7 +36,7 @@ import butterknife.OnClick;
* 旅游搜索
*/
@Route
(
path
=
Constance
.
ACTIVITY_URL_TRAVELSEARCH
)
public
class
TravelSearchActivity
extends
BaseStatusActivity
<
SearchPresenter
>
implements
BaseQuickAdapter
.
RequestLoadMoreListener
{
public
class
TravelSearchActivity
extends
BaseStatusActivity
<
SearchPresenter
>
implements
BaseQuickAdapter
.
RequestLoadMoreListener
{
@BindView
(
R2
.
id
.
et_search
)
EditText
etSearch
;
...
...
@@ -53,7 +53,7 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> im
@Autowired
()
String
city
;
private
String
content
;
private
String
content
;
private
TravelSearchAdapter
mTravelSearchAdapter
;
...
...
@@ -74,14 +74,14 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> im
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
BeanTravelSearch
.
DataBeanX
.
DataBean
dataBean
=
(
BeanTravelSearch
.
DataBeanX
.
DataBean
)
adapter
.
getItem
(
position
);
if
(
dataBean
!=
null
)
{
if
(
dataBean
!=
null
)
{
ARouter
.
getInstance
()
.
build
(
Constance
.
ACTIVITY_URL_TRAVELDETAILS
)
.
withString
(
"id"
,
dataBean
.
getId
())
.
withString
(
"name"
,
dataBean
.
getName
())
.
withString
(
"content"
,
dataBean
.
getContent
())
.
withString
(
"url"
,
dataBean
.
getCover
())
.
withDouble
(
"price"
,
Double
.
valueOf
(
dataBean
.
getPrice
()))
.
withDouble
(
"price"
,
Double
.
valueOf
(
dataBean
.
getPrice
()))
.
navigation
();
finish
();
}
...
...
@@ -92,21 +92,21 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> im
@Override
protected
void
loadData
(
Bundle
savedInstanceState
,
Intent
intent
)
{
super
.
loadData
(
savedInstanceState
,
intent
);
if
(!
TextUtil
.
isEmpty
(
city
)){
if
(!
TextUtil
.
isEmpty
(
city
))
{
etSearch
.
setText
(
city
);
etSearch
.
setSelection
(
city
.
length
());
loadTourAroundData
(
""
);
loadTourAroundData
(
city
);
}
}
@OnClick
({
R2
.
id
.
iv_back
,
R2
.
id
.
tv_search
})
public
void
onViewClicked
(
View
view
)
{
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
iv_back
){
if
(
id
==
R
.
id
.
iv_back
)
{
finish
();
}
else
if
(
id
==
R
.
id
.
tv_search
)
{
}
else
if
(
id
==
R
.
id
.
tv_search
)
{
content
=
etSearch
.
getText
().
toString
().
trim
();
if
(
TextUtils
.
isEmpty
(
content
)){
if
(
TextUtils
.
isEmpty
(
content
))
{
showToast
(
"请输入搜索内容!"
);
return
;
}
...
...
@@ -116,11 +116,11 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> im
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
switch
(
requestType
)
{
case
0
:
setData
((
BeanTravelSearch
)
result
);
break
;
}
switch
(
requestType
)
{
case
0
:
setData
((
BeanTravelSearch
)
result
);
break
;
}
}
private
void
setData
(
BeanTravelSearch
data
)
{
...
...
@@ -139,16 +139,15 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> im
}
/**
* 获取周边游
*/
private
void
loadTourAroundData
(
String
search
)
{
mPage
=
1
;
getLoadTourAroundData
(
mPage
,
search
);
getLoadTourAroundData
(
mPage
,
search
);
}
private
void
getLoadTourAroundData
(
int
page
,
String
search
)
{
private
void
getLoadTourAroundData
(
int
page
,
String
search
)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"query"
,
search
);
map
.
put
(
"page"
,
page
);
...
...
@@ -163,7 +162,7 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> im
mTravelSearchAdapter
.
loadMoreEnd
();
}
else
{
mPage
++;
getLoadTourAroundData
(
mPage
,
content
);
getLoadTourAroundData
(
mPage
,
content
);
}
}
}
plugin_share/src/main/java/com/rv/share/view/RvWebView.java
View file @
dc7a3c15
...
...
@@ -237,9 +237,16 @@ public class RvWebView extends WebView {
}
}
/**
* 生成口令
*
* @return
*/
@JavascriptInterface
public
void
getPassword
(
String
password
)
{
public
String
getPassword
()
{
String
code
=
Cookie
.
getStringValue
(
getContext
(),
SPConstance
.
USER_JSON_CODE
,
""
);
String
password
=
"XXRV"
+
(
int
)
((
Math
.
random
()
*
9
+
1
)
*
1000000000
)
+
code
;
return
password
;
}
}
...
...
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