Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fiveworld
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_fiveworld
Commits
daec8624
Commit
daec8624
authored
Aug 03, 2021
by
fengruiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索页面的境内可以免费访问已完成
首次安装推荐的弹出框的集合排序问题
parent
783ec8b5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
55 deletions
+70
-55
map.json
app/src/main/assets/map.json
+23
-23
GridBenfitAdapter.kt
...c/main/java/com/mints/street/adapter/GridBenfitAdapter.kt
+1
-7
PopularSceneAdapter.kt
...main/java/com/mints/street/adapter/PopularSceneAdapter.kt
+2
-2
HomeViewModel.kt
...src/main/java/com/mints/street/main/home/HomeViewModel.kt
+1
-1
SearchMapViewModel.kt
...ain/java/com/mints/street/main/home/SearchMapViewModel.kt
+42
-21
ShowBenfitDialog.kt
...n/java/com/mints/street/widget/dialog/ShowBenfitDialog.kt
+1
-1
No files found.
app/src/main/assets/map.json
View file @
daec8624
...
@@ -51,6 +51,16 @@
...
@@ -51,6 +51,16 @@
"latitude"
:
31.243627
,
"latitude"
:
31.243627
,
"longitude"
:
121.497028
"longitude"
:
121.497028
},
},
{
"images"
:
[
"http://cdn.xinzhi.space/default/1C3C454A9EA79FBCC4027116D1D280A5.jpg"
,
"http://cdn.xinzhi.space/default/DFD557DB2242B99E9314D02407C10F18.jpg"
,
"http://cdn.xinzhi.space/default/8ACBA2D5DFFE96A56BD02E6F8DBB0319.jpg"
],
"name"
:
"西安大唐不夜城"
,
"latitude"
:
34.210359
,
"longitude"
:
108.970516
},
{
{
"images"
:
[
"images"
:
[
"http://cdn.xinzhi.space/default/B6E64CB2606BB5ED1855DDFE80CA55F1.jpg"
,
"http://cdn.xinzhi.space/default/B6E64CB2606BB5ED1855DDFE80CA55F1.jpg"
,
...
@@ -58,7 +68,7 @@
...
@@ -58,7 +68,7 @@
"http://cdn.xinzhi.space/default/6C39DDC648F72FDF3ECD88AAE936EB72.jpg"
"http://cdn.xinzhi.space/default/6C39DDC648F72FDF3ECD88AAE936EB72.jpg"
],
],
"name"
:
"杭州灵隐寺"
,
"name"
:
"杭州灵隐寺"
,
"latitude"
:
30.246009
,
"latitude"
:
30.246009
,
"longitude"
:
120.108616
"longitude"
:
120.108616
},
},
{
{
...
@@ -71,16 +81,6 @@
...
@@ -71,16 +81,6 @@
"latitude"
:
40.049087
,
"latitude"
:
40.049087
,
"longitude"
:
94.81471
"longitude"
:
94.81471
},
},
{
"images"
:
[
"http://cdn.xinzhi.space/default/1C3C454A9EA79FBCC4027116D1D280A5.jpg"
,
"http://cdn.xinzhi.space/default/DFD557DB2242B99E9314D02407C10F18.jpg"
,
"http://cdn.xinzhi.space/default/8ACBA2D5DFFE96A56BD02E6F8DBB0319.jpg"
],
"name"
:
"西安大唐不夜城"
,
"latitude"
:
34.210359
,
"longitude"
:
108.970516
},
{
{
"images"
:
[
"images"
:
[
"http://cdn.xinzhi.space/default/7A10F9C4B92BFEDAAA53D1EDDE742295.jpg"
,
"http://cdn.xinzhi.space/default/7A10F9C4B92BFEDAAA53D1EDDE742295.jpg"
,
...
@@ -123,7 +123,7 @@
...
@@ -123,7 +123,7 @@
"http://cdn.xinzhi.space/default/BB6A5F3DE940636273988464B796AC46.jpg"
"http://cdn.xinzhi.space/default/BB6A5F3DE940636273988464B796AC46.jpg"
],
],
"name"
:
"长沙橘子洲景区"
,
"name"
:
"长沙橘子洲景区"
,
"latitude"
:
28.192888
,
"latitude"
:
28.192888
,
"longitude"
:
112.968618
"longitude"
:
112.968618
},
},
{
{
...
...
app/src/main/java/com/mints/street/adapter/GridBenfitAdapter.kt
View file @
daec8624
...
@@ -50,13 +50,7 @@ class GridBenfitAdapter(val context: Context, val viewMode: HomeViewModel?, plac
...
@@ -50,13 +50,7 @@ class GridBenfitAdapter(val context: Context, val viewMode: HomeViewModel?, plac
}
}
override
fun
getItemCount
():
Int
{
override
fun
getItemCount
()
=
6
return
if
(
datalist
==
null
)
{
0
}
else
{
datalist
!!
.
size
}
}
override
fun
getLayoutId
(
viewType
:
Int
)
=
R
.
layout
.
item_grid_benfit_adpater
override
fun
getLayoutId
(
viewType
:
Int
)
=
R
.
layout
.
item_grid_benfit_adpater
...
...
app/src/main/java/com/mints/street/adapter/PopularSceneAdapter.kt
View file @
daec8624
...
@@ -39,12 +39,12 @@ class PopularSceneAdapter(val context: Context, var list: List<Places>? = null,v
...
@@ -39,12 +39,12 @@ class PopularSceneAdapter(val context: Context, var list: List<Places>? = null,v
if
(
viewMode
.
index
.
value
==
0
){
if
(
viewMode
.
index
.
value
==
0
){
viewMode
.
authorized
(
list
?.
get
(
position
)
?.
name
viewMode
.
authorized
(
list
?.
get
(
position
)
?.
name
,
list
?.
get
(
position
)
?.
latitude
.
toString
()
,
list
?.
get
(
position
)
?.
latitude
.
toString
()
,
list
?.
get
(
position
)
?.
longitude
.
toString
())
,
list
?.
get
(
position
)
?.
longitude
.
toString
()
,
true
)
}
else
{
}
else
{
if
(
UserManager
.
INSTANCE
.
userIsLogin
())
{
//是会员
if
(
UserManager
.
INSTANCE
.
userIsLogin
())
{
//是会员
viewMode
.
authorized
(
list
?.
get
(
position
)
?.
name
viewMode
.
authorized
(
list
?.
get
(
position
)
?.
name
,
list
?.
get
(
position
)
?.
latitude
.
toString
()
,
list
?.
get
(
position
)
?.
latitude
.
toString
()
,
list
?.
get
(
position
)
?.
longitude
.
toString
())
,
list
?.
get
(
position
)
?.
longitude
.
toString
()
,
false
)
}
else
{
}
else
{
context
.
startActivity
(
Intent
(
context
,
OpenvipActivity
::
class
.
java
))
context
.
startActivity
(
Intent
(
context
,
OpenvipActivity
::
class
.
java
))
}
}
...
...
app/src/main/java/com/mints/street/main/home/HomeViewModel.kt
View file @
daec8624
...
@@ -119,7 +119,7 @@ class HomeViewModel(application: Application) : BaseViewModel(application) {
...
@@ -119,7 +119,7 @@ class HomeViewModel(application: Application) : BaseViewModel(application) {
}
}
mapBean
=
Gson
().
fromJson
(
stringBuilder
.
toString
(),
MapBean
::
class
.
java
)
mapBean
=
Gson
().
fromJson
(
stringBuilder
.
toString
(),
MapBean
::
class
.
java
)
if
(
SPUtils
.
getInstance
().
decodeBoolean
(
HomeFragment
.
IS_FIRST_OPEN
,
true
)){
if
(
SPUtils
.
getInstance
().
decodeBoolean
(
HomeFragment
.
IS_FIRST_OPEN
,
true
)){
mapbeanData
.
value
=
Gson
().
fromJson
(
stringBuilder
.
toString
(),
MapBean
::
class
.
java
)
mapbeanData
.
value
=
mapBean
SPUtils
.
getInstance
().
encode
(
HomeFragment
.
IS_FIRST_OPEN
,
false
)
SPUtils
.
getInstance
().
encode
(
HomeFragment
.
IS_FIRST_OPEN
,
false
)
}
}
...
...
app/src/main/java/com/mints/street/main/home/SearchMapViewModel.kt
View file @
daec8624
...
@@ -110,17 +110,36 @@ class SearchMapViewModel(application: Application) : BaseViewModel(application)
...
@@ -110,17 +110,36 @@ class SearchMapViewModel(application: Application) : BaseViewModel(application)
}
}
)
)
}
}
fun
authorized
(
name
:
String
?=
null
,
lat
:
String
?,
lng
:
String
?)
{
fun
authorized
(
name
:
String
?=
null
,
lat
:
String
?,
lng
:
String
?,
isLook
:
Boolean
)
{
if
(
isLook
)
{
ApiModel
.
authorizedA
().
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
AuthorizedBean
>>(
this
@SearchMapViewModel
,
false
)
{
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
AuthorizedBean
>)
{
MintsWebViewActivity
.
startWebView
(
name
,
MintsWebViewActivity
.
toBaduVR
(
lat
,
lng
,
response
.
result
?.
bk
)
)
}
})
}
else
{
ApiModel
.
authorized
().
safeSubscribe
(
object
ApiModel
.
authorized
().
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
AuthorizedBean
>>(
:
HttpSubscribeImpl
<
BaseResponse
<
AuthorizedBean
>>(
this
@SearchMapViewModel
,
false
this
@SearchMapViewModel
,
false
)
{
)
{
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
AuthorizedBean
>)
{
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
AuthorizedBean
>)
{
if
(
index
.
value
==
0
){
if
(
index
.
value
==
0
)
{
MintsWebViewActivity
.
startWebView
(
name
,
MintsWebViewActivity
.
startWebView
(
MintsWebViewActivity
.
toBaduVR
(
lat
,
lng
,
response
.
result
?.
bk
))
name
,
}
else
{
MintsWebViewActivity
.
toBaduVR
(
lat
,
lng
,
response
.
result
?.
bk
)
MintsWebViewActivity
.
startWebView
(
name
,
)
}
else
{
MintsWebViewActivity
.
startWebView
(
name
,
MintsWebViewActivity
.
toGoogleVR
(
MintsWebViewActivity
.
toGoogleVR
(
response
.
result
.
u
,
response
.
result
.
u
,
response
.
result
.
gk
,
response
.
result
.
gk
,
...
@@ -128,11 +147,13 @@ class SearchMapViewModel(application: Application) : BaseViewModel(application)
...
@@ -128,11 +147,13 @@ class SearchMapViewModel(application: Application) : BaseViewModel(application)
lat
,
lat
,
lng
,
lng
,
response
.
result
.
ut
response
.
result
.
ut
))
)
)
}
}
}
}
})
})
}
}
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/widget/dialog/ShowBenfitDialog.kt
View file @
daec8624
...
@@ -59,7 +59,7 @@ class ShowBenfitDialog(context: Context, val viewMode: HomeViewModel, places: Li
...
@@ -59,7 +59,7 @@ class ShowBenfitDialog(context: Context, val viewMode: HomeViewModel, places: Li
if
(
gridbenfitAdapter
==
null
){
if
(
gridbenfitAdapter
==
null
){
//展示 推荐套餐内容
//展示 推荐套餐内容
gridbenfitAdapter
=
GridBenfitAdapter
(
context
,
viewMode
,
places
?.
shuffled
()
?.
take
(
6
)
)
gridbenfitAdapter
=
GridBenfitAdapter
(
context
,
viewMode
,
places
)
mAdapter
?.
addAdapter
(
gridbenfitAdapter
)
mAdapter
?.
addAdapter
(
gridbenfitAdapter
)
}
}
...
...
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