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
4d1b0124
Commit
4d1b0124
authored
Jul 31, 2021
by
fengruiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页VIP跳转的问题
parent
d456924d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
19 deletions
+45
-19
map.json
app/src/main/assets/map.json
+36
-12
HomeFragment.kt
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
+0
-5
HomeViewModel.kt
...src/main/java/com/mints/street/main/home/HomeViewModel.kt
+9
-2
No files found.
app/src/main/assets/map.json
View file @
4d1b0124
...
...
@@ -157,7 +157,9 @@
"http://cdn.xinzhi.space/default/FCBA6018725F1EF1BF24ED3EBC059DDD.jpg"
,
"http://cdn.xinzhi.space/default/DA41427ECA89D9D9BD9D92F317AB48B2.jpg"
],
"name"
:
"俄罗斯莫斯科红场"
"name"
:
"俄罗斯莫斯科红场"
,
"latitude"
:
55.75393030000001
,
"longitude"
:
37.620795
},
{
"images"
:
[
...
...
@@ -165,7 +167,9 @@
"http://cdn.xinzhi.space/default/07104B0C9D988EF028973B3F36DBD0D6.jpg"
,
"http://cdn.xinzhi.space/default/B4D7F331E85B86EE6337DFEB105EAB4E.jpg"
],
"name"
:
"梵蒂冈城"
"name"
:
"梵蒂冈城"
,
"latitude"
:
41.902916
,
"longitude"
:
12.453389
},
{
"images"
:
[
...
...
@@ -173,7 +177,9 @@
"http://cdn.xinzhi.space/default/AFF9DE280B1AF7EEABB0604CBACE954F.jpg"
,
"http://cdn.xinzhi.space/default/CD06E6722BB80A520D91AF930D4AC9E2.jpg"
],
"name"
:
"剑桥大学"
"name"
:
"剑桥大学"
,
"latitude"
:
52.2042666
,
"longitude"
:
0.1149085
},
{
"images"
:
[
...
...
@@ -181,7 +187,9 @@
"http://cdn.xinzhi.space/default/3CEFCD51A615EEBFA25E3A5750524359.jpg"
,
"http://cdn.xinzhi.space/default/BF120E7A407908373DA6D325068E2FAA.jpg"
],
"name"
:
"伦敦大本钟"
"name"
:
"伦敦大本钟"
,
"latitude"
:
51.50072919999999
,
"longitude"
:
-0.1246254
},
{
"images"
:
[
...
...
@@ -189,7 +197,9 @@
"http://cdn.xinzhi.space/default/3B8CDE28649E95500CAA9BE6274A3A49.jpg"
,
"http://cdn.xinzhi.space/default/849A8D36547D7B09BAF288317C37E8EA.jpg"
],
"name"
:
"柏林大教堂"
"name"
:
"柏林大教堂"
,
"latitude"
:
52.5190608
,
"longitude"
:
13.401078
},
{
"images"
:
[
...
...
@@ -197,7 +207,9 @@
"http://cdn.xinzhi.space/default/1A86E3AF4C95395B25E3763D7163D5A2.jpg"
,
"http://cdn.xinzhi.space/default/BCAB35365DE10FB96AD113EBC81BB708.jpg"
],
"name"
:
"德国历史博物馆"
"name"
:
"德国历史博物馆"
,
"latitude"
:
52.5181519
,
"longitude"
:
13.3969499
},
{
"images"
:
[
...
...
@@ -205,7 +217,9 @@
"http://cdn.xinzhi.space/default/D24A5AD9AD57B57F1A51BA32553E6BE8.jpg"
,
"http://cdn.xinzhi.space/default/C3BBE857A1F09EF76227361CF98E582D.jpg"
],
"name"
:
"日本东京塔"
"name"
:
"日本东京塔"
,
"latitude"
:
35.6585805
,
"longitude"
:
139.7454329
},
{
"images"
:
[
...
...
@@ -213,7 +227,9 @@
"http://cdn.xinzhi.space/default/7E773ACF24391CF3B1B3237BF16B734E.jpg"
,
"http://cdn.xinzhi.space/default/9B9BB9A5541D1524FF35AA4915CE8AD8.jpg"
],
"name"
:
"罗马斗兽场"
"name"
:
"罗马斗兽场"
,
"latitude"
:
41.8902102
,
"longitude"
:
12.4922309
},
{
"images"
:
[
...
...
@@ -221,7 +237,9 @@
"http://cdn.xinzhi.space/default/1176E3732CAECD7F375F1D1CAD3F067F.jpg"
,
"http://cdn.xinzhi.space/default/BA119EAE3D700DEFF7E8BFCDBDECC4CC.jpg"
],
"name"
:
"泰国清莱白庙"
"name"
:
"泰国清莱白庙"
,
"latitude"
:
19.8241697
,
"longitude"
:
99.76364919999999
},
{
"images"
:
[
...
...
@@ -229,7 +247,9 @@
"http://cdn.xinzhi.space/default/C3B531A95824B994FB73BA68B477CE8D.jpg"
,
"http://cdn.xinzhi.space/default/B8D9E0D0A0C3F34AA11F13B328C8B28E.jpg"
],
"name"
:
"伦敦白金汉宫"
"name"
:
"伦敦白金汉宫"
,
"latitude"
:
51.501364
,
"longitude"
:
-0.14189
},
{
"images"
:
[
...
...
@@ -237,7 +257,9 @@
"http://cdn.xinzhi.space/default/6E2EFFF19E46E2F12398DC7705B347F9.jpg"
,
"http://cdn.xinzhi.space/default/47C00B7CF073C9AFF2FFF2BDB77E0F0E.jpg"
],
"name"
:
"美国阿灵顿公墓"
"name"
:
"美国阿灵顿公墓"
,
"latitude"
:
38.8768684
,
"longitude"
:
-77.0707857
},
{
"images"
:
[
...
...
@@ -245,7 +267,9 @@
"http://cdn.xinzhi.space/default/5BC6215FEC91B8AB8EF748A4DCAC5084.jpg"
,
"http://cdn.xinzhi.space/default/B1A731FA331E02E131D2283E4A33ACB4.jpg"
],
"name"
:
"加拿大国家电视塔"
"name"
:
"加拿大国家电视塔"
,
"latitude"
:
43.6425662
,
"longitude"
:
-79.3870568
}
],
"remark"
:
"首页搜索-境外"
...
...
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
View file @
4d1b0124
...
...
@@ -109,12 +109,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
SearchMapActivity
.
startSearchMapActivity
(
this
)
}
RxUtils
.
onMultiClick
(
binding
.
ivClick
){
if
(
userManager
.
userIsLogin
()
&&
userManager
.
getVipFlag
())
{
//是会员
viewModel
.
authorized
(
""
,
currentLat
.
toString
(),
currentLon
.
toString
())
}
else
{
startActivity
(
OpenvipActivity
::
class
.
java
)
}
}
viewModel
.
getMapBean
()
}
...
...
app/src/main/java/com/mints/street/main/home/HomeViewModel.kt
View file @
4d1b0124
...
...
@@ -9,6 +9,8 @@ import com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.bean.*
import
com.mints.street.common.DeviceInfo
import
com.mints.street.main.my.OpenvipActivity
import
com.mints.street.manager.UserManager
import
com.mints.street.manager.oaid.OaidManager
import
com.mints.street.model.ApiModel
import
com.mints.street.netwrok.base.HttpSubscribeImpl
...
...
@@ -52,6 +54,10 @@ class HomeViewModel(application: Application):BaseViewModel(application) {
})
}
fun
authorized
(
name
:
String
?=
null
,
lat
:
String
?,
lng
:
String
?)
{
if
(!
UserManager
.
INSTANCE
.
userIsLogin
()
&&
!
UserManager
.
INSTANCE
.
getVipFlag
()){
startActivity
(
OpenvipActivity
::
class
.
java
)
return
}
ApiModel
.
authorized
().
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
AuthorizedBean
>>(
this
@HomeViewModel
,
false
...
...
@@ -60,8 +66,9 @@ class HomeViewModel(application: Application):BaseViewModel(application) {
if
(!
Gson
().
toJson
(
response
.
result
).
equals
(
Gson
().
toJson
(
authorizedBean
.
value
))){
authorizedBean
.
value
=
response
.
result
}
MintsWebViewActivity
.
startWebView
(
name
,
MintsWebViewActivity
.
toBaduVR
(
lat
,
lng
,
response
.
result
?.
bk
))
MintsWebViewActivity
.
startWebView
(
name
,
MintsWebViewActivity
.
toBaduVR
(
lat
,
lng
,
response
.
result
?.
bk
))
}
})
...
...
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