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
5422f347
Commit
5422f347
authored
Aug 13, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加微信打开小程序功能
parent
d547032b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
VipActivity.kt
.../java/com/duben/speedplayletu/ui/activitys/VipActivity.kt
+21
-1
build.gradle
video/wxpay/build.gradle
+2
-1
No files found.
video/app/src/main/java/com/duben/speedplayletu/ui/activitys/VipActivity.kt
View file @
5422f347
...
...
@@ -11,7 +11,6 @@ import android.text.TextUtils
import
android.view.KeyEvent
import
android.view.View
import
android.widget.CompoundButton
import
androidx.recyclerview.widget.GridLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
...
...
@@ -38,6 +37,9 @@ import com.jobo.rxpay.RxPay
import
com.jobo.rxpay.callback.IPayCallback
import
com.jobo.wxpay.WXPay
import
com.jobo.wxpay.WXPayInfoImpl
import
com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram
import
com.tencent.mm.opensdk.openapi.IWXAPI
import
com.tencent.mm.opensdk.openapi.WXAPIFactory
import
com.youth.banner.listener.OnPageChangeListener
import
kotlinx.android.synthetic.main.activity_new_vip.*
import
java.net.URLEncoder
...
...
@@ -789,4 +791,22 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
e
.
printStackTrace
()
}
}
*/
/**
*
跳转支付宝小程序
private
fun
openWxApp
()
{
// AppConfig.enterAlipay = true
try
{
val
appId
=
"wx263e5304a9a67d7c"
// 填移动应用(App)的 AppId,非小程序的 AppID
val
api
:
IWXAPI
=
WXAPIFactory
.
createWXAPI
(
context
,
appId
)
val
req
=
WXLaunchMiniProgram
.
Req
()
req
.
userName
=
"gh_439c32026e1b"
// 填小程序原始id
req
.
path
=
"/pages/loading?testApp1=mcg1&testApp2=mcg2"
////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
req
.
miniprogramType
=
WXLaunchMiniProgram
.
Req
.
MINIPTOGRAM_TYPE_RELEASE
// 可选打开 开发版,体验版和正式版
api
.
sendReq
(
req
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
}
\ No newline at end of file
video/wxpay/build.gradle
View file @
5422f347
...
...
@@ -37,7 +37,8 @@ dependencies {
// implementation 'androidx.appcompat:appcompat:1.2.0'
// implementation 'com.google.android.material:material:1.3.0'
api
'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'
// api 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'
api
'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.4.0'
compileOnly
project
(
":rxpay"
)
}
\ No newline at end of file
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