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
1da0be35
Commit
1da0be35
authored
Nov 01, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
58f6aada
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
13 deletions
+28
-13
VipBean.java
.../main/java/com/duben/miaoquplaylet/mvp/model/VipBean.java
+9
-1
VipActivity.kt
.../java/com/duben/miaoquplaylet/ui/activitys/VipActivity.kt
+9
-3
WXPay.java
video/wxpay/src/main/java/com/jobo/wxpay/WXPay.java
+10
-9
No files found.
video/app/src/main/java/com/duben/miaoquplaylet/mvp/model/VipBean.java
View file @
1da0be35
...
...
@@ -34,7 +34,7 @@ public class VipBean implements Serializable {
private
String
topTitle
;
private
String
buttonText
;
private
int
payToModel
;
//0 app内部,1.只签约转支付宝浏览器支付 2.带uid转支付宝小程序(暂定只有一个小程序)
private
int
wechatPayToModel
;
//带uid转支付宝小程序 第一个小程序
private
String
payToModel2FirstAlipayAppid
;
...
...
@@ -106,6 +106,14 @@ public class VipBean implements Serializable {
return
topTitle
;
}
public
int
getWechatPayToModel
()
{
return
wechatPayToModel
;
}
public
void
setWechatPayToModel
(
int
wechatPayToModel
)
{
this
.
wechatPayToModel
=
wechatPayToModel
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
...
...
video/app/src/main/java/com/duben/miaoquplaylet/ui/activitys/VipActivity.kt
View file @
1da0be35
...
...
@@ -250,8 +250,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
//0-普通或支付并签约 1-纯签约
if
(
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
val
vipBean
=
vipList
!!
[
vipAdapter
.
getPosition
()]
val
payToModel
=
vipBean
.
p
ayToModel
//0
app内部,1.只签约转支付宝浏览器支付 2.带uid转支付宝小程序(暂定只有一个小程序)
val
payToModel
=
vipBean
.
wechatP
ayToModel
//0
-普通或支付并签约 1-纯签约
when
(
payToModel
)
{
0
->
{
wxPay
(
paramsBean
,
payToModel
)
...
...
@@ -259,6 +259,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
1
->
{
wxPay
(
paramsBean
,
payToModel
)
}
else
->{
wxPay
(
paramsBean
,
payToModel
)
}
}
}
...
...
@@ -271,7 +274,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
if
(
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
val
vipBean
=
vipList
!!
[
vipAdapter
.
getPosition
()]
val
payToModel
=
vipBean
.
payToModel
//0 app内部,1.只签约转支付宝浏览器支付 2.带uid转支付宝小程序(暂定只有一个小程序)
//0 app内部,1.只签约转支付宝浏览器支付 2.带uid转支付宝小程序(暂定只有一个小程序)
4.蚂蚁链
when
(
payToModel
)
{
0
->
{
alipay
(
paramsBean
)
...
...
@@ -289,6 +292,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
4
->
{
goAlipaySignExecute
(
paramsBean
.
params
.
params
)
}
else
->{
alipay
(
paramsBean
)
}
}
}
}
...
...
video/wxpay/src/main/java/com/jobo/wxpay/WXPay.java
View file @
1da0be35
...
...
@@ -68,7 +68,8 @@ public class WXPay implements IPayStrategy<WXPayInfoImpl> {
public
void
pay
(
Activity
activity
,
WXPayInfoImpl
payInfo
,
IPayCallback
payCallback
)
{
this
.
payInfoImpli
=
payInfo
;
sPayCallback
=
payCallback
;
int
payModel
=
payInfoImpli
.
getPayModel
();
if
(
payModel
==
0
)
{
if
(
payInfoImpli
==
null
||
TextUtils
.
isEmpty
(
payInfoImpli
.
getAppid
())
||
TextUtils
.
isEmpty
(
payInfoImpli
.
getPartnerid
())
||
TextUtils
.
isEmpty
(
payInfoImpli
.
getPrepayId
())
||
TextUtils
.
isEmpty
(
payInfoImpli
.
getPackageValue
())
||
TextUtils
.
isEmpty
(
payInfoImpli
.
getNonceStr
())
||
TextUtils
.
isEmpty
(
payInfoImpli
.
getTimestamp
())
||
...
...
@@ -78,6 +79,7 @@ public class WXPay implements IPayStrategy<WXPayInfoImpl> {
}
return
;
}
}
if
(!
initializated
)
{
initWXApi
(
activity
.
getApplicationContext
(),
payInfoImpli
.
getAppid
());
...
...
@@ -91,7 +93,6 @@ public class WXPay implements IPayStrategy<WXPayInfoImpl> {
}
int
payModel
=
payInfoImpli
.
getPayModel
();
if
(
payModel
==
1
)
{
// 纯签约
WXOpenBusinessWebview
.
Req
wreq
=
new
WXOpenBusinessWebview
.
Req
();
...
...
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