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
ece1c945
Commit
ece1c945
authored
Aug 05, 2021
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_1.0.0' of
http://39.97.65.143:81/android/android_street
into dev_1.0.0
parents
32cbdbf8
20f466f9
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
93 additions
and
57 deletions
+93
-57
zsmap.js
app/src/main/assets/web/zsmap.js
+16
-16
GoogleMapFragment.kt
...java/com/mints/street/main/googlemap/GoogleMapFragment.kt
+5
-1
HomeFragment.kt
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
+21
-18
OpenvipActivity.kt
...src/main/java/com/mints/street/main/my/OpenvipActivity.kt
+32
-14
OpenvipViewModel.kt
...rc/main/java/com/mints/street/main/my/OpenvipViewModel.kt
+3
-0
view_data_page1.xml
app/src/main/res/layout/view_data_page1.xml
+2
-1
view_data_page2.xml
app/src/main/res/layout/view_data_page2.xml
+2
-1
view_data_page3.xml
app/src/main/res/layout/view_data_page3.xml
+2
-1
view_data_page4.xml
app/src/main/res/layout/view_data_page4.xml
+2
-1
view_data_page5.xml
app/src/main/res/layout/view_data_page5.xml
+2
-1
view_data_page6.xml
app/src/main/res/layout/view_data_page6.xml
+2
-1
view_data_page7.xml
app/src/main/res/layout/view_data_page7.xml
+2
-1
view_data_page8.xml
app/src/main/res/layout/view_data_page8.xml
+2
-1
No files found.
app/src/main/assets/web/zsmap.js
View file @
ece1c945
...
...
@@ -76,7 +76,7 @@ var vm = new Vue({
point
=
B_MAP
.
getCenter
();
}
console
.
log
(
this
.
NOWUSEBAIDU
,
point
)
console
.
log
(
this
.
NOWUSEBAIDU
,
point
)
getLocation
(
point
,
function
(
res
)
{
if
(
res
.
c
)
{
...
...
@@ -107,9 +107,13 @@ var vm = new Vue({
}
},
initZsMap
:
function
(
pointStr
)
{
console
.
log
(
"
>>>>>>"
,
pointStr
)
console
.
log
(
">>>>>>>>
>>>>>>"
,
pointStr
)
var
th
=
this
;
var
inMsg
=
JSON
.
parse
(
pointStr
)
if
(
inMsg
.
lat
==
0
||
inMsg
.
lng
==
0
||
inMsg
.
lat
==
'0'
||
inMsg
.
lng
==
'0'
)
{
inMsg
=
{
"lat"
:
39.90960456049752
,
"lng"
:
116.3972282409668
,
"inner"
:
0
};
}
var
point
=
{
lat
:
parseFloat
(
inMsg
.
lat
),
lng
:
parseFloat
(
inMsg
.
lng
)};
if
(
inMsg
.
inner
==
null
)
{
getLocation
(
point
,
function
(
res
)
{
...
...
@@ -211,13 +215,12 @@ var vm = new Vue({
},
B_initmap
:
function
(
point
,
zoomLevel
)
{
this
.
NOWUSEBAIDU
=
true
;
console
.
log
(
"initB==>"
,
point
,
zoomLevel
)
// setTimeout(function () {
if
(
zoomLevel
==
undefined
||
zoomLevel
==
null
)
zoomLevel
=
6
;
var
th
=
vm
;
if
(
th
.
B_MAPINITED
==
false
)
{
console
.
log
(
">>>>>>>initB==>"
,
point
,
zoomLevel
)
th
.
B_MAPINITED
=
true
;
// 百度地图API功能
// $("#map").hide();
...
...
@@ -247,15 +250,13 @@ var vm = new Vue({
});
}
else
{
B_MAP
.
centerAndZoom
(
new
BMap
.
Point
(
point
.
lng
,
point
.
lat
),
zoomLevel
);
// 初始化地图,设置中心点坐标和地图级别
B_MAP
.
centerAndZoom
(
new
BMap
.
Point
(
point
.
lng
,
point
.
lat
),
zoomLevel
);
// 初始化地图,设置中心点坐标和地图级别
setTimeout
(
function
(){
B_MAP
.
centerAndZoom
(
new
BMap
.
Point
(
point
.
lng
,
point
.
lat
),
zoomLevel
);
// 初始化地图,设置中心点坐标和地图级别
B_MAP
.
centerAndZoom
(
new
BMap
.
Point
(
point
.
lng
,
point
.
lat
),
zoomLevel
);
// 初始化地图,设置中心点坐标和地图级别
},
500
)
//console.log(">>>>>>>", point, B_MAP.getCenter())
console
.
log
(
">>>>>>>cB==>"
,
B_MAP
.
getCenter
().
lat
,
B_MAP
.
getCenter
().
lng
,
zoomLevel
)
console
.
log
(
">>>>>>>"
,
point
,
B_MAP
.
getCenter
())
}
// },500)
},
...
...
@@ -293,11 +294,11 @@ var vm = new Vue({
G_MAP
.
setCenter
(
point
)
}
//
if (!this.NOWUSEBAIDU && this.B_MAPINITED) {
//
var bpoint = toBPoint(point)
//
console.log("同步百度中心")
//
B_MAP.setCenter(bpoint)
//
}
if
(
!
this
.
NOWUSEBAIDU
&&
this
.
B_MAPINITED
)
{
var
bpoint
=
toBPoint
(
point
)
console
.
log
(
"同步百度中心"
)
B_MAP
.
setCenter
(
bpoint
)
}
}
}
})
...
...
@@ -306,7 +307,6 @@ var vm = new Vue({
window
.
onload
=
function
()
{
// console.log("window.load_+++++++++++=")170.89184781519282,-9.108152184807182
allIsOk
();
//vm.initZsMap('{"lat": 39.30336768549658, "lng": 350.8918478151928}')
}
...
...
app/src/main/java/com/mints/street/main/googlemap/GoogleMapFragment.kt
View file @
ece1c945
...
...
@@ -47,9 +47,13 @@ class GoogleMapFragment() : BaseFragment<ActivityGoogleMapBinding, HomeViewModel
private
var
gps
=
GPS
(
39.915121
,
116.403947
,
0
)
inner
class
MyLocationListener
:
BDLocationListener
{
override
fun
onReceiveLocation
(
location
:
BDLocation
?)
{
override
fun
onReceiveLocation
(
location
:
BDLocation
?)
{
//4.9E-324 4.9E-324
if
(
location
?.
latitude
==
4.9E-324
||
location
?.
longitude
==
4.9E-324
){
return
}
gps
.
lat
=
location
?.
latitude
?:
39.915121
gps
.
lng
=
location
?.
longitude
?:
116.403947
KLog
.
e
(
"onReceiveLocation"
,
"${location?.latitude} --- ${location?.longitude}"
)
}
}
...
...
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
View file @
ece1c945
...
...
@@ -261,40 +261,43 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
var
positioningBean
:
PositioningBean
?
=
null
inner
class
MyLocationListener
:
BDLocationListener
{
override
fun
onReceiveLocation
(
location
:
BDLocation
)
{
override
fun
onReceiveLocation
(
location
:
BDLocation
?)
{
if
(
location
?.
latitude
==
4.9E-324
||
location
?.
longitude
==
4.9E-324
){
return
}
if
(
sp
==
null
)
{
sp
=
SPUtils
.
getInstance
(
SPUtils
.
POSITIONING_MAP
)
}
if
(
positioningBean
==
null
)
{
positioningBean
=
PositioningBean
()
}
positioningBean
?.
latitude
=
location
.
latitude
positioningBean
?.
longitude
=
location
.
longitude
positioningBean
?.
countryCode
=
location
.
countryCode
positioningBean
?.
country
=
location
.
country
positioningBean
?.
province
=
location
.
province
positioningBean
?.
city
=
location
.
city
positioningBean
?.
district
=
location
.
district
positioningBean
?.
town
=
location
.
town
positioningBean
?.
street
=
location
.
street
positioningBean
?.
addrStr
=
location
.
addrStr
positioningBean
?.
latitude
=
location
?
.
latitude
positioningBean
?.
longitude
=
location
?
.
longitude
positioningBean
?.
countryCode
=
location
?
.
countryCode
positioningBean
?.
country
=
location
?
.
country
positioningBean
?.
province
=
location
?
.
province
positioningBean
?.
city
=
location
?
.
city
positioningBean
?.
district
=
location
?
.
district
positioningBean
?.
town
=
location
?
.
town
positioningBean
?.
street
=
location
?
.
street
positioningBean
?.
addrStr
=
location
?
.
addrStr
sp
?.
encode
(
SPUtils
.
POSITIONING_MAP
,
Gson
().
toJson
(
positioningBean
).
toString
())
// MapView 销毁后不在处理新接收的位置
mBaiduMap
?.
apply
{
mCurrentLat
=
location
.
latitude
mCurrentLon
=
location
.
longitude
mCurrentAccracy
=
location
.
radius
mCurrentLat
=
location
?.
latitude
?:
0.0
mCurrentLon
=
location
?.
longitude
?:
0.0
mCurrentAccracy
=
location
?.
radius
?:
0f
myLocationData
=
MyLocationData
.
Builder
()
.
accuracy
(
location
.
radius
)
// 设置定位数据的精度信息,单位:米
.
accuracy
(
location
?.
radius
?:
0f
)
// 设置定位数据的精度信息,单位:米
.
direction
(
mCurrentDirection
.
toFloat
())
// 此处设置开发者获取到的方向信息,顺时针0-360
.
latitude
(
location
.
latitude
)
.
longitude
(
location
.
longitude
)
.
latitude
(
location
?.
latitude
?:
0.0
)
.
longitude
(
location
?.
longitude
?:
0.0
)
.
build
()
this
.
setMyLocationData
(
myLocationData
)
if
(
isFirstLoc
)
{
isFirstLoc
=
false
val
ll
=
LatLng
(
location
.
latitude
,
location
.
longitude
)
val
ll
=
LatLng
(
location
?.
latitude
?:
0.0
,
location
?.
longitude
?:
0.0
)
val
builder
=
MapStatus
.
Builder
()
builder
.
target
(
ll
).
zoom
(
18.0f
)
this
.
animateMapStatus
(
MapStatusUpdateFactory
.
newMapStatus
(
builder
.
build
()))
...
...
app/src/main/java/com/mints/street/main/my/OpenvipActivity.kt
View file @
ece1c945
...
...
@@ -2,7 +2,6 @@ package com.mints.street.main.my
import
android.annotation.SuppressLint
import
android.app.Dialog
import
android.content.Intent
import
android.graphics.Color
import
android.os.Bundle
import
android.text.TextUtils
...
...
@@ -22,21 +21,15 @@ import com.mints.street.bean.PaymentBean
import
com.mints.street.bean.VipBean
import
com.mints.street.bean.WxPayParamBean
import
com.mints.street.databinding.ActivityOpenvipBinding
import
com.mints.street.main.MainActivity
import
com.mints.street.manager.UserManager
import
com.mints.street.utils.json.JsonUtil
import
com.mints.street.widget.dialog.DialogListener
import
com.mints.street.widget.dialog.DialogUtils
import
com.mints.street.widget.dialog.WxLoginDialog
import
kotlinx.android.synthetic.main.activity_openvip.*
import
kotlinx.android.synthetic.main.activity_openvip.bt_try
import
kotlinx.android.synthetic.main.fragment_my.*
import
kotlinx.android.synthetic.main.include_header.*
import
me.goldze.mvvmhabit.base.AppManager
import
me.goldze.mvvmhabit.utils.AppUtils
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.ToastUtils
import
me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
class
OpenvipActivity
:
BaseActivity
<
ActivityOpenvipBinding
,
OpenvipViewModel
>(),
View
.
OnClickListener
{
...
...
@@ -59,10 +52,10 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
override
fun
initData
()
{
super
.
initData
()
//获取vip福利信息
viewModel
.
getVipProductsByType
()
//获取支付方式
viewModel
.
getpaymentwey
(
"android"
)
//获取vip福利信息
viewModel
.
getVipProductsByType
()
//获取支付方式
viewModel
.
getpaymentwey
(
"android"
)
initView
()
initListener
()
...
...
@@ -81,7 +74,7 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
ly_weixin
.
setOnClickListener
(
this
)
ly_alipay
.
setOnClickListener
(
this
)
loginDialog
.
setListener
(
object
:
WxLoginDialog
.
WxLoginListener
{
loginDialog
.
setListener
(
object
:
WxLoginDialog
.
WxLoginListener
{
override
fun
loginSuc
(
wxInfo
:
String
)
{
viewModel
.
wechatlogin
(
wxInfo
)
}
...
...
@@ -113,6 +106,13 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
list
.
add
(
page5
)
list
.
add
(
page8
)
// page1.setOnClickListener {
// if (UserManager.INSTANCE.userIsLogin()) {
// payVip()
// } else {
// loginDialog.show()
// }
// }
//设置显示的数据
cfp_data_viewpager
.
setViewList
(
list
)
...
...
@@ -165,6 +165,17 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
mAdapter
=
DelegateAdapter
(
vLayout
,
false
)
binding
.
listview
.
adapter
=
mAdapter
binding
.
listview
.
layoutManager
=
vLayout
}
//添加page点击时间
fun
pageOnClick
(
view
:
View
?)
{
if
(
UserManager
.
INSTANCE
.
userIsLogin
())
{
payVip
()
}
else
{
loginDialog
.
show
()
}
}
override
fun
initViewObservable
()
{
...
...
@@ -191,7 +202,7 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
}
})
viewModel
.
isPaySuc
.
observe
(
this
,
Observer
<
Boolean
>
{
if
(
it
)
{
if
(
it
)
{
finish
()
}
})
...
...
@@ -217,6 +228,13 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
}
})
viewModel
.
isloginSuc
.
observe
(
this
,
Observer
{
if
(
it
)
{
payVip
()
}
else
{
ToastUtils
.
showLong
(
"登录失败"
)
}
})
}
...
...
@@ -359,7 +377,7 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
override
fun
onResume
()
{
super
.
onResume
()
KLog
.
e
(
"OpenvipActivity"
,
"onResume"
)
KLog
.
e
(
"OpenvipActivity"
,
"onResume"
)
// if(userManager.userIsLogin()&&userManager.getVipFlag()){
// finish()
// }
...
...
app/src/main/java/com/mints/street/main/my/OpenvipViewModel.kt
View file @
ece1c945
...
...
@@ -110,6 +110,7 @@ class OpenvipViewModel(application: Application) : BaseViewModel(application) {
)
}
var
isloginSuc
:
MutableLiveData
<
Boolean
>
=
MutableLiveData
()
fun
wechatlogin
(
wxInfo
:
String
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"wxInfo"
]
=
wxInfo
...
...
@@ -125,11 +126,13 @@ class OpenvipViewModel(application: Application) : BaseViewModel(application) {
KLog
.
e
(
"wechatlogin"
,
"微信登录接口成功"
)
ToastUtils
.
showLong
(
"登录成功"
)
isloginSuc
.
value
=
true
}
override
fun
onError
(
e
:
Throwable
)
{
super
.
onError
(
e
)
KLog
.
e
(
"wechatlogin"
,
"微信登录接口失败"
)
isloginSuc
.
value
=
false
}
})
}
...
...
app/src/main/res/layout/view_data_page1.xml
View file @
ece1c945
...
...
@@ -5,6 +5,7 @@
android:background=
"@mipmap/icon_card"
android:gravity=
"center_vertical"
android:paddingLeft=
"15dp"
android:paddingTop=
"20dp"
>
android:paddingTop=
"20dp"
android:onClick=
"pageOnClick"
>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/view_data_page2.xml
View file @
ece1c945
...
...
@@ -5,7 +5,8 @@
android:background=
"@mipmap/icon_card1"
android:gravity=
"center_vertical"
android:paddingLeft=
"15dp"
android:paddingTop=
"20dp"
>
android:paddingTop=
"20dp"
android:onClick=
"pageOnClick"
>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/view_data_page3.xml
View file @
ece1c945
...
...
@@ -5,5 +5,6 @@
android:background=
"@mipmap/icon_card2"
android:gravity=
"center_vertical"
android:paddingLeft=
"15dp"
android:paddingTop=
"20dp"
>
android:paddingTop=
"20dp"
android:onClick=
"pageOnClick"
>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/view_data_page4.xml
View file @
ece1c945
...
...
@@ -5,5 +5,6 @@
android:background=
"@mipmap/icon_card3"
android:gravity=
"center_vertical"
android:paddingLeft=
"15dp"
android:paddingTop=
"20dp"
>
android:paddingTop=
"20dp"
android:onClick=
"pageOnClick"
>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/view_data_page5.xml
View file @
ece1c945
...
...
@@ -5,6 +5,7 @@
android:background=
"@mipmap/icon_card4"
android:gravity=
"center_vertical"
android:paddingLeft=
"15dp"
android:paddingTop=
"20dp"
>
android:paddingTop=
"20dp"
android:onClick=
"pageOnClick"
>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/view_data_page6.xml
View file @
ece1c945
...
...
@@ -5,6 +5,7 @@
android:background=
"@mipmap/icon_card5"
android:gravity=
"center_vertical"
android:paddingLeft=
"15dp"
android:paddingTop=
"20dp"
>
android:paddingTop=
"20dp"
android:onClick=
"pageOnClick"
>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/view_data_page7.xml
View file @
ece1c945
...
...
@@ -5,6 +5,7 @@
android:background=
"@mipmap/icon_card6"
android:gravity=
"center_vertical"
android:paddingLeft=
"15dp"
android:paddingTop=
"20dp"
>
android:paddingTop=
"20dp"
android:onClick=
"pageOnClick"
>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/view_data_page8.xml
View file @
ece1c945
...
...
@@ -5,6 +5,7 @@
android:background=
"@mipmap/icon_card7"
android:gravity=
"center_vertical"
android:paddingLeft=
"15dp"
android:paddingTop=
"20dp"
>
android:paddingTop=
"20dp"
android:onClick=
"pageOnClick"
>
</RelativeLayout>
\ No newline at end of file
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