添加巨量融合归因,2.7.0/270

This commit is contained in:
wangyu 2026-02-05 11:25:53 +08:00
parent 1e39df6961
commit 509e42b089
4 changed files with 52 additions and 2 deletions

View File

@ -180,8 +180,6 @@ dependencies {
implementation 'com.tencent.vasdolly:helper:3.0.4' //
implementation files('libs/humesdk-1.0.0.aar') //
implementation 'com.bytedance.ads:AppConvert:2.0.0' //
implementation 'com.getui:gysdk:3.1.7.0' //sdk
implementation 'com.getui:gtsdk:3.3.8.0' // sdk
implementation 'com.getui:gtc:3.2.16.0' //sdk则保留一个最高版本即可

View File

@ -15,6 +15,7 @@ import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import androidx.fragment.app.DialogFragment
import androidx.lifecycle.lifecycleScope
import com.bytedance.ads.convert.event.ConvertReportHelper
import com.cheng.blzb.R
import com.cheng.blzb.bean.OrderPayEntity
import com.cheng.blzb.bean.VipGoodsEntity
@ -205,11 +206,13 @@ class BuySeatDialog : DialogFragment() {
PayStatusEnum.PAY_CANCEL -> {
toast("已取消支付")
sendBDReport(false)
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{orderId:${orderEntity?.orderId}")
}
else -> {
toast("已取消支付")
sendBDReport(true)
EventReportManager.eventReport(if (payType == 0) EventConstants.ERROR_CLIENT_WXPAY_ERR else EventConstants.ERROR_CLIENT_ALIPAY_ERR, "{orderId:${orderEntity?.orderId}", it.message)
}
}
@ -262,6 +265,7 @@ class BuySeatDialog : DialogFragment() {
if (response.status) {
if (response.data.status == "2") {
toast("支付成功")
sendBDReport(true)
EventReportManager.eventReport(
EventConstants.PAY_SUCCESS,
if (payType == 0) "weixin" else "alipay",
@ -334,6 +338,19 @@ class BuySeatDialog : DialogFragment() {
}
}
private fun sendBDReport(isSuccess: Boolean) {
ConvertReportHelper.onEventPurchase(
"corp",
goodsEntity!!.goods_name,
goodsEntity!!.goods_id,
1,
if (payType == 0) "weixin" else "alipay",
"¥",
isSuccess,
totalPrice.toInt()
)
}
private fun showQueryTipDialog() {
if (showQueryTip) {
val f = TipDialog.newInstance("温馨提示", "是否已完成支付", "未支付", "已支付", false)
@ -352,6 +369,7 @@ class BuySeatDialog : DialogFragment() {
}
override fun onDestroy() {
cancelJob()
payStatusDisposable?.dispose()
super.onDestroy()
}

View File

@ -16,6 +16,7 @@ import androidx.core.content.ContextCompat
import androidx.core.os.BuildCompat
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import com.bytedance.ads.convert.event.ConvertReportHelper
import com.cheng.blzb.R
import com.cheng.blzb.bean.GuideTotalBidEntity
import com.cheng.blzb.bean.GuideUpdateEntity
@ -297,6 +298,7 @@ class GuideVipFragment: BaseFragment<FragmentGuideVipBinding, GuideVipViewModel>
mViewModel.orderInfoLiveData.observe(this) {
if (it.status == "2") {
toast("支付成功")
sendBDReport(true)
EventReportManager.eventReport(
EventConstants.PAY_SUCCESS,
if (payType == 0) "weixin" else "alipay",
@ -324,11 +326,13 @@ class GuideVipFragment: BaseFragment<FragmentGuideVipBinding, GuideVipViewModel>
PayStatusEnum.PAY_CANCEL -> {
toast("已取消支付")
sendBDReport(false)
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{isGuide: true, orderId:${orderEntity?.orderId}")
}
else -> {
toast("已取消支付")
sendBDReport(false)
EventReportManager.eventReport(if (payType == 0) EventConstants.ERROR_CLIENT_WXPAY_ERR else EventConstants.ERROR_CLIENT_ALIPAY_ERR, "{isGuide: true, orderId:${orderEntity?.orderId}", it.message)
}
}
@ -696,6 +700,19 @@ class GuideVipFragment: BaseFragment<FragmentGuideVipBinding, GuideVipViewModel>
return dateList
}
private fun sendBDReport(isSuccess: Boolean) {
ConvertReportHelper.onEventPurchase(
"member",
goodsEntity!!.goods_name,
goodsEntity!!.goods_id,
1,
if (payType == 0) "weixin" else "alipay",
"¥",
isSuccess,
totalPrice.toInt()
)
}
private fun startCountdown() {
countdownDisposable = RxCountDown.countdown(totalSeconds)
.subscribe {

View File

@ -10,6 +10,7 @@ import androidx.core.view.isVisible
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.bytedance.ads.convert.event.ConvertReportHelper
import com.cheng.blzb.R
import com.cheng.blzb.bean.CorpEntity
import com.cheng.blzb.bean.OrderPayEntity
@ -333,6 +334,7 @@ class VipFragment : BaseFragment<FragmentVipBinding, VipViewModel>() {
mViewModel.orderInfoLiveData.observe(this) {
if (it.status == "2") {
toast("支付成功")
sendBDReport(true)
EventReportManager.eventReport(
EventConstants.PAY_SUCCESS,
if (payType == 0) "weixin" else "alipay",
@ -357,11 +359,13 @@ class VipFragment : BaseFragment<FragmentVipBinding, VipViewModel>() {
PayStatusEnum.PAY_CANCEL -> {
toast("已取消支付")
sendBDReport(false)
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{orderId:${orderEntity?.orderId}")
}
else -> {
toast("已取消支付")
sendBDReport(false)
EventReportManager.eventReport(if (payType == 0) EventConstants.ERROR_CLIENT_WXPAY_ERR else EventConstants.ERROR_CLIENT_ALIPAY_ERR, "{orderId:${orderEntity?.orderId}", it.message)
}
}
@ -599,6 +603,19 @@ class VipFragment : BaseFragment<FragmentVipBinding, VipViewModel>() {
}
}
private fun sendBDReport(isSuccess: Boolean) {
ConvertReportHelper.onEventPurchase(
"member",
goodsEntity!!.goods_name,
goodsEntity!!.goods_id,
1,
if (payType == 0) "weixin" else "alipay",
"¥",
isSuccess,
totalPrice.toInt()
)
}
private fun startCountdown(time: Long) {
countdownDisposable = RxCountDown.countdown(time)
.subscribe {