Commit 11ac084b authored by maxiaoliang's avatar maxiaoliang

修改问题

parent fc475071
......@@ -19,6 +19,7 @@ import com.ym.library.config.ZXADRewardVideo
import com.ym.library.down.UpdateVersionManager
import com.ym.library.listener.ZXADVideoListener
import com.ym.library.module.NewsEntity
import com.ym.library.module.ReportEntity
import com.ym.library.net.ApiClient
import com.ym.library.net.BaseObserver
import com.ym.library.net.RxSchedulers
......@@ -86,12 +87,20 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
super.onResume()
MobclickAgent.onResume(this)
Log.d("wxw", "onResume")
EventUtils.onEvent(
"page_status",
Utils.obj2Str(ReportEntity(Constant.ReportSessionId, "GameActivity", "onResume"))
)
callUnity("Form_land", "getLandList", "")
}
override fun onPause() {
super.onPause()
MobclickAgent.onPause(this)
EventUtils.onEvent(
"page_status",
Utils.obj2Str(ReportEntity(Constant.ReportSessionId, "GameActivity", "onPause"))
)
}
......
......@@ -23,6 +23,7 @@ import com.ym.library.utils.LogUtils
import com.ym.library.utils.Utils
import com.ym.ddcy.R
import com.ym.game.module.ExchangeEntity
import com.ym.library.utils.EventUtils
class CashExchangeAdapter :
BaseRecyclerAdapter<WithDrawEntity.WdList, CashExchangeAdapter.ViewHolder> {
......@@ -52,7 +53,27 @@ class CashExchangeAdapter :
holder.item_jindu?.text = "${bean.completeNum}/${bean.targetNum}"
holder.item_duihuan?.setOnClickListener {
if (Utils.isFastClick2()) {
duihuan(bean.id)
duihuan(bean.id, bean.type!!, bean.cash)
if (bean.type == 1) {
EventUtils.onEvent("click_xinshou0.3", "新手0.3")
} else if (bean.type == 4) {
EventUtils.onEvent("click_fuli0.3", "福利0.3")
} else {
when (bean.id) {
1 -> {
EventUtils.onEvent("click_baicai", "白菜" + bean.cash)
}
2 -> {
EventUtils.onEvent("click_fanqie", "番茄" + bean.cash)
}
3 -> {
EventUtils.onEvent("click_nangua", "南瓜" + bean.cash)
}
4 -> {
EventUtils.onEvent("click_luobo", "萝卜" + bean.cash)
}
}
}
}
}
if (!TextUtils.isEmpty(bean.desc)) {
......@@ -60,7 +81,8 @@ class CashExchangeAdapter :
}
}
fun duihuan(id: Int) {
fun duihuan(id: Int, type: Int, jine: Int) {
GameApiClient.gameApi.dowd(id).compose(
RxSchedulers.observableIO2Main()
).subscribe(object : BaseObserver<ExchangeEntity>() {
......@@ -73,7 +95,10 @@ class CashExchangeAdapter :
result.status,
result.reason,
result.buttonText,
result.buttonStatus
result.buttonStatus,
id,
type,
jine
)
}
}
......
......@@ -18,6 +18,7 @@ import com.ym.library.rxbus.RxBusUtil
import com.ym.library.rxbus.Subscribe
import com.ym.library.rxbus.ThreadMode
import com.ym.ddcy.R
import com.ym.library.utils.EventUtils
object CashExchangeDialog : CashExchangeContract.View {
......@@ -32,7 +33,7 @@ object CashExchangeDialog : CashExchangeContract.View {
return
}
this.context = context
// EventUtils.onEvent("show_lucky_turntable", "幸运转盘")
EventUtils.onEvent("show_duihuan_cash", "兑换现金")
mPresenter = CashExchangePresenter(this)
mPresenter?.getWithDrawList()
RxBusUtil.getDefault().register(this)
......
......@@ -25,12 +25,9 @@ import com.ym.library.config.AdManager
import com.ym.library.config.ZXADSizeConfig
import com.ym.library.listener.ZXADExpressListener
import com.ym.library.module.NewsEntity
import com.ym.library.utils.ADConfig
import com.ym.library.utils.PhoneUtils
import com.ym.library.utils.Utils
import com.ym.ddcy.R
import com.ym.library.Constant
import com.ym.library.utils.JumpUtils
import com.ym.library.utils.*
import org.jetbrains.anko.act
import java.text.DecimalFormat
......@@ -506,7 +503,11 @@ object MainDialog {
status: Int,
reason: String,
buttonText: String,
buttonStatus: Int
buttonStatus: Int,
id:Int,
type:Int,
jine:Int
) {
if (context == null) {
return
......@@ -527,6 +528,26 @@ object MainDialog {
when (status) {
1 -> {
tvtitle.text = "提现成功"
if (type == 1) {
EventUtils.onEvent("show_xinshou0.3", "新手0.3")
} else if (type == 4) {
EventUtils.onEvent("show_fuli0.3", "福利0.3")
} else {
when (id) {
1 -> {
EventUtils.onEvent("show_baicai", "白菜" + jine)
}
2 -> {
EventUtils.onEvent("show_fanqie", "番茄" + jine)
}
3 -> {
EventUtils.onEvent("show_nangua", "南瓜" + jine)
}
4 -> {
EventUtils.onEvent("show_luobo", "萝卜" + jine)
}
}
}
}
2 -> {
tvtitle.text = "等待审核"
......@@ -535,6 +556,7 @@ object MainDialog {
tvtitle.text = "提现失败"
}
}
tvcashcontent.text = reason
tvgoon.text = buttonText
mDialogView.findViewById<TextView>(R.id.id_tv_go_on_make_money).setOnClickListener {
......
......@@ -51,7 +51,7 @@ class SpeedWaterPopupWindow : PopupWindow(), SpeedWaterContract.View,
RxBusUtil.getDefault().register(this)
mPresenter = SpeedWaterPresenter(this)
view = LayoutInflater.from(mContext).inflate(R.layout.layout_popup_speedwater, null)
// EventUtils.onEvent("show_receive_coin_task_dialog", "领金币任务")
EventUtils.onEvent("show_speed_water_task_dialog", "领加速剂任务")
init(view)
initView()
mPresenter?.getAcceleratorsTask()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment