Commit b5b9547c authored by mengcuiguang2's avatar mengcuiguang2

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

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