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
7c441c69
Commit
7c441c69
authored
Sep 25, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-video' of
http://113.105.137.151:22280/lify/rvapp
into dev_im
parents
1240f936
5d8b22c5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
307 additions
and
0 deletions
+307
-0
CampDetailActivity.java
...mp/src/main/java/com/rv/camp/camp/CampDetailActivity.java
+75
-0
DiscoveryApi.java
...ry/src/main/java/com/xxfc/discovery/api/DiscoveryApi.java
+2
-0
PatDetailsBean.java
...src/main/java/com/xxfc/discovery/bean/PatDetailsBean.java
+207
-0
DetailPatActivity.java
...main/java/com/xxfc/discovery/other/DetailPatActivity.java
+23
-0
No files found.
module_camp/src/main/java/com/rv/camp/camp/CampDetailActivity.java
View file @
7c441c69
package
com
.
rv
.
camp
.
camp
;
import
android.Manifest
;
import
android.annotation.TargetApi
;
import
android.content.ClipData
;
import
android.content.ClipboardManager
;
...
...
@@ -22,6 +23,9 @@ import com.alibaba.android.arouter.facade.annotation.Autowired;
import
com.alibaba.android.arouter.facade.annotation.Route
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.alibaba.fastjson.JSON
;
import
com.baidu.location.BDAbstractLocationListener
;
import
com.baidu.location.BDLocation
;
import
com.baidu.mapapi.model.LatLng
;
import
com.frame.base.url.Constance
;
import
com.frame.rv.config.CommonApi
;
import
com.frame.rv.config.RvFrameConfig
;
...
...
@@ -29,6 +33,8 @@ import com.ruiwenliu.wrapper.SPConstance;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseStatusActivity
;
import
com.ruiwenliu.wrapper.bean.BeanUserInfo
;
import
com.ruiwenliu.wrapper.util.LocationManager
;
import
com.ruiwenliu.wrapper.util.permission.RxPermission
;
import
com.ruiwenliu.wrapper.util.um.CustomShareListener
;
import
com.ruiwenliu.wrapper.util.um.ShareManager
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
...
...
@@ -50,6 +56,7 @@ import java.util.Map;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
io.reactivex.functions.Consumer
;
import
static
com
.
ruiwenliu
.
wrapper
.
weight
.
webview
.
SafeWebView
.
hasKitkat
;
...
...
@@ -80,6 +87,10 @@ public class CampDetailActivity extends BaseStatusActivity<CampPresenter> {
private
ClipboardManager
myClipboard
;
private
String
code
;
private
LocationManager
locationManager
;
private
double
latLatitude
=
0
;
private
double
lonLongitude
;
@Override
protected
int
setLayout
()
{
return
R
.
layout
.
activity_camp_detail
;
...
...
@@ -87,6 +98,10 @@ public class CampDetailActivity extends BaseStatusActivity<CampPresenter> {
@Override
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
if
(
longitude
==
0
)
{
permissionProcess
();
}
titleView
.
setTitle
(
"营地详情"
);
webUrl
=
CampApi
.
TRAVEL_CAMPSITEDETAI
+
"?id="
+
id
+
"&longitude="
+
longitude
+
"&latitude="
+
latitude
;
Log
.
i
(
"CampDetailActivity"
,
"initView: "
+
webUrl
);
...
...
@@ -367,6 +382,66 @@ public class CampDetailActivity extends BaseStatusActivity<CampPresenter> {
}
}
/**
* 定位权限处理
*/
private
void
permissionProcess
()
{
/**
* 6.0以上手机做权限处理
*/
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
N
)
{
new
RxPermission
(
mActivity
).
request
(
Manifest
.
permission
.
ACCESS_COARSE_LOCATION
,
Manifest
.
permission
.
ACCESS_FINE_LOCATION
).
subscribe
(
new
Consumer
<
Boolean
>()
{
@Override
public
void
accept
(
Boolean
aBoolean
)
throws
Exception
{
if
(
aBoolean
==
true
)
{
initGps
();
}
else
{
finish
();
}
}
});
}
else
{
initGps
();
}
}
/**
* 初始化定位
*/
public
void
initGps
()
{
locationManager
=
new
LocationManager
(
mActivity
);
locationManager
.
getLocationDetail
(
new
BDAbstractLocationListener
()
{
@Override
public
void
onReceiveLocation
(
BDLocation
location
)
{
//此处的BDLocation为定位结果信息类,通过它的各种get方法可获取定位相关的全部结果
//以下只列举部分获取经纬度相关(常用)的结果信息
//更多结果信息获取说明,请参照类参考中BDLocation类中的说明
//获取定位精度,默认值为0.0f
float
radius
=
location
.
getRadius
();
//获取经纬度坐标类型,以LocationClientOption中设置过的坐标类型为准
String
coorType
=
location
.
getCoorType
();
//获取定位类型、定位错误返回码,具体信息可参照类参考中BDLocation类中的说明
int
errorCode
=
location
.
getLocType
();
// setGpsContent("count=:",String.valueOf(count));
// setGpsContent("latitude:",String.valueOf(location.getLatitude()));
// setGpsContent("longitude:",String.valueOf(location.getLongitude()));
// setGpsContent("城市:",location.getCity());
// setGpsContent("街道:",location.getAddrStr());
// setGpsContent("当前位置:",location.getLocationDescribe());
latLatitude
=
location
.
getLatitude
();
lonLongitude
=
location
.
getLongitude
();
locationManager
.
stopLocation
();
}
});
}
private
class
SharingSuccess
{
private
String
integralRuleCode
;
private
int
userId
;
...
...
module_discovery/src/main/java/com/xxfc/discovery/api/DiscoveryApi.java
View file @
7c441c69
...
...
@@ -59,4 +59,6 @@ public interface DiscoveryApi extends RvFrameConfig {
//获取评论列表
String
DISCOVERY_COMMENT_LIST
=
IMA_BASEUSRL
+
"/b/circle/msg/comment/list"
;
String
DISCOVERY_MSG_GET
=
HOST
+
"/api/im/msg/get"
;
//获取单条消息
}
module_discovery/src/main/java/com/xxfc/discovery/bean/PatDetailsBean.java
0 → 100644
View file @
7c441c69
package
com
.
xxfc
.
discovery
.
bean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 拍拍详情
*/
public
class
PatDetailsBean
extends
BaseBean
{
private
DataBean
data
;
private
int
code
;
public
DataBean
getData
()
{
return
data
;
}
public
void
setData
(
DataBean
data
)
{
this
.
data
=
data
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
static
class
DataBean
implements
Serializable
{
private
Body
body
;
private
String
nickname
;
private
String
picUrl
;
public
Body
getBody
()
{
return
body
;
}
public
void
setBody
(
Body
body
)
{
this
.
body
=
body
;
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
;
}
public
String
getPicUrl
()
{
return
picUrl
;
}
public
void
setPicUrl
(
String
picUrl
)
{
this
.
picUrl
=
picUrl
;
}
public
static
class
Body
implements
Serializable
{
private
String
text
;
private
String
time
;
private
String
type
;
private
List
<
Images
>
images
;
private
List
<
Videos
>
videos
;
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getTime
()
{
return
time
;
}
public
void
setTime
(
String
time
)
{
this
.
time
=
time
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
List
<
Images
>
getImages
()
{
return
images
;
}
public
void
setImages
(
List
<
Images
>
images
)
{
this
.
images
=
images
;
}
public
List
<
Videos
>
getVideos
()
{
return
videos
;
}
public
void
setVideos
(
List
<
Videos
>
videos
)
{
this
.
videos
=
videos
;
}
public
static
class
Images
implements
Serializable
{
private
String
length
;
private
String
size
;
private
String
turl
;
private
String
ourl
;
private
String
oUrl
;
private
String
tUrl
;
public
String
getLength
()
{
return
length
;
}
public
void
setLength
(
String
length
)
{
this
.
length
=
length
;
}
public
String
getSize
()
{
return
size
;
}
public
void
setSize
(
String
size
)
{
this
.
size
=
size
;
}
public
String
getTurl
()
{
return
turl
;
}
public
void
setTurl
(
String
turl
)
{
this
.
turl
=
turl
;
}
public
String
getOurl
()
{
return
ourl
;
}
public
void
setOurl
(
String
ourl
)
{
this
.
ourl
=
ourl
;
}
public
String
getoUrl
()
{
return
oUrl
;
}
public
void
setoUrl
(
String
oUrl
)
{
this
.
oUrl
=
oUrl
;
}
public
String
gettUrl
()
{
return
tUrl
;
}
public
void
settUrl
(
String
tUrl
)
{
this
.
tUrl
=
tUrl
;
}
}
public
static
class
Videos
implements
Serializable
{
private
String
length
;
private
String
size
;
private
String
ourl
;
private
String
oUrl
;
public
String
getLength
()
{
return
length
;
}
public
void
setLength
(
String
length
)
{
this
.
length
=
length
;
}
public
String
getSize
()
{
return
size
;
}
public
void
setSize
(
String
size
)
{
this
.
size
=
size
;
}
public
String
getOurl
()
{
return
ourl
;
}
public
void
setOurl
(
String
ourl
)
{
this
.
ourl
=
ourl
;
}
public
String
getoUrl
()
{
return
oUrl
;
}
public
void
setoUrl
(
String
oUrl
)
{
this
.
oUrl
=
oUrl
;
}
}
}
}
}
module_discovery/src/main/java/com/xxfc/discovery/other/DetailPatActivity.java
View file @
7c441c69
...
...
@@ -50,6 +50,7 @@ import com.xxfc.discovery.R;
import
com.xxfc.discovery.R2
;
import
com.xxfc.discovery.api.DiscoveryApi
;
import
com.xxfc.discovery.bean.DiscoveryIMTokenBean
;
import
com.xxfc.discovery.bean.PatDetailsBean
;
import
com.xxfc.discovery.dialog.TrillCommentInputDialog
;
import
com.xxfc.discovery.presenter.DiscoveryPresenter
;
import
com.yuyife.okgo.OkGoUtil
;
...
...
@@ -131,7 +132,20 @@ public class DetailPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
}
initRxbus
();
}
@Override
protected
void
loadData
(
Bundle
savedInstanceState
,
Intent
intent
)
{
super
.
loadData
(
savedInstanceState
,
intent
);
loadDetail
();
}
private
void
loadDetail
()
{
if
(
TextUtils
.
isEmpty
(
title
))
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"id"
,
id
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
5
,
DiscoveryApi
.
DISCOVERY_MSG_GET
,
PatDetailsBean
.
class
,
map
,
false
);
}
}
private
void
initRxbus
()
{
...
...
@@ -255,6 +269,15 @@ public class DetailPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
case
4
:
mWebView
.
reload
();
break
;
case
5
:
PatDetailsBean
patDetailsBean
=
(
PatDetailsBean
)
result
;
if
(
patDetailsBean
.
getData
()
!=
null
)
{
title
=
patDetailsBean
.
getData
().
getBody
().
getText
();
iconUrl
=
patDetailsBean
.
getData
().
getBody
().
getImages
().
get
(
0
).
getoUrl
();
userName
=
patDetailsBean
.
getData
().
getNickname
();
userUrl
=
patDetailsBean
.
getData
().
getPicUrl
();
}
break
;
}
}
...
...
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