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
d20322f8
Commit
d20322f8
authored
Jul 28, 2021
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
ff10cd77
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
MainApi.kt
app/src/main/java/com/mints/street/api/MainApi.kt
+2
-2
MyFragment.kt
app/src/main/java/com/mints/street/main/my/MyFragment.kt
+1
-5
OpenvipActivity.kt
...src/main/java/com/mints/street/main/my/OpenvipActivity.kt
+5
-3
No files found.
app/src/main/java/com/mints/street/api/MainApi.kt
View file @
d20322f8
...
...
@@ -50,13 +50,13 @@ interface MainApi {
/**
* 开通vip
*/
@POST
(
"
api
/getVipProductsByType"
)
@POST
(
"
common
/getVipProductsByType"
)
fun
getVipProductsByType
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
VipBean
>>>
/**
* 获取vip支付渠道
*/
@POST
(
"
api
/getPayChannels"
)
@POST
(
"
common
/getPayChannels"
)
fun
getPayChannels
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
PaymentBean
>>>
/**
...
...
app/src/main/java/com/mints/street/main/my/MyFragment.kt
View file @
d20322f8
...
...
@@ -126,11 +126,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
//设置立即领取点击事件
binding
.
btTry
.
setOnClickListener
{
// startActivity(PermissionsActivity::class.java)
if
(
userManager
.
userIsLogin
())
{
startActivity
(
OpenvipActivity
::
class
.
java
)
}
else
{
ToastUtils
.
showLong
(
"请先登录!"
)
}
startActivity
(
OpenvipActivity
::
class
.
java
)
}
...
...
app/src/main/java/com/mints/street/main/my/OpenvipActivity.kt
View file @
d20322f8
...
...
@@ -51,12 +51,10 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
override
fun
initData
()
{
super
.
initData
()
if
(!
TextUtils
.
isEmpty
(
UserManager
.
INSTANCE
.
getUserID
())){
//获取vip福利信息
viewModel
.
getVipProductsByType
()
//获取支付方式
viewModel
.
getpaymentwey
(
"android"
)
}
StatusBarUtil
.
setHeightAndPadding
(
this
,
binding
.
viewBg
)
initView
()
...
...
@@ -235,7 +233,11 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
currentPayType
=
"ALIPAY"
}
R
.
id
.
bt_try
->
{
//点击开通全球会员按钮
payVip
()
if
(
UserManager
.
INSTANCE
.
userIsLogin
())
{
payVip
()
}
else
{
startActivity
(
OpenvipActivity
::
class
.
java
)
}
}
}
}
...
...
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