Commit 779d8f68 authored by mengcuiguang's avatar mengcuiguang

代码合并

parents 9b833f06 22f94188
......@@ -158,10 +158,6 @@ public class MintsApplication extends MultiDexApplication {
// 自定义logger
bindLogger();
// YyzManager.INSTANCE.initYyz(this);
// 子线程初始化三方SDK
String processName = SystemUtils.INSTANCE.getProcessName(this, android.os.Process.myPid());
if (processName != null) {
......
......@@ -105,7 +105,7 @@ class MhVideoAdManager private constructor(activity: Activity) :
override fun onADError(p0: Int) {
LogUtil.d(TAG, "onADError->$p0")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_ONE, (p0).toString(), "")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_ONE, (p0).toString(), "onADError")
videoAdStatusListener?.adFail()
}
......
......@@ -65,6 +65,7 @@ public class VideoAdingManager {
// 是否是高额视频任务
private boolean isHighWeight = false;
private boolean isTTVideoAd = false;
private int highIndex = 0;//0-穿山甲 1-优量汇 2-快手
private Activity activity;
private boolean isVideoAdDownload = false;// 是否点击广告下载 true-点击
......@@ -237,12 +238,28 @@ public class VideoAdingManager {
* @return _
*/
private String getHighWeight() {
isTTVideoAd = !isTTVideoAd;
if (isTTVideoAd) {
return Constant.CSJ_VEDIO_AD;
} else {
return Constant.YLH_VEDIO_AD;
// isTTVideoAd = !isTTVideoAd;
// if (isTTVideoAd) {
// return Constant.CSJ_VEDIO_AD;
// } else {
// return Constant.YLH_VEDIO_AD;
// }
String adType = "";
switch (highIndex) {
case 0:
highIndex = 1;
adType = Constant.CSJ_VEDIO_AD;
break;
case 1:
highIndex = 2;
adType = Constant.YLH_VEDIO_AD;
break;
case 2:
highIndex = 0;
adType = Constant.KS_VEDIO_AD;
break;
}
return adType;
}
/**
......@@ -363,7 +380,7 @@ public class VideoAdingManager {
flVideoAdCount <= 0 &&
tzVideoAdCount <= 0 &&
csjFullVideoAdCount <= 0 &&
ksVideoAdCount <= 0 ) {
ksVideoAdCount <= 0) {
// showToast("今日视频已看完,请明天再来吧");
return true;
}
......@@ -773,6 +790,7 @@ public class VideoAdingManager {
}
}
}
private String getCode(String adtype) {
String code = "g";
switch (adtype) {
......
......@@ -9,8 +9,10 @@ import com.mints.goodmoney.MintsApplication
object YyzManager {
private const val KEY = "37e179d05b23b0a"
private const val APPID = "550"
fun initYyz(appActivity: Application) {
//当用户登陆了且权限具备了后执行初始化操作
AdManager.getInstance(appActivity).init(appActivity, APPID, UserManager.getInstance().userID, KEY, object : CommonCallBack<Any?> {
......
......@@ -231,7 +231,6 @@ class HomePresenter : BasePresenter<HomeView>() {
}
override fun onError(e: Throwable) {
e.printStackTrace().toString()
if (isLinkView) return
}
......
......@@ -106,13 +106,13 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
item_wechat.findViewById<TextView>(R.id.tv_right).text = "未授权"
}
item_invitedCode.findViewById<TextView>(R.id.tv_title).text = "邀请码"
item_invitedCode.findViewById<TextView>(R.id.tv_title).text = "用户ID"
val invitedCode = ContextCompat.getDrawable(mContext, R.mipmap.icon_settings_invite)
invitedCode?.setBounds(0, 0, 56, 56)
item_invitedCode.findViewById<TextView>(R.id.tv_title).setCompoundDrawables(invitedCode, null, null, null)
item_invitedCode.findViewById<TextView>(R.id.tv_right).visibility = View.VISIBLE
item_invitedCode.findViewById<ImageView>(R.id.iv_right).visibility = View.GONE
item_invitedCode.findViewById<TextView>(R.id.tv_right).text = UserManager.getInstance().codeID
item_invitedCode.findViewById<TextView>(R.id.tv_right).text = "GM-" + UserManager.getInstance().codeID
item_cleanCache.findViewById<TextView>(R.id.tv_title).text = "清理缓存"
val cleanCache = ContextCompat.getDrawable(this, R.mipmap.icon_settings_clean)
......
......@@ -87,6 +87,9 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
private var mRedBoxCoin = 0
private var mRedBoxCoinDouble = 0
// 公众号弹窗 true-显示
private var gzhDialogFlag = true
override fun getContentViewLayoutID() = R.layout.fragment_main_first
override fun initViewsAndEvents() {
......@@ -325,7 +328,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
*/
private fun GzhDialogShow(data: UserTaskMsgBean) {
//用户 第二天打开应用并且非重新下载安装
if (data.isShowWechatTips && !ps.getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) {
if (data.isShowWechatTips && !ps.getBoolean(Constant.LOAN_PERMISSION_FLAG, true) && gzhDialogFlag) {
gzhDialogFlag = false
gzhDialog()
//服务器交互,做回调 //弹窗打开传入1
homePresenter.setWechatTipsStatus(Constant.STATUS_CODE_ONE)
......
......@@ -127,7 +127,6 @@ class MyFragment : BaseFragment(),
initManager()
initView()
initRecy()
readyGo(WxLoginActivity::class.java)
}
......
......@@ -24,6 +24,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp"
android:text="请关注公众号:金币宝箱,获取更多赚钱资讯" />
android:text="请关注公众号:淘金空间,获取更多赚钱资讯" />
</merge>
\ No newline at end of file
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