添加巨量融合归因,2.7.0/270
This commit is contained in:
parent
1e39df6961
commit
509e42b089
|
|
@ -180,8 +180,6 @@ dependencies {
|
||||||
implementation 'com.tencent.vasdolly:helper:3.0.4' //腾讯分包
|
implementation 'com.tencent.vasdolly:helper:3.0.4' //腾讯分包
|
||||||
implementation files('libs/humesdk-1.0.0.aar') //巨量分包
|
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:gysdk:3.1.7.0' //一键认证sdk
|
||||||
implementation 'com.getui:gtsdk:3.3.8.0' // 推送sdk
|
implementation 'com.getui:gtsdk:3.3.8.0' // 推送sdk
|
||||||
implementation 'com.getui:gtc:3.2.16.0' //个推公共库,如已接其他个推sdk则保留一个最高版本即可
|
implementation 'com.getui:gtc:3.2.16.0' //个推公共库,如已接其他个推sdk则保留一个最高版本即可
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import androidx.core.content.ContextCompat
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import com.bytedance.ads.convert.event.ConvertReportHelper
|
||||||
import com.cheng.blzb.R
|
import com.cheng.blzb.R
|
||||||
import com.cheng.blzb.bean.OrderPayEntity
|
import com.cheng.blzb.bean.OrderPayEntity
|
||||||
import com.cheng.blzb.bean.VipGoodsEntity
|
import com.cheng.blzb.bean.VipGoodsEntity
|
||||||
|
|
@ -205,11 +206,13 @@ class BuySeatDialog : DialogFragment() {
|
||||||
|
|
||||||
PayStatusEnum.PAY_CANCEL -> {
|
PayStatusEnum.PAY_CANCEL -> {
|
||||||
toast("已取消支付")
|
toast("已取消支付")
|
||||||
|
sendBDReport(false)
|
||||||
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{orderId:${orderEntity?.orderId}")
|
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{orderId:${orderEntity?.orderId}")
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
toast("已取消支付")
|
toast("已取消支付")
|
||||||
|
sendBDReport(true)
|
||||||
EventReportManager.eventReport(if (payType == 0) EventConstants.ERROR_CLIENT_WXPAY_ERR else EventConstants.ERROR_CLIENT_ALIPAY_ERR, "{orderId:${orderEntity?.orderId}", it.message)
|
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.status) {
|
||||||
if (response.data.status == "2") {
|
if (response.data.status == "2") {
|
||||||
toast("支付成功")
|
toast("支付成功")
|
||||||
|
sendBDReport(true)
|
||||||
EventReportManager.eventReport(
|
EventReportManager.eventReport(
|
||||||
EventConstants.PAY_SUCCESS,
|
EventConstants.PAY_SUCCESS,
|
||||||
if (payType == 0) "weixin" else "alipay",
|
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() {
|
private fun showQueryTipDialog() {
|
||||||
if (showQueryTip) {
|
if (showQueryTip) {
|
||||||
val f = TipDialog.newInstance("温馨提示", "是否已完成支付", "未支付", "已支付", false)
|
val f = TipDialog.newInstance("温馨提示", "是否已完成支付", "未支付", "已支付", false)
|
||||||
|
|
@ -352,6 +369,7 @@ class BuySeatDialog : DialogFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
|
cancelJob()
|
||||||
payStatusDisposable?.dispose()
|
payStatusDisposable?.dispose()
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import androidx.core.content.ContextCompat
|
||||||
import androidx.core.os.BuildCompat
|
import androidx.core.os.BuildCompat
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.bytedance.ads.convert.event.ConvertReportHelper
|
||||||
import com.cheng.blzb.R
|
import com.cheng.blzb.R
|
||||||
import com.cheng.blzb.bean.GuideTotalBidEntity
|
import com.cheng.blzb.bean.GuideTotalBidEntity
|
||||||
import com.cheng.blzb.bean.GuideUpdateEntity
|
import com.cheng.blzb.bean.GuideUpdateEntity
|
||||||
|
|
@ -297,6 +298,7 @@ class GuideVipFragment: BaseFragment<FragmentGuideVipBinding, GuideVipViewModel>
|
||||||
mViewModel.orderInfoLiveData.observe(this) {
|
mViewModel.orderInfoLiveData.observe(this) {
|
||||||
if (it.status == "2") {
|
if (it.status == "2") {
|
||||||
toast("支付成功")
|
toast("支付成功")
|
||||||
|
sendBDReport(true)
|
||||||
EventReportManager.eventReport(
|
EventReportManager.eventReport(
|
||||||
EventConstants.PAY_SUCCESS,
|
EventConstants.PAY_SUCCESS,
|
||||||
if (payType == 0) "weixin" else "alipay",
|
if (payType == 0) "weixin" else "alipay",
|
||||||
|
|
@ -324,11 +326,13 @@ class GuideVipFragment: BaseFragment<FragmentGuideVipBinding, GuideVipViewModel>
|
||||||
|
|
||||||
PayStatusEnum.PAY_CANCEL -> {
|
PayStatusEnum.PAY_CANCEL -> {
|
||||||
toast("已取消支付")
|
toast("已取消支付")
|
||||||
|
sendBDReport(false)
|
||||||
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{isGuide: true, orderId:${orderEntity?.orderId}")
|
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{isGuide: true, orderId:${orderEntity?.orderId}")
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
toast("已取消支付")
|
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)
|
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
|
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() {
|
private fun startCountdown() {
|
||||||
countdownDisposable = RxCountDown.countdown(totalSeconds)
|
countdownDisposable = RxCountDown.countdown(totalSeconds)
|
||||||
.subscribe {
|
.subscribe {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import androidx.core.view.isVisible
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.bytedance.ads.convert.event.ConvertReportHelper
|
||||||
import com.cheng.blzb.R
|
import com.cheng.blzb.R
|
||||||
import com.cheng.blzb.bean.CorpEntity
|
import com.cheng.blzb.bean.CorpEntity
|
||||||
import com.cheng.blzb.bean.OrderPayEntity
|
import com.cheng.blzb.bean.OrderPayEntity
|
||||||
|
|
@ -333,6 +334,7 @@ class VipFragment : BaseFragment<FragmentVipBinding, VipViewModel>() {
|
||||||
mViewModel.orderInfoLiveData.observe(this) {
|
mViewModel.orderInfoLiveData.observe(this) {
|
||||||
if (it.status == "2") {
|
if (it.status == "2") {
|
||||||
toast("支付成功")
|
toast("支付成功")
|
||||||
|
sendBDReport(true)
|
||||||
EventReportManager.eventReport(
|
EventReportManager.eventReport(
|
||||||
EventConstants.PAY_SUCCESS,
|
EventConstants.PAY_SUCCESS,
|
||||||
if (payType == 0) "weixin" else "alipay",
|
if (payType == 0) "weixin" else "alipay",
|
||||||
|
|
@ -357,11 +359,13 @@ class VipFragment : BaseFragment<FragmentVipBinding, VipViewModel>() {
|
||||||
|
|
||||||
PayStatusEnum.PAY_CANCEL -> {
|
PayStatusEnum.PAY_CANCEL -> {
|
||||||
toast("已取消支付")
|
toast("已取消支付")
|
||||||
|
sendBDReport(false)
|
||||||
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{orderId:${orderEntity?.orderId}")
|
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{orderId:${orderEntity?.orderId}")
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
toast("已取消支付")
|
toast("已取消支付")
|
||||||
|
sendBDReport(false)
|
||||||
EventReportManager.eventReport(if (payType == 0) EventConstants.ERROR_CLIENT_WXPAY_ERR else EventConstants.ERROR_CLIENT_ALIPAY_ERR, "{orderId:${orderEntity?.orderId}", it.message)
|
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) {
|
private fun startCountdown(time: Long) {
|
||||||
countdownDisposable = RxCountDown.countdown(time)
|
countdownDisposable = RxCountDown.countdown(time)
|
||||||
.subscribe {
|
.subscribe {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue