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
Hide 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
...
...
@@ -19,7 +19,7 @@
],
"name"
:
"广州新电视塔"
,
"latitude"
:
23.112908
,
"longitude"
:
113.33107
"longitude"
:
113.33107
},
{
"images"
:
[
...
...
@@ -51,6 +51,16 @@
"latitude"
:
31.243627
,
"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"
:
[
"http://cdn.xinzhi.space/default/B6E64CB2606BB5ED1855DDFE80CA55F1.jpg"
,
...
...
@@ -58,7 +68,7 @@
"http://cdn.xinzhi.space/default/6C39DDC648F72FDF3ECD88AAE936EB72.jpg"
],
"name"
:
"杭州灵隐寺"
,
"latitude"
:
30.246009
,
"latitude"
:
30.246009
,
"longitude"
:
120.108616
},
{
...
...
@@ -69,17 +79,7 @@
],
"name"
:
"敦煌莫高窟"
,
"latitude"
:
40.049087
,
"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
"longitude"
:
94.81471
},
{
"images"
:
[
...
...
@@ -114,7 +114,7 @@
],
"name"
:
"西藏布达拉宫"
,
"latitude"
:
29.658335
,
"longitude"
:
91.126159
"longitude"
:
91.126159
},
{
"images"
:
[
...
...
@@ -123,8 +123,8 @@
"http://cdn.xinzhi.space/default/BB6A5F3DE940636273988464B796AC46.jpg"
],
"name"
:
"长沙橘子洲景区"
,
"latitude"
:
28.192888
,
"longitude"
:
112.968618
"latitude"
:
28.192888
,
"longitude"
:
112.968618
},
{
"images"
:
[
...
...
@@ -144,7 +144,7 @@
],
"name"
:
"重庆洪崖洞"
,
"latitude"
:
29.568777
,
"longitude"
:
106.585268
"longitude"
:
106.585268
}
],
"remark"
:
"首页展示"
...
...
@@ -179,7 +179,7 @@
],
"name"
:
"剑桥大学"
,
"latitude"
:
52.2042666
,
"longitude"
:
0.1149085
"longitude"
:
0.1149085
},
{
"images"
:
[
...
...
@@ -209,7 +209,7 @@
],
"name"
:
"德国历史博物馆"
,
"latitude"
:
52.5181519
,
"longitude"
:
13.3969499
"longitude"
:
13.3969499
},
{
"images"
:
[
...
...
@@ -219,7 +219,7 @@
],
"name"
:
"日本东京塔"
,
"latitude"
:
35.6585805
,
"longitude"
:
139.7454329
"longitude"
:
139.7454329
},
{
"images"
:
[
...
...
@@ -229,7 +229,7 @@
],
"name"
:
"罗马斗兽场"
,
"latitude"
:
41.8902102
,
"longitude"
:
12.4922309
"longitude"
:
12.4922309
},
{
"images"
:
[
...
...
@@ -239,7 +239,7 @@
],
"name"
:
"泰国清莱白庙"
,
"latitude"
:
19.8241697
,
"longitude"
:
99.76364919999999
"longitude"
:
99.76364919999999
},
{
"images"
:
[
...
...
@@ -269,7 +269,7 @@
],
"name"
:
"加拿大国家电视塔"
,
"latitude"
:
43.6425662
,
"longitude"
:
-79.3870568
"longitude"
:
-79.3870568
}
],
"remark"
:
"首页搜索-境外"
...
...
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
}
override
fun
getItemCount
():
Int
{
return
if
(
datalist
==
null
)
{
0
}
else
{
datalist
!!
.
size
}
}
override
fun
getItemCount
()
=
6
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
if
(
viewMode
.
index
.
value
==
0
){
viewMode
.
authorized
(
list
?.
get
(
position
)
?.
name
,
list
?.
get
(
position
)
?.
latitude
.
toString
()
,
list
?.
get
(
position
)
?.
longitude
.
toString
())
,
list
?.
get
(
position
)
?.
longitude
.
toString
()
,
true
)
}
else
{
if
(
UserManager
.
INSTANCE
.
userIsLogin
())
{
//是会员
viewMode
.
authorized
(
list
?.
get
(
position
)
?.
name
,
list
?.
get
(
position
)
?.
latitude
.
toString
()
,
list
?.
get
(
position
)
?.
longitude
.
toString
())
,
list
?.
get
(
position
)
?.
longitude
.
toString
()
,
false
)
}
else
{
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) {
}
mapBean
=
Gson
().
fromJson
(
stringBuilder
.
toString
(),
MapBean
::
class
.
java
)
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
)
}
...
...
app/src/main/java/com/mints/street/main/home/SearchMapViewModel.kt
View file @
daec8624
...
...
@@ -110,29 +110,50 @@ class SearchMapViewModel(application: Application) : BaseViewModel(application)
}
)
}
fun
authorized
(
name
:
String
?=
null
,
lat
:
String
?,
lng
:
String
?)
{
ApiModel
.
authorized
().
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
AuthorizedBean
>>(
this
@SearchMapViewModel
,
false
)
{
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
AuthorizedBean
>)
{
if
(
index
.
value
==
0
){
MintsWebViewActivity
.
startWebView
(
name
,
MintsWebViewActivity
.
toBaduVR
(
lat
,
lng
,
response
.
result
?.
bk
))
}
else
{
MintsWebViewActivity
.
startWebView
(
name
,
MintsWebViewActivity
.
toGoogleVR
(
response
.
result
.
u
,
response
.
result
.
gk
,
response
.
result
.
base
,
lat
,
lng
,
response
.
result
.
ut
))
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
:
HttpSubscribeImpl
<
BaseResponse
<
AuthorizedBean
>>(
this
@SearchMapViewModel
,
false
)
{
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
AuthorizedBean
>)
{
if
(
index
.
value
==
0
)
{
MintsWebViewActivity
.
startWebView
(
name
,
MintsWebViewActivity
.
toBaduVR
(
lat
,
lng
,
response
.
result
?.
bk
)
)
}
else
{
MintsWebViewActivity
.
startWebView
(
name
,
MintsWebViewActivity
.
toGoogleVR
(
response
.
result
.
u
,
response
.
result
.
gk
,
response
.
result
.
base
,
lat
,
lng
,
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
if
(
gridbenfitAdapter
==
null
){
//展示 推荐套餐内容
gridbenfitAdapter
=
GridBenfitAdapter
(
context
,
viewMode
,
places
?.
shuffled
()
?.
take
(
6
)
)
gridbenfitAdapter
=
GridBenfitAdapter
(
context
,
viewMode
,
places
)
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