Commit b5b9547c authored by mengcuiguang2's avatar mengcuiguang2

优化权限弹窗,修改新人红包,修改余额提现

parent 11910e77
......@@ -98,7 +98,9 @@ public class FullGroManager {
*/
// mTTFullVideoAd = new TTFullVideoAd(activity, CsjGroMoreManager.INSTANCE.getAPP_IN_COMMON_AD_UNIT_INTERSTITIAL_ID());
mTTFullVideoAd = new TTFullVideoAd(activity, fullId);
// mTTFullVideoAd = new TTFullVideoAd(activity, "946369785");
//声音控制 模板 2.0
// TTVideoOption videoOption = VideoOptionUtil.getTTVideoOption();
TTVideoOption videoOption = VideoOptionUtil.getTTVideoOption2();
//创建广告请求参数AdSlot,具体参数含义参考文档
......
......@@ -2,9 +2,6 @@ package com.mints.flowbox.ad.wifi
import android.app.Activity
import com.mints.flowbox.ad.full.FullGroManager
import com.mints.flowbox.ad.inscreen.InterstitialGroManager
import com.mints.flowbox.common.Constant
import java.util.*
/**
* wifi广告管理
......@@ -22,28 +19,28 @@ class WifiAdManager private constructor() {
private var wifiAdStatusListener: WifiAdStatusListener? = null
// groMore插屏
private var interstitialGroManager: InterstitialGroManager? = null
// private var interstitialGroManager: InterstitialGroManager? = null
// groMore全屏
private var fullGroManager: FullGroManager? = null
// 当前广告类型
private var currentAdType = ""
// private var currentAdType = ""
/**
* 预加载广告,必须传入activity
*/
fun loadWifiAd(activity: Activity) {
currentAdType = getCurrentAdType()
when (currentAdType) {
Constant.GROMORE_INSERTSCREEN_AD -> {
preLoadInterstitialGroMore(activity)
}
Constant.GROMORE_FULL_AD -> {
preLoadFullGroMore(activity, true)
}
}
// currentAdType = getCurrentAdType()
//
// when (currentAdType) {
// Constant.GROMORE_INSERTSCREEN_AD -> {
// preLoadInterstitialGroMore(activity)
// }
// Constant.GROMORE_FULL_AD -> {
// preLoadFullGroMore(activity,true)
// }
// }
preLoadFullGroMore(activity, true)
}
......@@ -51,7 +48,7 @@ class WifiAdManager private constructor() {
/**
* 定义广告类型规则
*/
private fun getCurrentAdType(): String {
// private fun getCurrentAdType(): String {
// var tempAdType = ""
// val randomInt = Random().nextInt(10)
// if (randomInt % 2 == 0) {
......@@ -61,19 +58,19 @@ class WifiAdManager private constructor() {
// }
//
// return tempAdType
return Constant.GROMORE_INSERTSCREEN_AD
}
// return Constant.GROMORE_FULL_AD
// }
/**
* 插屏
*/
private fun preLoadInterstitialGroMore(activity: Activity) {
if (interstitialGroManager != null) {
interstitialGroManager?.onDestroy()
}
interstitialGroManager = InterstitialGroManager()
interstitialGroManager?.loadInsertScreenAd(activity, false,2)
}
// private fun preLoadInterstitialGroMore(activity: Activity) {
// if (interstitialGroManager != null) {
// interstitialGroManager?.onDestroy()
// }
// interstitialGroManager = InterstitialGroManager()
// interstitialGroManager?.loadInsertScreenAd(activity, false)
// }
/**
* 全屏
......@@ -91,61 +88,61 @@ class WifiAdManager private constructor() {
* 展示广告
*/
fun showInterstitial() {
when (currentAdType) {
Constant.GROMORE_INSERTSCREEN_AD -> {
interstitialGroManager?.setWifiAdStatusListener(object : WifiAdStatusListener {
override fun adSuccess() {
}
override fun adFail() {
}
override fun adClose() {
wifiAdStatusListener?.adClose()
}
})
interstitialGroManager?.showInteractionAd()
}
Constant.GROMORE_FULL_AD -> {
// when (currentAdType) {
//// Constant.GROMORE_INSERTSCREEN_AD -> {
//// interstitialGroManager?.setWifiAdStatusListener(object : WifiAdStatusListener {
//// override fun adSuccess() {
////
//// }
////
//// override fun adFail() {
////
//// }
////
//// override fun adClose() {
//// wifiAdStatusListener?.adClose()
//// }
//// })
//// interstitialGroManager?.showInteractionAd()
//// }
// Constant.GROMORE_FULL_AD -> {
fullGroManager?.setWifiAdStatusListener(wifiAdStatusListener)
fullGroManager?.showFullAd()
}
}
// }
// }
}
/**
* 展示广告
*/
fun showInterstitial(_activity: Activity) {
when (currentAdType) {
Constant.GROMORE_INSERTSCREEN_AD -> {
interstitialGroManager?.setWifiAdStatusListener(object : WifiAdStatusListener {
override fun adSuccess() {
}
override fun adFail() {
}
override fun adClose() {
wifiAdStatusListener?.adClose()
}
})
interstitialGroManager?.showInteractionAd(_activity)
}
Constant.GROMORE_FULL_AD -> {
fullGroManager?.showFullAd(_activity, wifiAdStatusListener)
}
}
// when (currentAdType) {
// Constant.GROMORE_INSERTSCREEN_AD -> {
// interstitialGroManager?.setWifiAdStatusListener(object : WifiAdStatusListener {
// override fun adSuccess() {
//
// }
//
// override fun adFail() {
//
// }
//
// override fun adClose() {
// wifiAdStatusListener?.adClose()
// }
// })
// interstitialGroManager?.showInteractionAd(_activity)
// }
// Constant.GROMORE_FULL_AD -> {
fullGroManager?.showFullAd(_activity,wifiAdStatusListener)
// }
// }
}
fun onDestroy() {
interstitialGroManager?.onDestroy()
interstitialGroManager?.setWifiAdStatusListener(null)
interstitialGroManager = null
// interstitialGroManager?.onDestroy()
// interstitialGroManager?.setWifiAdStatusListener(null)
// interstitialGroManager = null
fullGroManager?.onDestroy()
fullGroManager = null
......
......@@ -13,18 +13,18 @@ public class DrawcashBean implements Serializable {
private double maxCashout;
private int vedioComplete;
private String remark;
private String surplus;
private double surplus;
private List<CashOutMoneyArrBean> cashOutMoneyArr;
private VedioRules vedioRules;
private boolean isJDNewUser;
private boolean openJDCash = true;
private String JDUrl = null;
public String getSurplus() {
public double getSurplus() {
return surplus;
}
public void setSurplus(String surplus) {
public void setSurplus(double surplus) {
this.surplus = surplus;
}
......
......@@ -141,8 +141,8 @@ class DrawcashActivity : BaseActivity(),
R.id.tvDrawcashNext -> {
if (priceList != null && priceList!!.size > 0) {
// 校验当前金币< 选择金币 =提示 去做任务
if (userConfig?.coin!! < priceList!![drawcashAdapter.getPosition()].money * 10000) {
showToast("金币不足,快去做任务吧")
if (userConfig?.surplus!! < priceList!![drawcashAdapter.getPosition()].money) {
showToast("余额不足,快去做任务吧")
return
}
......@@ -187,7 +187,7 @@ class DrawcashActivity : BaseActivity(),
tvDrawcashExplain.text = data.drawcashRule
tvDrawcashHint.text = data.drawcashHint
tvDrawcashGold.text = SpanUtils()
.append(data.surplus)
.append(data.surplus.toString())
.setFontSize(BubbleUtils.sp2px(36))
.append(" 元")
.create()
......
......@@ -96,6 +96,8 @@ class MyFragment : BaseFragment(),
initManager()
initView()
initRecy()
showFirstGive()
}
override fun onHiddenChanged(hidden: Boolean) {
......@@ -925,4 +927,33 @@ class MyFragment : BaseFragment(),
override fun onRefresh() {
onResume()
}
private fun showFirstGive() {
// 新人福利
// 游客首次提示1500新人奖励 且 不是分享包
val channel = CommonUtils.getAppMetaData(
MintsApplication.getContext(),
"CHANNEL_NAME"
)
if (!TextUtils.equals(
channel,
Constant.CHANNEL_SHARE
) && AppPreferencesManager.get().getBoolean(
Constant.FIRST_VISITOR_FLAG,
true
)
) {
AppPreferencesManager.get().put(Constant.FIRST_VISITOR_FLAG, false)
val bundle = Bundle()
bundle.putInt(
Constant.MAIN_CUR_COIN,
AppConfig.firstGiveCoin
)
bundle.putString(
Constant.MAIN_CARRIER_TYPE,
Constant.CARRIER_NEW_VISITOR
)
readyGo(AwardActivity::class.java, bundle)
}
}
}
\ No newline at end of file
......@@ -198,10 +198,10 @@
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
android:background="@color/color_ccc"
android:background="@color/white"
android:gravity="center"
android:text="不同意"
android:textColor="@color/white" />
android:textColor="@color/color_ccc" />
</LinearLayout>
</LinearLayout>
......
......@@ -16,8 +16,8 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryErro
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#DEBUG_URL="http://39.97.65.143:9082/fb-api/"
DEBUG_URL="https://api.mints-id.com/fb-api/"
DEBUG_URL="http://39.97.65.143:9082/fb-api/"
#DEBUG_URL="https://api.mints-id.com/fb-api/"
RELEASE_URL="https://api.mints-id.com/fb-api/"
RELEASE_KEY_PASSWORD=mints.flowbox
......
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