Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
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_vedio
Commits
88657f98
Commit
88657f98
authored
Feb 18, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
bf0bf08a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
14 deletions
+28
-14
UserBean.java
.../main/java/com/duben/happyplaylet/mvp/model/UserBean.java
+9
-0
VipActivity.kt
...n/java/com/duben/happyplaylet/ui/activitys/VipActivity.kt
+8
-5
activity_new_vip.xml
video/app/src/main/res/layout/activity_new_vip.xml
+11
-9
No files found.
video/app/src/main/java/com/duben/happyplaylet/mvp/model/UserBean.java
View file @
88657f98
...
...
@@ -18,6 +18,7 @@ public class UserBean implements Serializable {
private
int
activiteFlag
=
0
;
// 1-匹配用户
private
String
openid
;
private
boolean
isForever
;
//true-永久会员
private
boolean
alipaySet
;
//支付宝授权
private
long
expireTime
;
// vip到期时间 0-非vip
private
long
pk_id
;
// 用户id
private
long
createTime
;
// 用户id
...
...
@@ -97,4 +98,12 @@ public class UserBean implements Serializable {
public
int
getActiviteFlag
()
{
return
activiteFlag
;
}
public
boolean
isAlipaySet
()
{
return
alipaySet
;
}
public
void
setAlipaySet
(
boolean
alipaySet
)
{
this
.
alipaySet
=
alipaySet
;
}
}
video/app/src/main/java/com/duben/happyplaylet/ui/activitys/VipActivity.kt
View file @
88657f98
...
...
@@ -74,6 +74,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
}
var
timer
:
CountDownTimerSupport
?
=
null
var
userBean
:
UserBean
?
=
null
private
var
breathAnim
:
YoYo
.
YoYoString
?
=
null
private
var
payAgreementDialog
:
PayAgreementDialog
?
=
null
...
...
@@ -87,7 +88,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
private
var
isGuide
:
Boolean
=
false
// 从启动页进入vip界面,返回时要回到首页
private
var
isMain
:
Boolean
=
false
private
var
isRecommend
:
Boolean
=
false
private
var
payType
=
WEIXIN_
PAY
// 支付类型
private
var
payType
=
ALI
PAY
// 支付类型
private
var
vedioId
=
""
private
var
thirdId
=
""
...
...
@@ -235,10 +236,11 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
return
}
if
(
true
)
{
// 授权 支付
if
(
userBean
?.
isAlipaySet
!!
)
{
alipay
(
paramsBean
)
}
else
{
alipayDialog
(
paramsBean
)
alipay
Login
Dialog
(
paramsBean
)
}
}
}
...
...
@@ -272,6 +274,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
}
override
fun
getUserSuc
(
data
:
UserBean
)
{
this
.
userBean
=
data
if
(
data
.
expireTime
>
0
)
{
readyGo
(
MainActivity
::
class
.
java
)
val
activity
=
...
...
@@ -801,11 +804,11 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
})
}
private
fun
alipayDialog
(
wxParanBean
:
WxPayParamBean
)
{
private
fun
alipay
Login
Dialog
(
wxParanBean
:
WxPayParamBean
)
{
DialogUtils
.
showDialog
(
this
,
SpanUtils
()
.
append
(
"请使用支付宝登录
?
"
)
.
append
(
"请使用支付宝登录"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
main_mints
))
.
create
(),
"提示"
,
...
...
video/app/src/main/res/layout/activity_new_vip.xml
View file @
88657f98
...
...
@@ -150,7 +150,7 @@
android:orientation=
"horizontal"
>
<LinearLayout
android:id=
"@+id/ll_vip_
wx
"
android:id=
"@+id/ll_vip_
alipay
"
android:layout_width=
"0dp"
android:layout_height=
"40dp"
android:layout_weight=
"1"
...
...
@@ -161,17 +161,16 @@
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableLeft=
"@mipmap/ic_
call_wx
"
android:drawableLeft=
"@mipmap/ic_
alipay
"
android:drawablePadding=
"6dp"
android:gravity=
"center_vertical"
android:text=
"
微信
支付"
android:text=
"
支付宝
支付"
android:textColor=
"@color/white"
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
<ImageView
android:id=
"@+id/iv_vip_
wx
"
android:id=
"@+id/iv_vip_
alipay
"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:scaleType=
"center"
...
...
@@ -179,7 +178,7 @@
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_vip_
alipay
"
android:id=
"@+id/ll_vip_
wx
"
android:layout_width=
"0dp"
android:layout_height=
"40dp"
android:layout_weight=
"1"
...
...
@@ -190,16 +189,17 @@
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableLeft=
"@mipmap/ic_
alipay
"
android:drawableLeft=
"@mipmap/ic_
call_wx
"
android:drawablePadding=
"6dp"
android:gravity=
"center_vertical"
android:text=
"
支付宝
支付"
android:text=
"
微信
支付"
android:textColor=
"@color/white"
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
<ImageView
android:id=
"@+id/iv_vip_
alipay
"
android:id=
"@+id/iv_vip_
wx
"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:scaleType=
"center"
...
...
@@ -207,6 +207,8 @@
</LinearLayout>
</LinearLayout>
<TextView
...
...
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