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
0e4c5187
Commit
0e4c5187
authored
Aug 29, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
5c1d9fa1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
31 deletions
+27
-31
AboutusActivity.kt
...va/com/duben/happyplaylet/ui/activitys/AboutusActivity.kt
+6
-29
VipActivity.kt
...n/java/com/duben/happyplaylet/ui/activitys/VipActivity.kt
+21
-2
No files found.
video/app/src/main/java/com/duben/happyplaylet/ui/activitys/AboutusActivity.kt
View file @
0e4c5187
...
...
@@ -13,16 +13,12 @@ import com.duben.happyplaylet.MintsApplication
import
com.duben.happyplaylet.R
import
com.duben.happyplaylet.common.Constant
import
com.duben.happyplaylet.manager.TrackManager
import
com.duben.happyplaylet.manager.UserManager
import
com.duben.happyplaylet.ui.activitys.base.BaseActivity
import
com.duben.happyplaylet.utils.MateUtils
import
com.duben.happyplaylet.utils.ToastUtil
import
com.duben.library.utils.ConstantUtil
import
com.duben.library.utils.json.JsonUtil
import
com.duben.library.utils.nodoubleclick.AntiShake
import
com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram
import
com.tencent.mm.opensdk.openapi.IWXAPI
import
com.tencent.mm.opensdk.openapi.WXAPIFactory
import
kotlinx.android.synthetic.main.activity_aboutus.*
import
kotlinx.android.synthetic.main.header_layout.*
...
...
@@ -46,13 +42,12 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
ivAboutasIcon
.
setOnLongClickListener
{
// ToastUtil.showLong(
// this, "自有渠道:" + MateUtils.getAppMetaData(
// MintsApplication.getContext(), "CHANNEL_NAME"
// ) +
// "\n 头条渠道:" + HumeSDK.getChannel(context)
// )
openWxApp
()
ToastUtil
.
showLong
(
this
,
"自有渠道:"
+
MateUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
+
"\n 头条渠道:"
+
HumeSDK
.
getChannel
(
context
)
)
true
}
...
...
@@ -104,22 +99,4 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
}
}
private
fun
openWxApp
()
{
// AppConfig.enterAlipay = true
try
{
val
appId
=
"wxdafe24fe177a5661"
// 填移动应用(App)的 AppId,非小程序的 AppID
val
api
:
IWXAPI
=
WXAPIFactory
.
createWXAPI
(
context
,
appId
)
val
req
=
WXLaunchMiniProgram
.
Req
()
req
.
userName
=
"gh_439c32026e1b"
// 填小程序原始id
req
.
path
=
"/pages/loading?"
+
"app_uid="
+
UserManager
.
getInstance
().
userID
+
"&package_app="
+
Constant
.
MINTS_PKG_NAME
+
"&source_type=android"
req
.
miniprogramType
=
WXLaunchMiniProgram
.
Req
.
MINIPROGRAM_TYPE_PREVIEW
// 可选打开 开发版,体验版和正式版
// WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE // 可选打开 开发版,体验版和正式版
api
.
sendReq
(
req
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
}
video/app/src/main/java/com/duben/happyplaylet/ui/activitys/VipActivity.kt
View file @
0e4c5187
...
...
@@ -539,6 +539,25 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
* 返回支付弹窗-签约
*/
private
fun
backPayYesDialog
(
vipBean
:
VipBean
.
ListBean
)
{
if
(
vipBean
.
isAlipay
&&
vipBean
.
isWeixin
)
{
ll_vip_alipay
.
visibility
=
View
.
VISIBLE
ll_vip_wx
.
visibility
=
View
.
VISIBLE
payType
=
WEIXIN_PAY
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable_blue
)
iv_vip_alipay
.
setImageResource
(
R
.
mipmap
.
ic_vip_none
)
}
else
if
(
vipBean
.
isAlipay
&&
!
vipBean
.
isWeixin
)
{
ll_vip_alipay
.
visibility
=
View
.
VISIBLE
ll_vip_wx
.
visibility
=
View
.
GONE
payType
=
ALIPAY
iv_vip_alipay
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable_blue
)
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_none
)
}
else
if
(!
vipBean
.
isAlipay
&&
vipBean
.
isWeixin
)
{
ll_vip_alipay
.
visibility
=
View
.
GONE
ll_vip_wx
.
visibility
=
View
.
VISIBLE
payType
=
WEIXIN_PAY
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable_blue
)
iv_vip_alipay
.
setImageResource
(
R
.
mipmap
.
ic_vip_none
)
}
payYesDialog
=
PayYesDialog
(
context
,
vipBean
,
object
:
DialogListener
()
{
override
fun
onClick
(
v
:
View
)
{
if
(!
isFinishing
()
&&
payYesDialog
!=
null
&&
payYesDialog
!!
.
isShowing
())
{
...
...
@@ -796,8 +815,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
req
.
path
=
"/pages/loading?"
+
"app_uid="
+
UserManager
.
getInstance
().
userID
+
"&package_app="
+
Constant
.
MINTS_PKG_NAME
+
"&source_type=android"
req
.
miniprogramType
=
//
WXLaunchMiniProgram.Req.MINIPROGRAM_TYPE_PREVIEW // 可选打开 开发版,体验版和正式版
WXLaunchMiniProgram
.
Req
.
MINIPTOGRAM_TYPE_RELEASE
// 可选打开 开发版,体验版和正式版
WXLaunchMiniProgram
.
Req
.
MINIPROGRAM_TYPE_PREVIEW
// 可选打开 开发版,体验版和正式版
//
WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE // 可选打开 开发版,体验版和正式版
// val wx_api = WXAPIFactory.createWXAPI(context, "wxdafe24fe177a5661", true)
// api.registerApp("wxdafe24fe177a5661")
...
...
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