Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_street
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
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
android
android_street
Commits
54bc805d
Commit
54bc805d
authored
Aug 20, 2021
by
fengruiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改空指针问题
parent
ec9831dd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
MainApi.kt
app/src/main/java/com/mints/street/api/MainApi.kt
+6
-3
DetailedActivity.kt
...rc/main/java/com/mints/street/main/vr/DetailedActivity.kt
+2
-2
DetailedViewModel.kt
...c/main/java/com/mints/street/main/vr/DetailedViewModel.kt
+2
-2
ApiModel.kt
app/src/main/java/com/mints/street/model/ApiModel.kt
+1
-1
No files found.
app/src/main/java/com/mints/street/api/MainApi.kt
View file @
54bc805d
...
...
@@ -136,20 +136,23 @@ interface MainApi {
* 精选体验展示图
*/
@POST
(
"na/getChooseExperienceHeadData"
)
fun
getChooseExperienceHeadData
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
VreperienceBean
>>>
fun
getChooseExperienceHeadData
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>)
:
Observable
<
Response
<
BaseResponse
<
VreperienceBean
>>>
/**
* 精选体验详情
*/
@POST
(
"na/getChooseExperienceData"
)
fun
getChooseExperienceData
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
DetailedBean
>>>
fun
getChooseExperienceData
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
String
?>)
:
Observable
<
Response
<
BaseResponse
<
DetailedBean
>>>
/**
* 热门景点
*/
@POST
(
"na/getAttractionsList"
)
fun
getHotView
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
HotViewBean
>>>
fun
getHotView
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>)
:
Observable
<
Response
<
BaseResponse
<
HotViewBean
>>>
/**
* 地图是否收费
...
...
app/src/main/java/com/mints/street/main/vr/DetailedActivity.kt
View file @
54bc805d
...
...
@@ -53,8 +53,8 @@ class DetailedActivity : BaseActivity<ActivityDetailedBinding, DetailedViewModel
override
fun
onResume
()
{
super
.
onResume
()
myintent
=
getIntent
()
;
viewModel
.
getChooseExperienceData
(
myintent
?.
getStringExtra
(
"area"
)
!!
)
myintent
=
intent
;
viewModel
.
getChooseExperienceData
(
myintent
?.
getStringExtra
(
"area"
))
}
override
fun
initViewObservable
()
{
...
...
app/src/main/java/com/mints/street/main/vr/DetailedViewModel.kt
View file @
54bc805d
...
...
@@ -17,8 +17,8 @@ class DetailedViewModel(application: Application) : BaseViewModel(application) {
val
detailbean
:
MutableLiveData
<
DetailedBean
>
=
MutableLiveData
()
fun
getChooseExperienceData
(
name
:
String
){
val
vo
=
HashMap
<
String
,
Any
>()
fun
getChooseExperienceData
(
name
:
String
?
){
val
vo
=
HashMap
<
String
,
String
?
>()
vo
[
"area"
]
=
name
ApiModel
.
getChooseExperienceData
(
lifecycleProvider
,
vo
).
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
DetailedBean
>>(
...
...
app/src/main/java/com/mints/street/model/ApiModel.kt
View file @
54bc805d
...
...
@@ -109,7 +109,7 @@ object ApiModel {
/**
* 精选体验详情
*/
fun
getChooseExperienceData
(
lifecycleProvider
:
LifecycleProvider
<
Any
>?,
map
:
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
DetailedBean
>>>{
fun
getChooseExperienceData
(
lifecycleProvider
:
LifecycleProvider
<
Any
>?,
map
:
Map
<
String
,
String
?
>):
Observable
<
Response
<
BaseResponse
<
DetailedBean
>>>{
return
HttpManager
.
getInstance
().
execute
(
lifecycleProvider
,
MainApi
.
newInstance
().
getChooseExperienceData
(
map
))
}
/**
...
...
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