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
4848be46
Commit
4848be46
authored
Aug 28, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
5a87a336
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
73 deletions
+76
-73
VipBean.java
.../main/java/com/duben/speedplayletu/mvp/model/VipBean.java
+1
-1
VipActivity.kt
.../java/com/duben/speedplayletu/ui/activitys/VipActivity.kt
+75
-72
No files found.
video/app/src/main/java/com/duben/speedplayletu/mvp/model/VipBean.java
View file @
4848be46
...
@@ -33,7 +33,7 @@ public class VipBean implements Serializable {
...
@@ -33,7 +33,7 @@ public class VipBean implements Serializable {
private
String
title
;
private
String
title
;
private
String
topTitle
;
private
String
topTitle
;
private
String
buttonText
;
private
String
buttonText
;
private
int
payToModel
;
//0 app内部,1.只签约转支付宝浏览器支付 2.带uid转支付宝小程序(暂定只有一个小程序)
private
int
payToModel
;
//0 app内部,1.只签约转支付宝浏览器支付 2.带uid转支付宝小程序(暂定只有一个小程序)
3.微信小程序
//带uid转支付宝小程序 第一个小程序
//带uid转支付宝小程序 第一个小程序
private
String
payToModel2FirstAlipayAppid
;
private
String
payToModel2FirstAlipayAppid
;
...
...
video/app/src/main/java/com/duben/speedplayletu/ui/activitys/VipActivity.kt
View file @
4848be46
...
@@ -234,7 +234,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
...
@@ -234,7 +234,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
if
(
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
if
(
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
val
vipBean
=
vipList
!!
[
vipAdapter
.
getPosition
()]
val
vipBean
=
vipList
!!
[
vipAdapter
.
getPosition
()]
val
payToModel
=
vipBean
.
payToModel
val
payToModel
=
vipBean
.
payToModel
//0 app内部,1.只签约转支付宝浏览器支付 2.带uid转支付宝小程序(暂定只有一个小程序)
//0 app内部,1.只签约转支付宝浏览器支付 2.带uid转支付宝小程序(暂定只有一个小程序)
3.微信小程序
when
(
payToModel
)
{
when
(
payToModel
)
{
0
->
{
0
->
{
alipay
(
paramsBean
)
alipay
(
paramsBean
)
...
@@ -249,6 +249,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
...
@@ -249,6 +249,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
openAlipayApp
(
vipBean
.
payToModel2SecondAlipayAppid
)
openAlipayApp
(
vipBean
.
payToModel2SecondAlipayAppid
)
}
}
}
}
3
->
{
openWxApp
()
}
}
}
}
}
}
}
...
@@ -810,14 +813,14 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
...
@@ -810,14 +813,14 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
}
}
private
fun
openWxApp
()
{
private
fun
openWxApp
()
{
//
AppConfig.enterAlipay = true
AppConfig
.
enterAlipay
=
true
try
{
try
{
val
appId
=
"wx263e5304a9a67d7c"
// 填移动应用(App)的 AppId,非小程序的 AppID
val
appId
=
"wx263e5304a9a67d7c"
// 填移动应用(App)的 AppId,非小程序的 AppID
val
api
:
IWXAPI
=
WXAPIFactory
.
createWXAPI
(
context
,
appId
)
val
api
:
IWXAPI
=
WXAPIFactory
.
createWXAPI
(
context
,
appId
)
val
req
=
WXLaunchMiniProgram
.
Req
()
val
req
=
WXLaunchMiniProgram
.
Req
()
req
.
userName
=
"gh_439c32026e1b"
// 填小程序原始id
req
.
userName
=
"gh_439c32026e1b"
// 填小程序原始id
req
.
path
=
req
.
path
=
"/pages/loading?testApp1=mcg1&testApp2=mcg2"
////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
"/pages/loading?"
+
"app_uid="
+
UserManager
.
getInstance
().
userID
+
"&package_app="
+
Constant
.
MINTS_PKG_NAME
req
.
miniprogramType
=
req
.
miniprogramType
=
WXLaunchMiniProgram
.
Req
.
MINIPTOGRAM_TYPE_RELEASE
// 可选打开 开发版,体验版和正式版
WXLaunchMiniProgram
.
Req
.
MINIPTOGRAM_TYPE_RELEASE
// 可选打开 开发版,体验版和正式版
api
.
sendReq
(
req
)
api
.
sendReq
(
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