Commit 30c75055 authored by Li's avatar Li

[李俊岐] 修复bug

parent 030cb772
...@@ -190,11 +190,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback { ...@@ -190,11 +190,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
*/ */
fun gotoWithdrawPage(type: Int) { fun gotoWithdrawPage(type: Int) {
JumpUtils.jumpUserInfoActivity() JumpUtils.jumpUserInfoActivity()
// if (type == 1) {
// JumpUtils.h5Jump("跳转提现页", Constant.Param.WithDraw2, false, act)
// } else {
// JumpUtils.h5Jump("跳转提现页", Constant.Param.WithDraw, false, act)
// }
} }
/** /**
...@@ -629,13 +624,13 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback { ...@@ -629,13 +624,13 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
} }
//看视频除虫 //看视频除虫
fun lookAdVideoCleanWorm(id: Int) { fun lookAdVideoCleanWorm(id: Int,type: Int) {
this.runOnUiThread(object : Runnable { this.runOnUiThread(object : Runnable {
override fun run() { override fun run() {
GameDialog.showShopDamage(this@GameActivity, "1", View.OnClickListener { GameDialog.showShopDamage(this@GameActivity, type, View.OnClickListener {
AdUtils.playRewardAd( AdUtils.playRewardAd(
this@GameActivity, this@GameActivity,
"CleanWorm", "shop_damage_video",
object : IAdVideoListener { object : IAdVideoListener {
override fun onAdClose() { override fun onAdClose() {
getUnlockLandNew(id, 4, 0) getUnlockLandNew(id, 4, 0)
...@@ -1226,6 +1221,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback { ...@@ -1226,6 +1221,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
//订单弹窗 //订单弹窗
fun showOrderDialog() { fun showOrderDialog() {
EventUtils.onEvent("dingdan_click")
GameApiClient.gameApi.getHomeWList().compose(RxSchedulers.observableIO2Main()) GameApiClient.gameApi.getHomeWList().compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<OrderEntity>() { .subscribe(object : BaseObserver<OrderEntity>() {
override fun onSuccess(result: OrderEntity?) { override fun onSuccess(result: OrderEntity?) {
...@@ -1294,7 +1290,11 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback { ...@@ -1294,7 +1290,11 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
fun showCoinNotEnough(){ fun showCoinNotEnough(){
MainLooper.get()?.post(Runnable { MainLooper.get()?.post(Runnable {
GameDialog.showGoldInadequate(this,View.OnClickListener { GameDialog.showGoldInadequate(this,View.OnClickListener {
runOnUiThread(object : Runnable {
override fun run() {
SiginDropsPopupwindow().init(this@GameActivity, this@GameActivity)
}
})
}) })
}) })
} }
......
...@@ -32,7 +32,7 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View, ...@@ -32,7 +32,7 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View,
} }
override fun init() { override fun init() {
EventUtils.onEvent("attendance_show") EventUtils.onEvent("daka_show")
mPresenter = ClockInWithdrawPresenter(this) mPresenter = ClockInWithdrawPresenter(this)
iv_clock_in_close?.setOnClickListener { iv_clock_in_close?.setOnClickListener {
finish() finish()
...@@ -57,10 +57,10 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View, ...@@ -57,10 +57,10 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View,
if (!isClick) { if (!isClick) {
isClick = true isClick = true
if (data.special == 1) { if (data.special == 1) {
EventUtils.onEvent("attendance_task_ordinary_click") EventUtils.onEvent("daka_hongbao_click")
mPresenter?.getFlyBoxReceive(this) mPresenter?.getFlyBoxReceive(this)
} else if (data.special == 2) { } else if (data.special == 2) {
EventUtils.onEvent("attendance_task_withdraw_click") EventUtils.onEvent("daka_tixian_click")
mPresenter?.getDoWd(data.id!!) mPresenter?.getDoWd(data.id!!)
} }
......
...@@ -39,7 +39,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -39,7 +39,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
} }
override fun init() { override fun init() {
EventUtils.onEvent("welfare_show") EventUtils.onEvent("fuli_show")
mPresenter = WelfarePresenter(this) mPresenter = WelfarePresenter(this)
iv_welfare_close?.setOnClickListener { iv_welfare_close?.setOnClickListener {
finish() finish()
...@@ -107,11 +107,10 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -107,11 +107,10 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
//0未完成 1已领取 2可领取 //0未完成 1已领取 2可领取
when (data.status) { when (data.status) {
0 -> { 0 -> {
EventUtils.onEvent("welfare_task_undone_click_${data.sid}") EventUtils.onEvent("fuli_go_click_${data.sid}")
if (data.opentype == NewsEntity.AD_TYPE_SDK) { if (data.opentype == NewsEntity.AD_TYPE_SDK) {
if (data.sid != null) { if (data.sid != null) {
showAd(data.sid!!) showAd(data.sid!!)
EventUtils.onEvent("welfare_task_undone_click_total")
} }
} else { } else {
JumpUtils.adJump(data, this) JumpUtils.adJump(data, this)
...@@ -124,7 +123,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -124,7 +123,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
if (data.opentype == NewsEntity.AD_TYPE_SDK) { if (data.opentype == NewsEntity.AD_TYPE_SDK) {
EventUtils.onEvent("welfare_task_done_click_total") EventUtils.onEvent("welfare_task_done_click_total")
} }
EventUtils.onEvent("welfare_task_done_click_${data.sid}") EventUtils.onEvent("fuli_done_click_${data.sid}")
if (data.sid != null) { if (data.sid != null) {
mPresenter?.getTaskReceiveList(data?.sid!!) mPresenter?.getTaskReceiveList(data?.sid!!)
} }
......
...@@ -22,7 +22,7 @@ class WxLoginActivity : BaseActivity(), WxImplUtils.IWxLoginCallback { ...@@ -22,7 +22,7 @@ class WxLoginActivity : BaseActivity(), WxImplUtils.IWxLoginCallback {
} }
override fun init() { override fun init() {
onEvent("tab_imp", "登录页") onEvent("login_show", "登录页")
if (SettingPreference.getIsShowGuide()) { if (SettingPreference.getIsShowGuide()) {
SettingPreference.setIsShowGuide(false) SettingPreference.setIsShowGuide(false)
} }
...@@ -108,7 +108,7 @@ class WxLoginActivity : BaseActivity(), WxImplUtils.IWxLoginCallback { ...@@ -108,7 +108,7 @@ class WxLoginActivity : BaseActivity(), WxImplUtils.IWxLoginCallback {
} }
override fun onWxSuccess(token: String?, openid: String?) { override fun onWxSuccess(token: String?, openid: String?) {
onEvent("login_wx", "登录成功") onEvent("login_success", "登录成功")
startActivity( startActivity(
Intent(this@WxLoginActivity, GameActivity::class.java) Intent(this@WxLoginActivity, GameActivity::class.java)
) )
......
...@@ -46,7 +46,7 @@ class WateringTaskAdpater : ...@@ -46,7 +46,7 @@ class WateringTaskAdpater :
} }
override fun getItemCount(): Int { override fun getItemCount(): Int {
return 10 return mList.size
} }
override fun onBindViewHolder(holder: WateringTaskHolder, position: Int) { override fun onBindViewHolder(holder: WateringTaskHolder, position: Int) {
...@@ -57,7 +57,7 @@ class WateringTaskAdpater : ...@@ -57,7 +57,7 @@ class WateringTaskAdpater :
holder.tvCount.text = "+${data?.awardRangeStart}~${data?.awardRangeEnd}" holder.tvCount.text = "+${data?.awardRangeStart}~${data?.awardRangeEnd}"
} else { } else {
holder.tvCount.text = "+${data.coins} " holder.tvCount.text = "+${data.coins}"
} }
if (data?.adRenderStyle != null && data?.adRenderStyle == 1) { if (data?.adRenderStyle != null && data?.adRenderStyle == 1) {
...@@ -100,7 +100,7 @@ class WateringTaskAdpater : ...@@ -100,7 +100,7 @@ class WateringTaskAdpater :
isClick = true isClick = true
when (data.status) { when (data.status) {
0 ->{ 0 ->{
EventUtils.onEvent("renwu_undone_click_"+mList[position].sid, "金币任务去完成点击") EventUtils.onEvent("renwu_go_click_"+mList[position].sid, "金币任务去完成点击")
listener.onItemClick(it, position, mList[position]) listener.onItemClick(it, position, mList[position])
} }
1 -> { 1 -> {
......
...@@ -126,7 +126,7 @@ object MainDialog { ...@@ -126,7 +126,7 @@ object MainDialog {
) )
val ivGetDropBg = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_bg) val ivGetDropBg = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_bg)
val ivtitle = mDialogView?.findViewById<ImageView>(R.id.id_img_title) // val ivtitle = mDialogView?.findViewById<ImageView>(R.id.id_img_title)
val tvGetDropCount = mDialogView?.findViewById<TextView>(R.id.tv_get_drop_count) val tvGetDropCount = mDialogView?.findViewById<TextView>(R.id.tv_get_drop_count)
val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_ad) val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_ad)
val llcontent2 = mDialogView?.findViewById<LinearLayout>(R.id.id_ll_content_2) val llcontent2 = mDialogView?.findViewById<LinearLayout>(R.id.id_ll_content_2)
...@@ -139,8 +139,9 @@ object MainDialog { ...@@ -139,8 +139,9 @@ object MainDialog {
//3 种子 4 金币 5 加速剂 //3 种子 4 金币 5 加速剂
when (type) { when (type) {
3 -> { 3 -> {
tvget.text = "恭喜获得"
//tvget.text = "恭喜获得种子" //tvget.text = "恭喜获得种子"
ivtitle.setImageResource(R.mipmap.icon_img_title_get_zhongzi) // ivtitle.setImageResource(R.mipmap.icon_img_title_get_zhongzi)
llcontent2.visibility = View.GONE llcontent2.visibility = View.GONE
llcontent3.visibility = View.GONE llcontent3.visibility = View.GONE
if (list?.seedList?.size == 1) { if (list?.seedList?.size == 1) {
...@@ -166,14 +167,14 @@ object MainDialog { ...@@ -166,14 +167,14 @@ object MainDialog {
} }
4 -> { 4 -> {
ivtitle.setImageResource(R.mipmap.icon_img_title_get_coin_) // ivtitle.setImageResource(R.mipmap.icon_img_title_get_coin_)
// tvget.text = "恭喜获得金币" tvget.text = "恭喜获得金币"
ivGetDropBg.setImageResource(R.mipmap.icon_coin) ivGetDropBg.setImageResource(R.mipmap.icon_coin)
tvGetDropCount.text = "+${rewardCount}" tvGetDropCount.text = "+${rewardCount}"
} }
5 -> { 5 -> {
//tvget.text = "恭喜获得加速剂" tvget.text = "恭喜获得加速剂"
ivtitle.setImageResource(R.mipmap.icon_img_title_get_speed_water) // ivtitle.setImageResource(R.mipmap.icon_img_title_get_speed_water)
ivGetDropBg.setImageResource(R.mipmap.icon_speed_water) ivGetDropBg.setImageResource(R.mipmap.icon_speed_water)
tvGetDropCount.text = "+${rewardCount}" tvGetDropCount.text = "+${rewardCount}"
} }
...@@ -458,10 +459,11 @@ object MainDialog { ...@@ -458,10 +459,11 @@ object MainDialog {
when (status) { when (status) {
1 -> { 1 -> {
EventUtils.onEvent("tixian_success_show")
// imgtitle.setImageResource(R.mipmap.img_duihuan_success) // imgtitle.setImageResource(R.mipmap.img_duihuan_success)
imggoon.setImageResource(R.drawable.icon_dialog_zuanqian) imggoon.setImageResource(R.drawable.icon_dialog_zuanqian)
if (type == 1) { if (type == 1) {
EventUtils.onEvent("show_xinshou0.3", "新手0.3") EventUtils.onEvent("xinshou0.3_success_show")
} else if (type == 4) { } else if (type == 4) {
EventUtils.onEvent("show_fuli0.3", "福利0.3") EventUtils.onEvent("show_fuli0.3", "福利0.3")
} else if (type == 7) { } else if (type == 7) {
...@@ -514,6 +516,10 @@ object MainDialog { ...@@ -514,6 +516,10 @@ object MainDialog {
} }
if (status != 1) {
EventUtils.onEvent("tixian_fail_show")
}
// imggoon.addClickScale() // imggoon.addClickScale()
FilterUtils.addClickAlpha(imggoon) FilterUtils.addClickAlpha(imggoon)
imggoon.setOnClickListener { imggoon.setOnClickListener {
......
...@@ -24,7 +24,7 @@ import com.ym.msdh.game.utils.CenterDialog ...@@ -24,7 +24,7 @@ import com.ym.msdh.game.utils.CenterDialog
object OrderDialog { object OrderDialog {
fun show(activity: Activity,result: OrderEntity?) { fun show(activity: Activity,result: OrderEntity?) {
if (activity == null || result == null) return if (activity == null || result == null) return
EventUtils.onEvent("show_order_dialog", "订单弹窗曝光") EventUtils.onEvent("dingdan_show", "订单弹窗曝光")
var mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme75) var mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme75)
val mDialogView = val mDialogView =
CenterDialog.showBottomDialog( CenterDialog.showBottomDialog(
......
...@@ -51,6 +51,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View, ...@@ -51,6 +51,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
fun init(mContext: Activity?, mListener: IDialogViewCloseCallback) { fun init(mContext: Activity?, mListener: IDialogViewCloseCallback) {
this.mListener = mListener this.mListener = mListener
this.mContext = mContext this.mContext = mContext
EventUtils.onEvent("renwu_show")
RxBusUtil.getDefault().register(this) RxBusUtil.getDefault().register(this)
mPresenter = WateringRewardPresenter(this) mPresenter = WateringRewardPresenter(this)
view = LayoutInflater.from(mContext).inflate(R.layout.layout_popup_drops, null) view = LayoutInflater.from(mContext).inflate(R.layout.layout_popup_drops, null)
...@@ -90,7 +91,6 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View, ...@@ -90,7 +91,6 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
// 0未完成 1已领取 2可领取 // 0未完成 1已领取 2可领取
when (data.status) { when (data.status) {
0 -> { 0 -> {
// 跳转页面 1转盘 2高额水滴任务 3首页 4激励视频 直客任务链接" // 跳转页面 1转盘 2高额水滴任务 3首页 4激励视频 直客任务链接"
// if() // if()
// appmodel_id // appmodel_id
...@@ -114,7 +114,6 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View, ...@@ -114,7 +114,6 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
if (data?.sid != null) { if (data?.sid != null) {
// EventUtils.onEvent("welfare_task_undone_click", "${data.sid}") // EventUtils.onEvent("welfare_task_undone_click", "${data.sid}")
showAd(data.sid!!) showAd(data.sid!!)
EventUtils.onEvent("renwu_undone_click_total")
} else { } else {
JumpUtils.adJump(data, mContext) JumpUtils.adJump(data, mContext)
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_one" android:id="@+id/ll_one"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="92dp" android:layout_height="@dimen/dp_76"
android:background="@drawable/icon_luck_task"> android:background="@drawable/icon_luck_task">
<TextView <TextView
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -21,9 +21,9 @@ public class Constant { ...@@ -21,9 +21,9 @@ public class Constant {
// public static final String WX_APPID = "wx4d3a3aa6fb634c17";//1.0.0版本使用的微信appid // public static final String WX_APPID = "wx4d3a3aa6fb634c17";//1.0.0版本使用的微信appid
// public static final String WX_APPKEY = "7c98910f81dc3cec4b992d722bdcbaf3";//1.0.0版本使用的微信key // public static final String WX_APPKEY = "7c98910f81dc3cec4b992d722bdcbaf3";//1.0.0版本使用的微信key
public static String WX_APPID = "wxe7a03eb52cce1b51"; public static String WX_APPID = "wxadbdfbe9626a66ba";
// public static String WX_APPID = "wxcd4157d1e36f5cd8"; // public static String WX_APPID = "wxcd4157d1e36f5cd8";
public static String WX_APPKEY = "6fa72a89ea188c4dff5729cff328b587"; public static String WX_APPKEY = "bcf303b49a2aac831d0d152fb974b254";
public static String WX_SHARE_APPID = "34fd25bb46e96eb3de04bd0c0e031e22"; public static String WX_SHARE_APPID = "34fd25bb46e96eb3de04bd0c0e031e22";
public static String WX_SHARE_APPKEY = "34fd25bb46e96eb3de04bd0c0e031e22"; public static String WX_SHARE_APPKEY = "34fd25bb46e96eb3de04bd0c0e031e22";
public static final String SHANYAN_KEY = "7QciptTf"; public static final String SHANYAN_KEY = "7QciptTf";
......
...@@ -19,7 +19,7 @@ class WithdrawEntity { ...@@ -19,7 +19,7 @@ class WithdrawEntity {
var title: String? = "" var title: String? = ""
var desc: String? = "" var desc: String? = ""
var ifUse: Int = 0 //代表提过现了 var ifUse: Int = 0 //代表提过现了
var type: Int = 0 var type: Int = 0 // "1 新人提现 2 打卡提现 3大额提现 4 福利专享 5 订单提现"
var reason: String? = "" var reason: String? = ""
var time: String = "" var time: String = ""
var wdAmount: Double? = 0.0 var wdAmount: Double? = 0.0
......
...@@ -56,6 +56,11 @@ object AdUtils { ...@@ -56,6 +56,11 @@ object AdUtils {
override fun onAdShow() { override fun onAdShow() {
Utils.showToast(activity, "看完视频可获得奖励") Utils.showToast(activity, "看完视频可获得奖励")
handler?.sendEmptyMessageDelayed(0, 2000) handler?.sendEmptyMessageDelayed(0, 2000)
if (actionName.equals("home_task")) {
EventUtils.onEvent("renwu_video_show")
} else if(actionName.equals("welfare_task")) {
EventUtils.onEvent("fuli_video_show")
}
} }
override fun onAdVideoBarClick() { override fun onAdVideoBarClick() {
......
...@@ -6,6 +6,7 @@ import android.graphics.Color ...@@ -6,6 +6,7 @@ import android.graphics.Color
import android.graphics.PorterDuff import android.graphics.PorterDuff
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.text.Html import android.text.Html
import android.util.Log
import android.view.Gravity import android.view.Gravity
import android.view.MotionEvent import android.view.MotionEvent
import android.view.View import android.view.View
...@@ -13,6 +14,7 @@ import android.view.ViewGroup ...@@ -13,6 +14,7 @@ import android.view.ViewGroup
import android.widget.* import android.widget.*
import com.ym.library.R import com.ym.library.R
import com.ym.library.base.BaseDialog import com.ym.library.base.BaseDialog
import com.ym.library.module.WithdrawEntity
object GameDialog : BaseDialog() { object GameDialog : BaseDialog() {
...@@ -154,8 +156,8 @@ object GameDialog : BaseDialog() { ...@@ -154,8 +156,8 @@ object GameDialog : BaseDialog() {
val tv_speed_up_num = mDialogView?.findViewById<TextView>(R.id.tv_speed_up_num) val tv_speed_up_num = mDialogView?.findViewById<TextView>(R.id.tv_speed_up_num)
val btn_speed_up_btn = mDialogView?.findViewById<ImageView>(R.id.btn_speed_up_btn) val btn_speed_up_btn = mDialogView?.findViewById<ImageView>(R.id.btn_speed_up_btn)
val layout_ad = mDialogView?.findViewById<FrameLayout>(R.id.layout_ad) val layout_ad = mDialogView?.findViewById<FrameLayout>(R.id.layout_ad)
tv_speed_up_time.text="所有土地获得${time}分钟加速" tv_speed_up_time.text = "所有土地获得${time}分钟加速"
tv_speed_up_num.text="今天还剩${num}次" tv_speed_up_num.text = "今天还剩${num}次"
btn_speed_up_btn.setOnClickListener { btn_speed_up_btn.setOnClickListener {
listener.onClick(it) listener.onClick(it)
mDialog?.dismiss() mDialog?.dismiss()
...@@ -399,7 +401,7 @@ object GameDialog : BaseDialog() { ...@@ -399,7 +401,7 @@ object GameDialog : BaseDialog() {
/** /**
* 店铺损坏 * 店铺损坏
*/ */
fun showShopDamage(activity: Activity, type: String, listener: View.OnClickListener) { fun showShopDamage(activity: Activity, type: Int, listener: View.OnClickListener) {
if (activity == null) return if (activity == null) return
val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme) val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme)
val mDialogView = val mDialogView =
...@@ -414,8 +416,11 @@ object GameDialog : BaseDialog() { ...@@ -414,8 +416,11 @@ object GameDialog : BaseDialog() {
val layout_dialog_root = val layout_dialog_root =
mDialogView.findViewById<LinearLayout>(R.id.layout_dialog_shop_damage_root) mDialogView.findViewById<LinearLayout>(R.id.layout_dialog_shop_damage_root)
val btn_shop_damage_ad = mDialogView.findViewById<ImageView>(R.id.btn_shop_damage_ad) val btn_shop_damage_ad = mDialogView.findViewById<ImageView>(R.id.btn_shop_damage_ad)
val iv_shop_damage_img_reward =
mDialogView.findViewById<ImageView>(R.id.iv_shop_damage_img_reward)
val iv_diamoind_close = mDialogView.findViewById<ImageView>(R.id.iv_shop_damage_close) val iv_diamoind_close = mDialogView.findViewById<ImageView>(R.id.iv_shop_damage_close)
val layout_ad = mDialogView?.findViewById<FrameLayout>(R.id.layout_ad) val layout_ad = mDialogView?.findViewById<FrameLayout>(R.id.layout_ad)
setSunHuaiImg(iv_shop_damage_img_reward, type)
btn_shop_damage_ad.setOnClickListener { btn_shop_damage_ad.setOnClickListener {
listener.onClick(it) listener.onClick(it)
...@@ -433,7 +438,7 @@ object GameDialog : BaseDialog() { ...@@ -433,7 +438,7 @@ object GameDialog : BaseDialog() {
mDialog?.show() mDialog?.show()
} }
AdUtils.showFeedAd(activity, "", layout_ad) AdUtils.showFeedAd(activity, "shop_damage", layout_ad)
layout_ad?.postDelayed({ layout_ad?.postDelayed({
layout_ad.visibility = View.VISIBLE layout_ad.visibility = View.VISIBLE
if (layout_ad?.visibility == View.VISIBLE) { if (layout_ad?.visibility == View.VISIBLE) {
...@@ -442,6 +447,19 @@ object GameDialog : BaseDialog() { ...@@ -442,6 +447,19 @@ object GameDialog : BaseDialog() {
}, 500) }, 500)
} }
private fun setSunHuaiImg(view: ImageView, type: Int) {
when (type) {
1 -> view.setImageResource(R.drawable.icon_sunhuai1)
2 -> view.setImageResource(R.drawable.icon_sunhuai2)
3 -> view.setImageResource(R.drawable.icon_sunhuai3)
4 -> view.setImageResource(R.drawable.icon_sunhuai4)
5 -> view.setImageResource(R.drawable.icon_sunhuai5)
6 -> view.setImageResource(R.drawable.icon_sunhuai6)
7 -> view.setImageResource(R.drawable.icon_sunhuai7)
8 -> view.setImageResource(R.drawable.icon_sunhuai8)
}
}
/** /**
* 恭喜获得现金 * 恭喜获得现金
*/ */
...@@ -498,7 +516,7 @@ object GameDialog : BaseDialog() { ...@@ -498,7 +516,7 @@ object GameDialog : BaseDialog() {
/** /**
* 金币不足 * 金币不足
*/ */
fun showGoldInadequate(activity: Activity,listener: View.OnClickListener) { fun showGoldInadequate(activity: Activity, listener: View.OnClickListener) {
if (activity == null) return if (activity == null) return
val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme) val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme)
val mDialogView = val mDialogView =
...@@ -549,8 +567,9 @@ object GameDialog : BaseDialog() { ...@@ -549,8 +567,9 @@ object GameDialog : BaseDialog() {
/** /**
* 加速器 * 加速器
*/ */
fun showAccelerator(activity: Activity,getnum:Int,num:Int,listener: View.OnClickListener) { fun showAccelerator(activity: Activity, getnum: Int, num: Int, listener: View.OnClickListener) {
if (activity == null) return if (activity == null) return
EventUtils.onEvent("jiasu_show")
val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme) val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme)
val mDialogView = val mDialogView =
showBottomDialog( showBottomDialog(
...@@ -568,7 +587,7 @@ object GameDialog : BaseDialog() { ...@@ -568,7 +587,7 @@ object GameDialog : BaseDialog() {
val tv_get_num = mDialogView.findViewById<TextView>(R.id.tv_get_num) val tv_get_num = mDialogView.findViewById<TextView>(R.id.tv_get_num)
val iv_accelerator_close = mDialogView.findViewById<ImageView>(R.id.iv_accelerator_close) val iv_accelerator_close = mDialogView.findViewById<ImageView>(R.id.iv_accelerator_close)
val layout_ad = mDialogView?.findViewById<FrameLayout>(R.id.layout_ad) val layout_ad = mDialogView?.findViewById<FrameLayout>(R.id.layout_ad)
tv_get_num.text="+${getnum}" tv_get_num.text = "+${getnum}"
tv_accelerator_num.text = "今天剩余${num}次" tv_accelerator_num.text = "今天剩余${num}次"
btn_accelerator_btn.setOnClickListener { btn_accelerator_btn.setOnClickListener {
...@@ -581,10 +600,6 @@ object GameDialog : BaseDialog() { ...@@ -581,10 +600,6 @@ object GameDialog : BaseDialog() {
} }
mDialog?.setOnDismissListener {
}
FilterUtils.addClickAlpha(btn_accelerator_btn) FilterUtils.addClickAlpha(btn_accelerator_btn)
mDialog.setCanceledOnTouchOutside(false) mDialog.setCanceledOnTouchOutside(false)
...@@ -602,5 +617,76 @@ object GameDialog : BaseDialog() { ...@@ -602,5 +617,76 @@ object GameDialog : BaseDialog() {
}, 500) }, 500)
} }
/**
* 提现结果
*/
fun showWithdrawalResult(activity: Activity, result: WithdrawEntity) {
if (activity == null) return
val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme)
val mDialogView =
showBottomDialog(
R.layout.dialog_layout_withdrawal_result,
activity,
mDialog,
0,
Gravity.CENTER
)
val tv_withdraw_title = mDialogView?.findViewById<TextView>(R.id.tv_withdraw_title)
val tvcashcontent = mDialogView?.findViewById<TextView>(R.id.id_tv_cash_content)
val btm_wihdraw_status = mDialogView?.findViewById<ImageView>(R.id.btm_wihdraw_status)
val id_img_dialog_close = mDialogView?.findViewById<ImageView>(R.id.id_img_dialog_close)
tv_withdraw_title.text = result?.title
tvcashcontent.text = result?.reason
id_img_dialog_close?.setOnClickListener {
mDialog?.dismiss()
}
btm_wihdraw_status?.setOnClickListener {
mDialog?.dismiss()
}
when (result?.status) {
1, 5, 6 -> {
btm_wihdraw_status.setImageResource(R.drawable.icon_dialog_zuanqian)
if (result?.status == 1) {
when (result?.type) {
1 -> {
EventUtils.onEvent("xinshou0.3_success_show")
}
2 -> {
EventUtils.onEvent("daka0.3_success_show")
}
3 -> {
EventUtils.onEvent("dae0.3_success_show")
}
4 -> {
EventUtils.onEvent("fuli0.3_success_show")
}
5 -> {
EventUtils.onEvent("dingdai0.3_success_show")
}
}
}
}
2, 4 -> {
btm_wihdraw_status.setImageResource(R.drawable.icon_dialog_lingzhuanshi)
}
3 -> {
btm_wihdraw_status.setImageResource(R.drawable.icon_dialog_iknow)
}
}
FilterUtils.addClickAlpha(btm_wihdraw_status)
mDialog.setCanceledOnTouchOutside(false)
mDialog.setCancelable(false)
if (!activity?.isFinishing) {
mDialog?.show()
}
}
} }
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
android:layout_below="@+id/tv_get_box_info" android:layout_below="@+id/tv_get_box_info"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:src="@drawable/icon_coin" /> android:src="@drawable/icon_dialog_get_box" />
<ImageView <ImageView
android:id="@+id/btn_get_box_btn" android:id="@+id/btn_get_box_btn"
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="72dp" android:layout_marginTop="72dp"
android:includeFontPadding="false" android:includeFontPadding="false"
android:text="领金币任务,幸运抽奖可获得金币" android:text="完成任务可获得大量金币"
android:textColor="#095100" android:textColor="#095100"
android:textSize="17sp" /> android:textSize="17sp" />
......
...@@ -28,19 +28,31 @@ ...@@ -28,19 +28,31 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="22sp" /> android:textSize="22sp" />
<ImageView <FrameLayout
android:id="@+id/iv_shop_damage_img_reward" android:id="@+id/layout_shop_damage_img_reward"
android:layout_width="97dp" android:layout_width="wrap_content"
android:layout_height="88dp" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="61dp" android:layout_marginTop="61dp">
android:src="@drawable/icon_coin" />
<ImageView
android:id="@+id/iv_shop_damage_img_reward"
android:layout_width="97dp"
android:layout_height="88dp"
android:src="@drawable/icon_sunhuai1" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/icon_suspend_business" />
</FrameLayout>
<com.ym.library.widget.FontTextView <com.ym.library.widget.FontTextView
android:id="@+id/tv_shop_damage_reward" android:id="@+id/tv_shop_damage_reward"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/iv_shop_damage_img_reward" android:layout_below="@+id/layout_shop_damage_img_reward"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:text="维修店铺,恢复生产" android:text="维修店铺,恢复生产"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:gravity="center"
android:orientation="vertical">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="328dp"
android:layout_height="274dp"
android:layout_marginTop="6dp"
android:layout_marginRight="5dp"
android:background="@drawable/icon_base_dialog_bg">
<com.ym.library.widget.FontTextView
android:id="@+id/tv_withdraw_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="6dp"
android:textColor="@color/white"
android:textSize="22sp" />
<TextView
android:id="@+id/id_tv_cash_content"
tools:text="每天只能提现1次哦,您今天已经 提现过了,明天再提现吧~"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="40dp"
android:layout_marginTop="97dp"
android:layout_marginRight="40dp"
android:gravity="center"
android:includeFontPadding="false"
android:lineSpacingExtra="5dp"
android:textColor="#095100"
android:textSize="17sp"
android:visibility="visible" />
<ImageView
android:id="@+id/btm_wihdraw_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="30dp"
android:src="@drawable/icon_dialog_iknow" />
</RelativeLayout>
<ImageView
android:id="@+id/id_img_dialog_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:src="@drawable/icon_base_dialog_close" />
</FrameLayout>
</LinearLayout>
\ No newline at end of file
...@@ -26,7 +26,7 @@ class SettingActivity : BaseActivity() { ...@@ -26,7 +26,7 @@ class SettingActivity : BaseActivity() {
private var adView: Any? = null private var adView: Any? = null
override fun init() { override fun init() {
EventUtils.onEvent("show_setting", "设置页面曝光") EventUtils.onEvent("setting_on", "设置页面曝光")
adView = null adView = null
val linearParams: LinearLayout.LayoutParams = val linearParams: LinearLayout.LayoutParams =
id_rl_setting_toolbar.getLayoutParams() as LinearLayout.LayoutParams id_rl_setting_toolbar.getLayoutParams() as LinearLayout.LayoutParams
......
package com.ym.userinfo.module.activity package com.ym.userinfo.module.activity
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.Dialog
import android.content.Intent import android.content.Intent
import android.text.Html import android.text.Html
import android.util.Log import android.util.Log
...@@ -56,6 +57,7 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener, ...@@ -56,6 +57,7 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
override fun init() { override fun init() {
EventUtils.onEvent("tixian_show")
mPresenter = UserPresenter(this) mPresenter = UserPresenter(this)
initView() initView()
initData() initData()
...@@ -156,6 +158,7 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener, ...@@ -156,6 +158,7 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
when (p0?.id) { when (p0?.id) {
// 设置 // 设置
R.id.iv_user_setting -> { R.id.iv_user_setting -> {
EventUtils.onEvent("setting_click")
JumpUtils.jumpSettingActivity() JumpUtils.jumpSettingActivity()
} }
//兑换金币 //兑换金币
...@@ -172,7 +175,7 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener, ...@@ -172,7 +175,7 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
if (mWithdrawNum == 0.0) { if (mWithdrawNum == 0.0) {
mWithdrawNum = 0.3 mWithdrawNum = 0.3
} }
EventUtils.onEvent("user_withdraw_btn_click", "立即提现按钮点击") EventUtils.onEvent("tixian_btn_click", "立即提现按钮点击")
// mPresenter?.requestIsWxBind() // mPresenter?.requestIsWxBind()
if (mData?.ifUse == 1 || mData2?.ifUse == 1) { if (mData?.ifUse == 1 || mData2?.ifUse == 1) {
Toast.makeText(this@UserInfoActivity, "已提现", Toast.LENGTH_SHORT).show() Toast.makeText(this@UserInfoActivity, "已提现", Toast.LENGTH_SHORT).show()
...@@ -327,11 +330,12 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener, ...@@ -327,11 +330,12 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
request() request()
// UserDialog.showWirhdrawSuccess(this, mRemainGuessNum?.toString(), data) // UserDialog.showWirhdrawSuccess(this, mRemainGuessNum?.toString(), data)
GameDialog.showWithdrawalResult(this,data)
if (data?.status == 1) { if (data?.status == 1) {
//成功 //成功
EventUtils.onEvent("withdraw_success", "提现成功") EventUtils.onEvent("tixian_success_show", "提现成功")
} else { } else {
EventUtils.onEvent("withdraw_fail", "提现失败") EventUtils.onEvent("tixian_fail_show", "提现失败")
} }
} }
......
...@@ -61,10 +61,10 @@ ...@@ -61,10 +61,10 @@
android:id="@+id/id_tv_id" android:id="@+id/id_tv_id"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:includeFontPadding="false"
android:paddingLeft="17dp" android:paddingLeft="17dp"
android:paddingTop="19dp"
android:paddingRight="16dp" android:paddingRight="16dp"
android:paddingBottom="20dp"
android:text="ID:1234567" android:text="ID:1234567"
android:textColor="#663408" android:textColor="#663408"
android:textSize="16sp" /> android:textSize="16sp" />
......
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