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
c0644d67
Commit
c0644d67
authored
Jul 30, 2021
by
张释方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交精选体验接口
parent
eea467fc
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
392 additions
and
256 deletions
+392
-256
GridMapAdapter.kt
app/src/main/java/com/mints/street/adapter/GridMapAdapter.kt
+12
-10
ItemEnterDestinationAdapter.kt
...a/com/mints/street/adapter/ItemEnterDestinationAdapter.kt
+1
-1
MainApi.kt
app/src/main/java/com/mints/street/api/MainApi.kt
+13
-0
MyFragment.kt
app/src/main/java/com/mints/street/main/my/MyFragment.kt
+1
-1
MyViewModel.kt
app/src/main/java/com/mints/street/main/my/MyViewModel.kt
+0
-3
OpenvipActivity.kt
...src/main/java/com/mints/street/main/my/OpenvipActivity.kt
+17
-0
DetailedActivity.kt
...rc/main/java/com/mints/street/main/vr/DetailedActivity.kt
+19
-0
DetailedViewModel.kt
...c/main/java/com/mints/street/main/vr/DetailedViewModel.kt
+20
-0
FeaturedExperienceFragment.kt
...va/com/mints/street/main/vr/FeaturedExperienceFragment.kt
+15
-3
FeaturedExperienceViewModel.kt
...a/com/mints/street/main/vr/FeaturedExperienceViewModel.kt
+19
-0
FreeZoneFragment.kt
...rc/main/java/com/mints/street/main/vr/FreeZoneFragment.kt
+2
-2
VRFragment.kt
app/src/main/java/com/mints/street/main/vr/VRFragment.kt
+1
-1
ApiModel.kt
app/src/main/java/com/mints/street/model/ApiModel.kt
+13
-0
BackVipDialog.kt
...main/java/com/mints/street/widget/dialog/BackVipDialog.kt
+1
-1
shape_dialog_backvip.xml
app/src/main/res/drawable/shape_dialog_backvip.xml
+10
-0
dialog_backvip.xml
app/src/main/res/layout/dialog_backvip.xml
+239
-225
item_grid_map_adapter.xml
app/src/main/res/layout/item_grid_map_adapter.xml
+9
-9
ic_btn_backvip_unenabled.png
app/src/main/res/mipmap-xhdpi/ic_btn_backvip_unenabled.png
+0
-0
ic_close_backvip_dialog.png
app/src/main/res/mipmap-xhdpi/ic_close_backvip_dialog.png
+0
-0
icon_backvip1.png
app/src/main/res/mipmap-xhdpi/icon_backvip1.png
+0
-0
icon_backvip2.png
app/src/main/res/mipmap-xhdpi/icon_backvip2.png
+0
-0
icon_backvip3.png
app/src/main/res/mipmap-xhdpi/icon_backvip3.png
+0
-0
icon_backvip4.png
app/src/main/res/mipmap-xhdpi/icon_backvip4.png
+0
-0
icon_backvip5.png
app/src/main/res/mipmap-xhdpi/icon_backvip5.png
+0
-0
icon_backvip6.png
app/src/main/res/mipmap-xhdpi/icon_backvip6.png
+0
-0
icon_vip_cancel1.png
app/src/main/res/mipmap-xhdpi/icon_vip_cancel1.png
+0
-0
No files found.
app/src/main/java/com/mints/street/adapter/GridMapAdapter.kt
View file @
c0644d67
package
com.mints.street.adapter
import
android.app.ActionBar
import
android.content.Context
import
android.icu.number.IntegerWidth
import
android.view.WindowManager
import
android.widget.ImageView
import
com.alibaba.android.vlayout.LayoutHelper
import
com.alibaba.android.vlayout.layout.GridLayoutHelper
import
com.bumptech.glide.Glide
...
...
@@ -12,6 +16,7 @@ import com.mints.street.bean.VrmapBean
import
com.mints.street.databinding.ItemGridMapAdapterBinding
import
com.mints.street.webview.MintsWebViewActivity
import
me.goldze.mvvmhabit.utils.AppUtils
import
me.goldze.mvvmhabit.utils.KLog
/**
* Created by 冯瑞雨 on 2021/7/9.
...
...
@@ -26,11 +31,11 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
)
{
var
a
=
holder
.
binding
.
bg
.
layoutParams
if
(
position
%
2
==
0
)
{
holder
.
binding
.
bg
.
setMargin
(
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
1
0F
),
AppUtils
.
dp2Px
(
context
,
5F
),
0
,
null
,
null
,
null
)
holder
.
binding
.
bg
.
setMargin
(
AppUtils
.
dp2Px
(
context
,
20F
),
AppUtils
.
dp2Px
(
context
,
2
0F
),
AppUtils
.
dp2Px
(
context
,
1
5F
),
0
,
null
,
null
,
null
)
}
else
{
holder
.
binding
.
bg
.
setMargin
(
AppUtils
.
dp2Px
(
context
,
5F
),
AppUtils
.
dp2Px
(
context
,
1
0F
),
AppUtils
.
dp2Px
(
context
,
1
0F
),
0
,
null
,
null
,
null
)
holder
.
binding
.
bg
.
setMargin
(
AppUtils
.
dp2Px
(
context
,
15F
),
AppUtils
.
dp2Px
(
context
,
2
0F
),
AppUtils
.
dp2Px
(
context
,
2
0F
),
0
,
null
,
null
,
null
)
}
datalist
?.
let
{
...
...
@@ -39,12 +44,7 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
Glide
.
with
(
mContext
).
load
(
databean
.
img
).
into
(
holder
.
binding
.
image
)
//设置标题
holder
.
binding
.
tvName
.
text
=
databean
.
name
// //设置星星数量
// var i = 0
// while (i < 5) {
// holder.binding.lyStar.addView(View.inflate(context, R.layout.include_start_show, null))
// i += 1
// }
//设置点击跳转
holder
.
itemView
.
setOnClickListener
{
//页面跳转
...
...
@@ -58,6 +58,8 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
}
override
fun
getItemCount
()
=
list
!!
.
size
override
fun
onCreateLayoutHelper
():
LayoutHelper
{
...
...
app/src/main/java/com/mints/street/adapter/ItemEnterDestinationAdapter.kt
View file @
c0644d67
...
...
@@ -19,7 +19,7 @@ import com.mints.street.main.vr.DetailedActivity
class
ItemEnterDestinationAdapter
(
val
context
:
Context
,
private
val
isMultipleLayout
:
Boolean
,
va
l
list
:
List
<
VrmapBean
.
Abroad
>?
va
r
list
:
List
<
VrmapBean
.
Abroad
>?
)
:
AbstractVLayoutBaseAdapter
<
ItemEnterDestinationAdapterBinding
,
List
<
VrmapBean
.
Abroad
>?>(
context
,
list
,
...
...
app/src/main/java/com/mints/street/api/MainApi.kt
View file @
c0644d67
...
...
@@ -117,4 +117,17 @@ interface MainApi {
*/
@POST
(
"api/mpgah"
)
fun
authorized
():
Observable
<
Response
<
BaseResponse
<
AuthorizedBean
>>>
/**
* 精选体验展示图
*/
@POST
(
"na/getChooseExperienceHeadData"
)
fun
getChooseExperienceHeadData
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>
/**
* 精选体验详情
*/
@POST
(
"na/getChooseExperienceData"
)
fun
getChooseExperienceData
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/my/MyFragment.kt
View file @
c0644d67
...
...
@@ -132,7 +132,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
// 是否会员
if
(
userManager
.
getVipFlag
())
{
tv_tips
.
text
=
"恭喜您,
已经
成为全球会员啦~"
tv_tips
.
text
=
"恭喜您,成为全球会员啦~"
bt_try
.
visibility
=
View
.
INVISIBLE
}
else
{
tv_tips
.
text
=
"恭喜你被全球会员卡砸中~"
...
...
app/src/main/java/com/mints/street/main/my/MyViewModel.kt
View file @
c0644d67
...
...
@@ -103,7 +103,4 @@ class MyViewModel(application: Application) : BaseViewModel(application) {
})
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/my/OpenvipActivity.kt
View file @
c0644d67
...
...
@@ -2,6 +2,7 @@ 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
...
...
@@ -33,12 +34,14 @@ 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
{
private
val
userManager
by
lazy
{
UserManager
.
INSTANCE
}
private
var
vLayout
:
VirtualLayoutManager
?
=
null
private
var
mAdapter
:
DelegateAdapter
?
=
null
private
var
gridPaymentAdapter
:
GridPaymentAdapter
?
=
null
...
...
@@ -354,5 +357,19 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
}
override
fun
onResume
()
{
super
.
onResume
()
KLog
.
e
(
"OpenvipActivity"
,
"onResume"
)
// if(userManager.userIsLogin()&&userManager.getVipFlag()){
// finish()
// }
}
// override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
// super.onActivityResult(requestCode, resultCode, data)
// KLog.e("OpenvipActivity","onActivityResult")
// }
}
app/src/main/java/com/mints/street/main/vr/DetailedActivity.kt
View file @
c0644d67
...
...
@@ -11,6 +11,7 @@ import com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.adapter.GridMapAdapter
import
com.mints.street.adapter.GridVrMapAdapter
import
com.mints.street.adapter.ItemEnterDestinationAdapter
import
com.mints.street.databinding.ActivityDetailedBinding
import
com.mints.street.databinding.ActivityMoresettingsBinding
import
com.mints.street.main.my.MoresettingsViewModel
...
...
@@ -60,4 +61,22 @@ class DetailedActivity : BaseActivity<ActivityDetailedBinding, DetailedViewModel
override
fun
onClick
(
v
:
View
?)
{
}
override
fun
onResume
()
{
super
.
onResume
()
viewModel
.
getChooseExperienceData
()
}
override
fun
initViewObservable
()
{
super
.
initViewObservable
()
// viewModel.VrmapBean.observe(this, Observer {
//// mAdapter?.addAdapter(ItemEnterDestinationAdapter(context!!, false,it.abroad))
// if (gridVrMapAdapter == null){
// gridVrMapAdapter = ItemEnterDestinationAdapter(context!!, false,it.abroad)
// mAdapter?.addAdapter(gridVrMapAdapter)
// }
// gridVrMapAdapter?.list = it.abroad
// mAdapter?.notifyDataSetChanged()
// })
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/vr/DetailedViewModel.kt
View file @
c0644d67
package
com.mints.street.main.vr
import
android.app.Application
import
com.mints.street.bean.BaseResponse
import
com.mints.street.model.ApiModel
import
com.mints.street.netwrok.base.HttpSubscribeImpl
import
me.goldze.mvvmhabit.base.BaseViewModel
import
me.goldze.mvvmhabit.utils.KLog
import
java.util.HashMap
class
DetailedViewModel
(
application
:
Application
)
:
BaseViewModel
(
application
)
{
fun
getChooseExperienceData
(){
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"area"
]
=
"北京"
ApiModel
.
getChooseExperienceData
(
lifecycleProvider
,
vo
).
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
Any
>>(
this
@DetailedViewModel
,
true
){
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
Any
>)
{
KLog
.
e
(
"getChooseExperienceData"
,
"成功================="
)
}
override
fun
onError
(
e
:
Throwable
)
{
KLog
.
e
(
"getChooseExperienceData"
,
"请求失败 : $e"
)
}
}
)
}
}
app/src/main/java/com/mints/street/main/vr/FeaturedExperienceFragment.kt
View file @
c0644d67
...
...
@@ -23,6 +23,7 @@ class FeaturedExperienceFragment:BaseFragment<FragmentFeaturedExperienceBinding
private
var
vLayout
:
VirtualLayoutManager
?
=
null
private
var
mAdapter
:
DelegateAdapter
?
=
null
private
var
itemEnterDestinationAdapter
:
ItemEnterDestinationAdapter
?=
null
override
fun
initContentView
(
inflater
:
LayoutInflater
?,
container
:
ViewGroup
?,
...
...
@@ -40,14 +41,25 @@ class FeaturedExperienceFragment:BaseFragment<FragmentFeaturedExperienceBinding
binding
.
listView
.
layoutManager
=
vLayout
binding
.
listView
.
adapter
=
mAdapter
viewModel
.
vrPlaces
()
}
override
fun
initViewObservable
()
{
super
.
initViewObservable
()
viewModel
.
VrmapBean
.
observe
(
this
,
Observer
{
mAdapter
?.
addAdapter
(
ItemEnterDestinationAdapter
(
context
!!
,
false
,
it
.
abroad
))
// mAdapter?.addAdapter(ItemEnterDestinationAdapter(context!!, false,it.abroad))
if
(
itemEnterDestinationAdapter
==
null
){
itemEnterDestinationAdapter
=
ItemEnterDestinationAdapter
(
context
!!
,
false
,
it
.
abroad
)
mAdapter
?.
addAdapter
(
itemEnterDestinationAdapter
)
}
itemEnterDestinationAdapter
?.
list
=
it
.
abroad
mAdapter
?.
notifyDataSetChanged
()
})
}
override
fun
onResume
()
{
super
.
onResume
()
// viewModel.vrPlaces()
//设置数据请求
viewModel
.
getChooseExperienceHeadData
()
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/vr/FeaturedExperienceViewModel.kt
View file @
c0644d67
...
...
@@ -9,6 +9,7 @@ import com.mints.street.model.ApiModel
import
com.mints.street.netwrok.base.HttpSubscribeImpl
import
me.goldze.mvvmhabit.base.BaseViewModel
import
me.goldze.mvvmhabit.utils.KLog
import
java.util.HashMap
/**
* Created by 冯瑞雨 on 2021/7/9.
...
...
@@ -38,4 +39,22 @@ class FeaturedExperienceViewModel(application: Application):BaseViewModel(applic
}
)
}
fun
getChooseExperienceHeadData
(){
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"pageNum"
]
=
1
vo
[
"pageSize"
]
=
2
ApiModel
.
getChooseExperienceHeadData
(
lifecycleProvider
,
vo
).
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
Any
>>(
this
@FeaturedExperienceViewModel
,
true
){
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
Any
>)
{
KLog
.
e
(
"getChooseExperienceHeadData"
,
"成功================="
)
}
override
fun
onError
(
e
:
Throwable
)
{
KLog
.
e
(
"getChooseExperienceHeadData"
,
"请求失败 : $e"
)
}
}
)
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/vr/FreeZoneFragment.kt
View file @
c0644d67
...
...
@@ -53,10 +53,10 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel
override
fun
initViewObservable
()
{
super
.
initViewObservable
()
viewModel
.
VrmapBean
.
observe
(
this
,
Observer
<
VrmapBean
>
{
if
(
enterDestinationAdapter
==
null
){
/*
if(enterDestinationAdapter == null){
enterDestinationAdapter = EnterDestinationAdapter(context!!,it.abroad )
mAdapter?.addAdapter(enterDestinationAdapter)
}
}
*/
if
(
gridMapAdapter
==
null
){
gridMapAdapter
=
GridMapAdapter
(
context
!!
,
it
.
internal
)
mAdapter
?.
addAdapter
(
gridMapAdapter
)
...
...
app/src/main/java/com/mints/street/main/vr/VRFragment.kt
View file @
c0644d67
...
...
@@ -61,7 +61,7 @@ class VRFragment : BaseFragment<FragmentVrBinding, VRViewModel>() {
binding
.
viewPager
.
init
(
this
,
fragments
)
//初始化 magic_indicator
binding
.
magicIndicator
.
bindViewPager2
(
binding
.
viewPager
,
tabNames
,
{},
20
f
,
true
)
binding
.
magicIndicator
.
bindViewPager2
(
binding
.
viewPager
,
tabNames
,
{},
16
f
,
true
)
}
...
...
app/src/main/java/com/mints/street/model/ApiModel.kt
View file @
c0644d67
...
...
@@ -94,6 +94,19 @@ object ApiModel {
.
execute
(
lifecycleProvider
,
MainApi
.
newInstance
().
vrPlaces
())
}
/**
* 精选体验展示图
*/
fun
getChooseExperienceHeadData
(
lifecycleProvider
:
LifecycleProvider
<
Any
>?,
map
:
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>{
return
HttpManager
.
getInstance
().
execute
(
lifecycleProvider
,
MainApi
.
newInstance
().
getChooseExperienceHeadData
(
map
))
}
/**
* 精选体验详情
*/
fun
getChooseExperienceData
(
lifecycleProvider
:
LifecycleProvider
<
Any
>?,
map
:
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>{
return
HttpManager
.
getInstance
().
execute
(
lifecycleProvider
,
MainApi
.
newInstance
().
getChooseExperienceData
(
map
))
}
/**
* 绑定手机号登录
*/
...
...
app/src/main/java/com/mints/street/widget/dialog/BackVipDialog.kt
View file @
c0644d67
...
...
@@ -19,7 +19,7 @@ class BackVipDialog(context: Context, private val listener: DialogListener) :
private
val
lp
:
WindowManager
.
LayoutParams
private
val
tv_payment
:
TextView
private
val
tv_close
:
Text
View
private
val
tv_close
:
Image
View
init
{
setContentView
(
R
.
layout
.
dialog_backvip
)
...
...
app/src/main/res/drawable/shape_dialog_backvip.xml
0 → 100644
View file @
c0644d67
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<gradient
android:angle=
"90"
android:endColor=
"#C19161"
android:startColor=
"#8E5832"
android:type=
"linear"
android:useLevel=
"true"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/dialog_backvip.xml
View file @
c0644d67
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/item_grid_map_adapter.xml
View file @
c0644d67
...
...
@@ -14,7 +14,7 @@
android:layout_margin=
"15dp"
android:id=
"@+id/bg"
android:layout_width=
"100dp"
android:layout_height=
"2
3
0dp"
android:layout_height=
"2
1
0dp"
android:background=
"@drawable/shape_bg_vrdata"
android:elevation=
"5dp"
android:orientation=
"vertical"
>
...
...
@@ -22,7 +22,7 @@
<com.mints.street.widget.XCRoundRectImageView
android:id=
"@+id/image"
android:layout_width=
"match_parent"
android:layout_height=
"1
6
0dp"
/>
android:layout_height=
"1
3
0dp"
/>
<TextView
android:id=
"@+id/tv_name"
...
...
@@ -33,13 +33,13 @@
android:textColor=
"@color/black"
android:textSize=
"12sp"
/>
<
LinearLayout
android:id=
"@+id/l
y_star
"
android:layout_
width=
"wrap_content
"
android:layout_
height=
"wrap_content
"
android:
orientation=
"horizontal"
>
</LinearLayout
>
<
com.mints.street.widget.RatingStar
android:id=
"@+id/l
lstart
"
android:layout_
marginStart=
"10dp
"
android:layout_
width=
"60dp
"
android:
layout_height=
"10dp"
app:starNormal=
"@mipmap/star_icon"
app:starNumber=
"5"
/
>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/ic_btn_backvip_unenabled.png
0 → 100644
View file @
c0644d67
59.7 KB
app/src/main/res/mipmap-xhdpi/ic_close_backvip_dialog.png
0 → 100644
View file @
c0644d67
2.37 KB
app/src/main/res/mipmap-xhdpi/icon_backvip1.png
0 → 100644
View file @
c0644d67
5.26 KB
app/src/main/res/mipmap-xhdpi/icon_backvip2.png
0 → 100644
View file @
c0644d67
6.35 KB
app/src/main/res/mipmap-xhdpi/icon_backvip3.png
0 → 100644
View file @
c0644d67
5.99 KB
app/src/main/res/mipmap-xhdpi/icon_backvip4.png
0 → 100644
View file @
c0644d67
6.15 KB
app/src/main/res/mipmap-xhdpi/icon_backvip5.png
0 → 100644
View file @
c0644d67
5.56 KB
app/src/main/res/mipmap-xhdpi/icon_backvip6.png
0 → 100644
View file @
c0644d67
4.95 KB
app/src/main/res/mipmap-xhdpi/icon_vip_cancel1.png
View replaced file @
eea467fc
View file @
c0644d67
56.2 KB
|
W:
|
H:
55.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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