Commit afa4a2a3 authored by mengcuiguang's avatar mengcuiguang

显示广告

parent 226515d1
......@@ -10,8 +10,8 @@ android {
applicationId "com.mints.highgold"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 1
versionName "1.0.0"
versionCode 2
versionName "1.0.1"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -151,10 +151,10 @@ public class MintsApplication extends MultiDexApplication {
ForegroundOrBackground.init(this);
// 猎豹游戏初始化
// LiebaoManager.getInstance().initCmGameSdk();
LiebaoManager.getInstance().initCmGameSdk();
// 积分初始化
// initGold(this);
initGold(this);
// 初始化ShareSDK
MobSDK.init(this);
......@@ -170,7 +170,7 @@ public class MintsApplication extends MultiDexApplication {
//穿山甲SDK初始化
//强烈建议在应用对应的Application#onCreate()方法中调用,避免出现content为null的异常
// TTAdManagerHolder.init(this);
TTAdManagerHolder.init(this);
// 极光推送
BindJpush();
......@@ -179,7 +179,7 @@ public class MintsApplication extends MultiDexApplication {
// initBaiduVedio();
// 一览视频
// initYL();
initYL();
// 鱼丸盒子
// if (UserManager.getInstance().userIsLogin()) {
......@@ -226,13 +226,13 @@ public class MintsApplication extends MultiDexApplication {
@Override
public void onSuccess() {
AppConfig.lyAdSdkInitState = true;
// System.out.println("lyAd success");
System.out.println("lyAd success");
}
@Override
public void onFailed(int code) {
AppConfig.lyAdSdkInitState = false;
// System.out.println("lyAd fail" + code);
System.out.println("lyAd fail" + code);
}
});
}
......@@ -361,7 +361,7 @@ public class MintsApplication extends MultiDexApplication {
.setCrashOpen(false)
.setApplication(this)
.setAccessKey("yleoq95t1aro")
.setAccessToken("m8de8rdyqiulcymymijh32pgq9pxgh9xZ")
.setAccessToken("m8de8rdyqiulcymymijh32pgq9pxgh9x")
.build();
//页面个性化配置
......
......@@ -94,18 +94,21 @@ public class CsjFullVedioAdManager implements LyVedioAdManagerView {
case Constant.CARRIER_OFFLINE_DOUBLE:// 离线收益翻倍
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_OFFLINE_DOUBLE;
break;
case Constant.CARRIER_DRINK_PATCH:// 喝水补卡
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_DRINK_PATCH;
break;
case Constant.CARRIER_VERSUS_DRINKTEA://喝饮料
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_VERSUS_DRINKTEA;
break;
// case Constant.CARRIER_DRINK_PATCH:// 喝水补卡
// codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_DRINK_PATCH;
// break;
// case Constant.CARRIER_VERSUS_DRINKTEA://喝饮料
// codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_VERSUS_DRINKTEA;
// break;
case Constant.CARRIER_CHALLENGE_TURN:// 挑战大转盘
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_CHALLENGE_TURN;
break;
case Constant.CARRIER_CHALLENGE_CARD:// 挑战刮刮乐
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_CHALLENGE_CARD;
break;
default: // 激励视频异常或其他 时使用
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_EXCEPTION;
break;
}
AdSlot adSlot = new AdSlot.Builder()
......
......@@ -122,9 +122,9 @@ public class CsjVedioAdManager implements LyVedioAdManagerView {
case Constant.CARRIER_DRINK_PATCH:// 喝水补卡
codeId = TTAdManagerHolder.TT_AD_VEDIO_DRINK;
break;
case Constant.CARRIER_VERSUS_DRINKTEA://喝饮料
codeId = TTAdManagerHolder.TT_AD_VEDIO_DRINKTEA;
break;
// case Constant.CARRIER_VERSUS_DRINKTEA://喝饮料
// codeId = TTAdManagerHolder.TT_AD_VEDIO_DRINKTEA;
// break;
case Constant.CARRIER_DAILY_TURN:// 首页大转盘
codeId = TTAdManagerHolder.TT_AD_VEDIO_TURNABLE;
break;
......
......@@ -47,7 +47,7 @@ public class VedioAdingManager {
}
private VedioAdingManager(Activity activity) {
// init(activity);
init(activity);
return;
}
......
......@@ -22,7 +22,7 @@ public class AlipayManager {
/**
* 用于支付宝支付业务的入参 app_id。
*/
public static final String APPID = "2019102968695736";
public static final String APPID = "2021001154641144";
/**
* 用于支付宝账户登录授权业务的入参 pid。
......@@ -39,7 +39,7 @@ public class AlipayManager {
* 建议使用支付宝提供的公私钥生成工具生成和获取 RSA2_PRIVATE。
* 工具地址:https://doc.open.alipay.com/docs/doc.htm?treeId=291&articleId=106097&docType=1
*/
public static final String RSA2_PRIVATE = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCJHd23TboBNcNcb55AFP7VS5goNa9dmVFhvzLJnk/Whz6HRP1pWZ7ty7dw8rsqctmVRvkTMgVdrXJ0GTI6eI7wRARVfTQLVaePtJO0r2Hw2am2p3uMCBvsm7/n3hd7sg1wV/qkKCAgbT7xSv+kpz183oM/eFMTbghyJBmaRfMRE13E95HwkbFLFyrdPP54pF3mRd6spWFhRiQlPsUk+zItcw08PYrjFi6M0pM/RWahm0+/fniTk2hIXS3HGGod/UxnJKpBW0n9/aj/ktONtBZ0ftF1C+oJC0QIO+gIJy9M7WxYq/DjBZM+W/+nFHN7/pWhvQcnvF8vUhUSFRTmmoq5AgMBAAECggEAdmQ2S46uW1sbmxW5U2WNf4ftElMAX1YBgd/AL3wlPXu7TrsP/8XlRzfN5ZWAbC+MlasZZyyam38mwv36c6gi62wfPd2EcYD81EU8ABgq/fZC5raII6ngypTUx5TpO+HKXsVoYhNPYhBR97AlOfs5STcrpkLzoGQyoLNw89cQAB4sKVIv2m7ZYbxCn2w/2N0IAU3xdiZQayLWt60pyofISCqhw0PBRO0UqvLJpkZFyC8Z1ho4OrYT1sH2364TapPXGrjYDPlBXN60nqBR0fgq7K7VHhXya/Uem31cJE7lk8pL0EobW+BI+nwlHd4hM9+B/+HykG/QSA980MGwFK0RMQKBgQDbDEhkdJ7uXVtbB24aLb0tEZB20zp/AkIdjnjhWZAh12avMh9Px5h2ZR2m66eeyu3ZJ4o3qoSdTbKftzDr3pFCp+ShA2BAmJFLMv46y6wVafMDGZ/6amqJA9mnzEBwwbzFOfPEEWqBK/xt8Ez56/qT+J2OlSoR+itC+rvUd25O9QKBgQCgP1SraolnFYmYAFbE5BT+DUplVon790iZ7vy20qUd4ZiibxZJ8Wu3NHZd84krQrhwO12TUexCNvMTkTNcPgqBphjOEHxeFJxT5QPQGUt+Yk71hr5EIOc66HY2ZnoCo/bOXh1deXv1q8zI+YQoRUoWpU83IGNrqxfzaM9mwpAqNQKBgQCtwyyaI7j/tacGqvo4YhgzbD+BQ0agAhaYg7B4cyfW8JxQVh5olxjmsoe3JjEt0iSjoq4OQoI4lq4f7J4uPbxVeAHxiFAObfi0ApuR4Id95TIVP3qcl1Yzoo5CgdCMoeMxQSuSWY53MYFpZLprdzqrrwitVr6szBsNYwElJiinEQKBgEH+kvIdaATqG8ZbrWBcxkByXMcrQpxgFKhAghcQ3StXMzMCKN2+7SuAEZdTqpQEYEzoRftb677BPo46aDp+2njWXLTQmUdtmYv7bvyOzkZ4WihHm6gXHONnxPdWcL0RpZ0LqXBLjb95R1clW0XyczasUdlUH13CEpUN/wxE6HZZAoGAI22RzJbLgSDO0+uvt946/aQJ8Fs9cq+tRc16AeIzxP8jePtHbKPBdgufgEK68psKCXbP2KzBJHxc4y+Ht7cv3q2duEf0Ky2HNI+RVOOBkbxPFls9krBIR0KFZK0Dq/qaYNTuno+YuEG8VCnELfsAST6vnizIth+1xEow5JINprA=";
public static final String RSA2_PRIVATE = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCKgMOkimaqy0VItuRI8p5JHAZTMuZ3L0V34l4EWuALOPwEd6i2stH8/VyZ7yAosLO6mdFERxbkJHec96kKRIoF/M1INcMuc3vNUGLzPXRI1eBVHNVcP2Ajn9AofXxwH7SCAZSVU84guElI8c7J/z0cVrpmRGeNr1CCGHGuuQLlOG2Se4heelPhCm9ONDx37MBmgMOPS/YWVfIYrOv1hJdUQCmjqqbYBL+1y4tZ6agXJfC58FKxhkxGd8QDG4pqZmJqkKBXdim8JuAxkKQvn2UScdHf/Ba9ETzKU6YSx8/b7cbjQeHaTDcHB8REuEdyslOvG4iF4RkDdJT6bbYl+IwrAgMBAAECggEAL7NXLhUIdOwbCYcLql/8ybsgJolSPFwIddh9fsx5ewP+L9+yOHHvxkzQFqf3kGwDClItc3F0XdB9bY8SJdojGxrM7ICvnxDg4347BgD1Spx2bXnHtcSR7NL+kuNc9xTESz4WGTPKuxQdEUVObd09A8SO3+fRLkfh11xp0r4fVCgO4VWO9v1ioTDClOlSRIRWOmm6l9Q5iBfhriG2DBcdlR9J+DdUipAqyXgljubhyfrzGBxHTUp137igytsagRCjBsT3TzVnI5JK7kG8qXEmMlHlt/3wJLjMFjjrpDAXVWhOJhY96BseqMm4mNP5LLAVDDBUJJpEtrD3BZr5CoOrMQKBgQDaHcNfjqsWwWpnsEpx2bfGwBzRQzFnCYvbk09RJI8moyXvQNhpHx440ZJ86gmuMP7IsolYxEtbZIOV63AjLSGMiEre26e75Qo4gaeXQMFOvY/JeZ8ICHD4QaA+TRaAh8Di9IMlzGIdhNJFF2lGodhcWElFmiDGrYRCaTDW1H1QiQKBgQCijxtxnBjxfRcLN0rDcLrklzoGw2O15IVKQGnLnJovsCyCo905D9n6jMP77SRlAMOkE1dUvErRX14qQ8S0AubDlas1f7MugcUZvGbSnzQb5SnN8cthIbPea/6AkIknQH1gza3BdeXCIYlyIKIVTaT30uMW0vP4Lb8UMPeQwhaCEwKBgQCCaOk3aQXCRUJpXG4mRBYtLxALzjDrejm0vw7dZQ5x+3ni4tKBh6l6L1N2fDftfj3XoWedO0ATFLXYHTyey40TiSm6tXpETV0fC+Y3+O+bNJuTyrPbCbEBvbshhNW/Y2tgRvFi2CCRpahSxvyazomeLOsiQlT2dShuzJX23HVQgQKBgC4LQOe+IiaMmvFXWPrgvF8xIoN15pFHyCVO92hv1BB74y+hwHCAN+rK4lxCQFPHkqKvw8XBi6OgUqjAB0BBriFqDFOb9yHOKgjvH2S7KWRZVaz6tvOtOyheCHlb9y1CDAFWYMfyYADLxQWpjp9gHcEAX8hAOlBqjLvoXscG4p83AoGBALDPcGtUn6AoQ7ZBEYu/agWT8RMIzMP4c73NNWw1OfPBd27Zh2iMNSY0e47dEd/uaPVGHhdWCUlYqAvuuWUfBymsfIH+/od/J4JPYVxp4VN4RrBj3v0GLGPQFWTwSsoOWs5YnKv+JY/i23f5o/BS0kqwYo8lO2Y44xlm67xhabsw";
public static final String RSA_PRIVATE = "";
private static final int SDK_AUTH_FLAG = 2;
......
......@@ -25,12 +25,12 @@ public class LiebaoManager {
/**
* APP_ID
*/
public static final String APP_ID = "taojinkongjian";
public static final String APP_ID = "taojinkongjiangaoeban";
/**
* APP_HOST
*/
public static final String APP_HOST = "https://tjkj-xyx-big-svc.beike.cn";
public static final String APP_HOST = "https://tjkjgeb-xyx-big-svc.beike.cn";
private static LiebaoManager _inst;
private Context context;
......
......@@ -12,54 +12,51 @@ import com.mints.highgold.BuildConfig;
*/
public class TTAdManagerHolder {
public static final String TT_AD_APPID = "5038593";
public static final String TT_AD_NAME = "淘金空间";
public static final String TT_AD_APPID = "5060006";
public static final String TT_AD_NAME = "淘金空间高额版";
/*开屏*/
public static final String TT_AD_SPLASH_ID = "838593986";//开屏
public static final String TT_AD_SPLASH_ID = "887315187";//开屏
/*激励视频*/
public static final String TT_AD_VEDIO_MAIN_DEV = "938593319";// 开发使用
public static final String TT_AD_VEDIO_MAIN_DOWNLOAD = "938593158";//首页点一点
public static final String TT_AD_VEDIO_MAIN_LOOK = "938593832";//首页看视频
public static final String TT_AD_VEDIO_DRINK = "938593477";//喝水打卡
public static final String TT_AD_VEDIO_MAIN_2 = "941212842";// 挑战前两项活动使用(首页2)
public static final String TT_AD_VEDIO_ERASE = "943509180";// 刮刮乐
public static final String TT_AD_VEDIO_TURNABLE = "943509178";// 挑战大转盘
public static final String TT_AD_VEDIO_GAME = "938593412";// 游戏
public static final String TT_AD_VEDIO_DRINKTEA = "945018852";// 元气大作战
public static final String TT_AD_VEDIO_MOREDIALOG = "945018855";// 签到、气泡、离线弹框
public static final String TT_AD_VEDIO_REDBOX = "945027623";// 红包
public static final String TT_AD_VEDIO_MAIN_DEV = "945131812";// 开发使用
public static final String TT_AD_VEDIO_MAIN_DOWNLOAD = "945131817";//首页点一点
public static final String TT_AD_VEDIO_MAIN_LOOK = "945131816";//首页看视频
public static final String TT_AD_VEDIO_DRINK = "945131819";//喝水打卡
public static final String TT_AD_VEDIO_MAIN_2 = "945131807";// 挑战前两项活动使用(首页2)
public static final String TT_AD_VEDIO_ERASE = "945131797";// 刮刮乐
public static final String TT_AD_VEDIO_TURNABLE = "945131803";// 挑战大转盘
public static final String TT_AD_VEDIO_GAME = "945131810";// 游戏
public static final String TT_AD_VEDIO_MOREDIALOG = "945131792";// 签到、气泡、离线弹框
public static final String TT_AD_VEDIO_REDBOX = "945131786";// 红包
/*banner*/
public static final String TT_AD_BANNER_ID_DRAWCASH = "938593660";//提现
public static final String TT_AD_BANNER_ID_GOLDTRY = "938593033";//金币兑换
public static final String TT_AD_BANNER_ID_MY = "938593439";//我的
public static final String TT_AD_BANNER_ID_NEWMAIN = "944254790";//首页
public static final String TT_AD_BANNER_ID_DRAWCASH_RECORD = "938593215";//提现明细
public static final String TT_AD_BANNER_ID_TRYGOLD_RECORD = "938593137";//金币明细
public static final String TT_AD_BANNER_ID_INCOME_RECORD = "938593415";//收入明细
public static final String TT_AD_BANNER_ID_DRINK = "938593240";//喝水打卡 *弃用 改用信息流
public static final String TT_AD_BANNER_ID_VERSUS = "938593007";//挑战活动
public static final String TT_AD_BANNER_ID_DIALOG = "938593321";//弹窗 *弃用 改用信息流
public static final String TT_AD_BANNER_ID_DRAWCASH = "945131766";//提现
public static final String TT_AD_BANNER_ID_MY = "945131765";//我的
public static final String TT_AD_BANNER_ID_DRAWCASH_RECORD = "945131768";//提现明细
public static final String TT_AD_BANNER_ID_TRYGOLD_RECORD = "";//金币明细
public static final String TT_AD_BANNER_ID_INCOME_RECORD = "";//收入明细
public static final String TT_AD_BANNER_ID_DRINK = "";//喝水打卡 *弃用 改用信息流
public static final String TT_AD_BANNER_ID_VERSUS = "";//挑战活动
public static final String TT_AD_BANNER_ID_DIALOG = "";//弹窗 *弃用 改用信息流
/*信息流*/
public static final String TT_AD_NATIVEEXPRESS_ID_DIALOG = "944255310";//信息流弹窗
public static final String TT_AD_NATIVEEXPRESS_ID_LIEBAO_LISTEXIT = "945018886";//猎豹列表和退出
public static final String TT_AD_NATIVEEXPRESS_ID_DIALOG = "945131750";//信息流弹窗
public static final String TT_AD_NATIVEEXPRESS_ID_LIEBAO_LISTEXIT = "945131730";//猎豹列表和退出
/*全屏广告*/
public static final String TT_AD_ALLVEDIO_ID_LIEBAO = "945019833";//猎豹全屏带跳过按钮
public static final String TT_AD_ALLVEDIO_ID_OFFLINE_DOUBLE = "945042793";//全屏离线收益翻倍
public static final String TT_AD_ALLVEDIO_ID_DRINK_PATCH = "945042795";//全屏喝水补卡
public static final String TT_AD_ALLVEDIO_ID_VERSUS_DRINKTEA = "945042796";//全屏喝饮料
public static final String TT_AD_ALLVEDIO_ID_CHALLENGE_TURN = "945042798";//全屏挑战大转盘
public static final String TT_AD_ALLVEDIO_ID_CHALLENGE_CARD = "945042800";//全屏挑战刮刮乐
public static final String TT_AD_ALLVEDIO_ID_EXCEPTION = "945043463";//激励视频异常或其他 时使用
public static final String TT_AD_ALLVEDIO_ID_LIEBAO = "945131838";//猎豹全屏带跳过按钮
public static final String TT_AD_ALLVEDIO_ID_OFFLINE_DOUBLE = "945131837";//全屏离线收益翻倍
public static final String TT_AD_ALLVEDIO_ID_DRINK_PATCH = "";//全屏喝水补卡
public static final String TT_AD_ALLVEDIO_ID_VERSUS_DRINKTEA = "";//全屏喝饮料
public static final String TT_AD_ALLVEDIO_ID_CHALLENGE_TURN = "945131834";//全屏挑战大转盘
public static final String TT_AD_ALLVEDIO_ID_CHALLENGE_CARD = "945131833";//全屏挑战刮刮乐
public static final String TT_AD_ALLVEDIO_ID_EXCEPTION = "945131829";//激励视频异常或其他 时使用
/*插屏广告*/
public static final String TT_AD_INSERT_ID_LIEBAO = "945040482";//猎豹插屏场景
public static final String TT_AD_INSERT_LOADING_ID_LIEBAO = "945040479";//猎豹游戏加载时
public static final String TT_AD_INSERT_ID_LIEBAO = "945131770";//猎豹插屏场景
public static final String TT_AD_INSERT_LOADING_ID_LIEBAO = "945131772";//猎豹游戏加载时
private static boolean sInit;
......
......@@ -9,7 +9,7 @@ package com.mints.highgold.manager;
public class YlhAdManager {
/* 优量汇appid */
public static final String YLH_AD_VEDIO_APPID= "1110058445";
public static final String YLH_AD_VEDIO_APPID= "1110341375";
/* vedio-postid */
public static final String YLH_AD_VEDIO_MAIN_PAN_POSTID = "3030498514212299";//首页大转盘
......
......@@ -117,7 +117,7 @@ public class LoanPresenter extends BasePresenter<LoanView> {
} else {
view.getUserTaskMsgSuc(baseResponse.getData());
getWaterMsgHome();
// getGameList();
getGameList();
}
break;
case 401:
......@@ -267,7 +267,7 @@ public class LoanPresenter extends BasePresenter<LoanView> {
// } else {
// vo.put("isShowYwhzGame", false);
// }
vo.put("isShowYwhzGame", true);
vo.put("isShowYwhzGame", false);
AppHttpManager.getInstance(loanApplication)
.call(loanService.getGameList(vo),
......
......@@ -122,7 +122,7 @@ public class MyPresenter extends BasePresenter<MyView> {
// } else {
// vo.put("isShowYwhzGame", false);
// }
vo.put("isShowYwhzGame", true);
vo.put("isShowYwhzGame", false);
AppHttpManager.getInstance(loanApplication)
.call(loanService.myHotActivity(vo),
new BaseSubscriber<BaseResponse<BannerBean>>() {
......
......@@ -5,6 +5,7 @@ import android.text.TextUtils;
import com.google.gson.Gson;
import com.mints.highgold.BuildConfig;
import com.mints.highgold.MintsApplication;
import com.mints.highgold.common.Constant;
import com.mints.highgold.manager.UserManager;
import com.mints.highgold.mvp.model.AppRequest;
import com.mints.highgold.utils.AESUtils;
......@@ -51,6 +52,7 @@ public class OkHttpInterceptor implements Interceptor {
addHeader("version", BuildConfig.VERSION_NAME).
addHeader("token", tokenID).
addHeader("channel", channel).
addHeader("pkg", Constant.MINTS_PKG_NAME).
addHeader("new-session", MD5.GetMD5Code(String.valueOf(time))).
addHeader("last-session", Base64.encode(String.valueOf(time).getBytes("UTF-8"))).
build();
......
......@@ -139,7 +139,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
@Override
protected void initViewsAndEvents() {
// initExpress();
initExpress();
awardPresenter = new AwardPresenter();
awardPresenter.attachView(this);
......@@ -218,7 +218,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
try {
// TTPreLoadExpressManager.getInstance().loadTtFrameLayout(getContext());
TTPreLoadExpressManager.getInstance().loadTtFrameLayout(getContext());
} catch (Exception e) {
e.printStackTrace();
}
......@@ -554,7 +554,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
break;
case Constant.CARRIER_ONLINE_INCOME_DOUBLE:// 在线收益翻倍
tvAwardContent.setText("在线收益奖励" + curCoin + "金币");
tvAwardNext.setText("金币翻倍");
tvAwardNext.setText("领取金币");
break;
case Constant.CARRIER_OFFLINE_DOUBLE:// 离线收益翻倍
tvAwardContent.setText("离线收益奖励" + curCoin + "金币");
......@@ -573,10 +573,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
llAwardBg.setBackground(getResources().getDrawable(R.mipmap.bg_award_gold));
// tvAwardNext.setText("我知道了");
break;
case Constant.CARRIER_REDENVELOPE_DOUBLE:// 首页红包翻倍
tvAwardContent.setText("红包奖励" + curCoin + "金币");
tvAwardNext.setText("金币翻倍");
break;
case Constant.CARRIER_SIGNIN_HOMEPAGE_CARD:// 签到翻倍
tvAwardContent.setText("签到奖励" + curCoin + "金币");
tvAwardNext.setText("金币翻倍");
......@@ -605,6 +601,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
case Constant.CARRIER_CHALLENGE_TURN:// 挑战大转盘
case Constant.CARRIER_CHALLENGE_CARD:// 挑战刮刮乐
case Constant.CARRIER_REDENVELOPE:// 红包点击领取
case Constant.CARRIER_REDENVELOPE_DOUBLE:// 首页红包翻倍
tvAwardContent.setText("点击领取" + curCoin + "金币");
tvAwardNext.setText("领取金币");
break;
......@@ -933,9 +930,9 @@ public class AwardActivity extends BaseActivity implements AwardView {
case Constant.CARRIER_DRINK_PATCH:// 喝水补卡
codeId = TTAdManagerHolder.TT_AD_VEDIO_DRINK;
break;
case Constant.CARRIER_VERSUS_DRINKTEA://喝饮料
codeId = TTAdManagerHolder.TT_AD_VEDIO_DRINKTEA;
break;
// case Constant.CARRIER_VERSUS_DRINKTEA://喝饮料
// codeId = TTAdManagerHolder.TT_AD_VEDIO_DRINKTEA;
// break;
case Constant.CARRIER_DAILY_TURN:// 首页大转盘
codeId = TTAdManagerHolder.TT_AD_VEDIO_TURNABLE;
break;
......@@ -1075,18 +1072,21 @@ public class AwardActivity extends BaseActivity implements AwardView {
case Constant.CARRIER_OFFLINE_DOUBLE:// 离线收益翻倍
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_OFFLINE_DOUBLE;
break;
case Constant.CARRIER_DRINK_PATCH:// 喝水补卡
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_DRINK_PATCH;
break;
case Constant.CARRIER_VERSUS_DRINKTEA://喝饮料
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_VERSUS_DRINKTEA;
break;
// case Constant.CARRIER_DRINK_PATCH:// 喝水补卡
// codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_DRINK_PATCH;
// break;
// case Constant.CARRIER_VERSUS_DRINKTEA://喝饮料
// codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_VERSUS_DRINKTEA;
// break;
case Constant.CARRIER_CHALLENGE_TURN:// 挑战大转盘
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_CHALLENGE_TURN;
break;
case Constant.CARRIER_CHALLENGE_CARD:// 挑战刮刮乐
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_CHALLENGE_CARD;
break;
default: // 激励视频异常或其他 时使用
codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_EXCEPTION;
break;
}
AdSlot adSlot = new AdSlot.Builder()
......
......@@ -55,8 +55,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
Button btnDrawcashFour;
@Bind(R.id.btn_drawcash_five)
Button btnDrawcashFive;
@Bind(R.id.btn_drawcash_six)
Button btnDrawcashSix;
@Bind(R.id.tv_drawcash_hint)
TextView tvDrawcashHint;
@Bind(R.id.rl_drawcash_alipay)
......@@ -92,7 +90,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
UserTaskMsgBean userConfig = null;
private boolean cashOut1yuan = false;//true-提现过1元
private boolean cashOut2yuan = false;//true-提现过2元
private boolean cashOut5yuan = false;//true-提现过5元
private String paymentType = "weixin";
private WXInfo wxInfo = null;
......@@ -122,7 +119,7 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
// 加载banner广告
//应用商店上线隐藏广告
if (userManager.getAdShowFlag()) {
// initTTBanner();
initTTBanner();
}
}
......@@ -177,7 +174,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
userConfig = data;
cashOut1yuan = data.isCashOut1yuan();
cashOut2yuan = data.isCashOut2yuan();
cashOut5yuan = data.isCashOut5yuan();
drawcash = data.getDrawcash();
......@@ -210,28 +206,9 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
// 微信为默认支付方式
// paymentType = "weixin";
// ivDrawcashWeixin.setImageResource(R.mipmap.ic_drawcash_wx_enable);
// ivDrawcashAlipay.setImageResource(R.mipmap.ic_drawcash_alipay_none);
// tvDrawcashPaytype.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.mipmap.ic_weixin), null, null, null);
// tvDrawcashPaytype.setText("微信");
if (TextUtils.equals(paymentType, "weixin")) {
if (TextUtils.isEmpty(data.getWxOpenid())) {
// if (!TextUtils.isEmpty(data.getAlipayAccount())) {
// // 支付宝授权
// paymentType = "alipay";
// ivDrawcashWeixin.setImageResource(R.mipmap.ic_drawcash_wx_none);
// ivDrawcashAlipay.setImageResource(R.mipmap.ic_drawcash_alipay_enable);
// tvDrawcashPaytype.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.mipmap.ic_alipay), null, null, null);
// tvDrawcashPaytype.setText("支付宝");
// } else {
// tvDrawcashSet.setText("去授权");
//
// }
tvDrawcashSet.setText("去授权");
} else {
tvDrawcashSet.setText("已授权");
}
......@@ -257,13 +234,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
tvDrawcashWxnotify.setVisibility(View.VISIBLE);
tvDrawcashWxnotify.setText(data.getMsg());
}
// tvDrawcashExplain.setText("提现说明:" +
// "\n1、所有提现金额【无门槛】直接提现!!新用户提现秒到账!" +
// "\n2、由于提现需要实名制,非实名用户账号无法支持提现,请务必使用实名认证过的账号提现!并确保账号挣钱,如不慎填错,可前往【账户设置】重新填写支付宝账号。" +
// "\n3、单笔提现金额最低1.0元,最高100元。" +
// "\n4、提现申请将在1-3个工作日审核到账,请耐心等待。" +
// "\n5、每日可申请提现一次,若当日限额已满,请次日申请。" +
// "\n6、1元、2元提现是新人专享福利,每个账号仅可享受一次。");
tvDrawcashHint.setText("* 如您或好友通过刷机等违规操作获取非法收益,平台将视情况扣除违规所得或冻结账号。" +
"\n* 最终解释权归本公司所有。");
......@@ -292,10 +262,11 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
drawcashPresenter.getUserTaskMsg();
}
@OnClick({R.id.tv_activity_back, R.id.btn_drawcash_one, R.id.btn_drawcash_two, R.id.btn_drawcash_five,
R.id.btn_drawcash_six, R.id.iv_drawcash_weixin, R.id.iv_drawcash_alipay,
R.id.btn_drawcash_three, R.id.btn_drawcash_four, R.id.tv_drawcash_set, R.id.btn_drawcash_next,
R.id.tv_drawcash_record, R.id.rl_drawcash_alipay, R.id.tv_drawcash_explain})
@OnClick({R.id.tv_activity_back, R.id.btn_drawcash_one, R.id.btn_drawcash_two,
R.id.btn_drawcash_five,R.id.iv_drawcash_weixin, R.id.iv_drawcash_alipay,
R.id.btn_drawcash_three, R.id.btn_drawcash_four, R.id.tv_drawcash_set,
R.id.btn_drawcash_next,R.id.tv_drawcash_record, R.id.rl_drawcash_alipay,
R.id.tv_drawcash_explain})
public void onClick(View view) {
switch (view.getId()) {
case R.id.tv_activity_back:
......@@ -424,15 +395,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
curCash = 500;
clickFive(curCash);
break;
case R.id.btn_drawcash_six:
if (userConfig == null) {
showToast("网络异常,请检测网络");
drawcashPresenter.getUserTaskMsg();
return;
}
curCash = 1000;
clickSix(curCash);
break;
case R.id.btn_drawcash_next:
if (userConfig == null) {
showToast("网络异常,请检测网络");
......@@ -506,7 +468,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:" + (drawcash * 10000));
}
......@@ -521,7 +482,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:1000000");
}
......@@ -542,7 +502,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_enable));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:1500000");
}
......@@ -563,7 +522,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_enable));
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:2000000");
......@@ -585,53 +543,10 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_enable));
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:5000000");
}
private void clickSix(double cash) {
if (cashOut1yuan) {
// 提现过一元,显示灰
btnDrawcashOne.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
} else {
btnDrawcashOne.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
}
if (cashOut2yuan) {
// 提现过一元,显示灰
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
} else {
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
}
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_enable));
btnDrawcashHint.setText("所需金币:10000000");
}
private void clickSeven(double cash) {
if (cashOut1yuan) {
// 提现过一元,显示灰
btnDrawcashOne.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
} else {
btnDrawcashOne.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
}
if (cashOut2yuan) {
// 提现过一元,显示灰
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
} else {
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
}
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:10000000");
}
private void initBtnStyle() {
btnDrawcashOne.setText(new SpanUtils()
.append(drawcash + "元").setForegroundColor(getResources().getColor(R.color.product_text))
......@@ -658,11 +573,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
.append("\n")
.append("约5000000金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.create());
btnDrawcashSix.setText(new SpanUtils()
.append("1000元").setForegroundColor(getResources().getColor(R.color.product_text))
.append("\n")
.append("约10000000金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.create());
tvDrawcashExplain.setText(new SpanUtils()
.append("100元").setForegroundColor(getResources().getColor(R.color.product_text))
......
......@@ -62,7 +62,7 @@ public class DrawcashRecordActivity extends BaseActivity implements DrawcashReco
drawcashRecordPresenter.attachView(this);
if (UserManager.getInstance().getAdShowFlag()) {
// initTTBanner();
initTTBanner();
}
// crlDrawcashrecordRefresh.setPrimaryColorsId(android.R.color.holo_red_dark, android.R.color.white);
......
......@@ -132,7 +132,9 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
break;
case R.id.share_qq:
QQ.ShareParams sp = new QQ.ShareParams();
// Platform.ShareParams sp = new Platform.ShareParams();
// sp.setImageUrl("https://mints-gs.oss-cn-beijing.aliyuncs.com/pkg/mints_share/%E5%88%86%E4%BA%AB%E9%A1%B5%E5%A4%87%E4%BB%BD-QQ.png");
// sp.setShareType(Platform.SHARE_IMAGE);
sp.setTitle(share_title);
sp.setTitleUrl(shareUrl); // 标题的超链接
sp.setText(share_text);
......
......@@ -352,22 +352,22 @@ public class LoginActivity extends BaseActivity implements LoginView {
@Override
public void loginSuc() {
try {
// 登录成功初始化鱼玩盒子userid
getBaseApplication().initYwSdk();
} catch (Exception e) {
}
// try {
// // 登录成功初始化鱼玩盒子userid
// getBaseApplication().initYwSdk();
// } catch (Exception e) {
// }
try {
// try {
// 登录成功初始化愉悦推
// YuyuetuiManager.getInstance().initSdk(this);
} catch (Exception e) {
}
// } catch (Exception e) {
// }
try {
getBaseApplication().initUm(getContext());
} catch (Exception e) {
}
// try {
// getBaseApplication().initUm(getContext());
// } catch (Exception e) {
// }
AppConfig.mainWaterviewStatus = true;
spUtil.putBoolean(Constant.USER_DEVICE_LOGIN, true);
......
......@@ -231,14 +231,14 @@ public class RedboxActivity extends BaseActivity implements RedboxView {
gotoDialogActivity("8");
break;
case R.id.rl_redbox_nine:
// if (timerNine != null) {
// timerNine = null;
// }
// gotoDialogActivity("9");
if (timerNine != null) {
timerNine = null;
}
gotoDialogActivity("9");
onDestoryTimer();
finish();
RxBus.getDefault().post(new EventMessage(SHOW_TWO_FRAGMENT));
// onDestoryTimer();
// finish();
// RxBus.getDefault().post(new EventMessage(SHOW_TWO_FRAGMENT));
// readyGo(FriendsNewActivity.class);
break;
case R.id.rl_redbox_ten:
......@@ -291,7 +291,6 @@ public class RedboxActivity extends BaseActivity implements RedboxView {
if (data.getStatus() == 1) {
// 看视频才能领奖励
bundle.putString(Constant.MAIN_CARRIET_TURN, Constant.CARRIER_REDENVELOPE);
bundle.putInt(Constant.MAIN_CUR_FLAG, Constant.MAIN_CUR_TWO);
} else {
// 金币翻倍
bundle.putString(Constant.MAIN_CARRIET_TURN, Constant.CARRIER_REDENVELOPE_DOUBLE);
......
......@@ -92,7 +92,8 @@ public class SettingActivity extends BaseActivity {
clearDialog();
break;
case R.id.tv_set_quit:
backDialog();
// backDialog();
readyGo(WxLoginActivity.class);
break;
}
......
......@@ -69,11 +69,6 @@ public class SplashActivity extends BaseActivity implements WeakHandler.IHandler
return;
}
UserManager.getInstance().setAdShowFlag(false);
// JpushManager jpushManager = JpushManager.getInstance();
// jpushManager.setJpushAlias();
hideBottomUIMenu();
// 校验APP签名
......@@ -154,27 +149,27 @@ public class SplashActivity extends BaseActivity implements WeakHandler.IHandler
// setAnimation();
// }
// try {
// if (!NetUtils.isNetworkConnected(getContext())) {
// setAnimation();
// } else {
// //step2:创建TTAdNative对象
// mTTAdNative = TTAdManagerHolder.get().createAdNative(this);
// //在合适的时机申请权限,如read_phone_state,防止获取不了imei时候,下载类广告没有填充的问题
// //在开屏时候申请不太合适,因为该页面倒计时结束或者请求超时会跳转,在该页面申请权限,体验不好
// // TTAdManagerHolder.getInstance(this).requestPermissionIfNecessary(this);
// //定时,AD_TIME_OUT时间到时执行,如果开屏广告没有加载则跳转到主页面
// mHandler.sendEmptyMessageDelayed(MSG_GO_MAIN, AD_TIME_OUT);
// //加载开屏广告
// loadSplashAd();
// }
// } catch (Exception e) {
// e.printStackTrace();
//
// goToMainActivity();
// }
try {
if (!NetUtils.isNetworkConnected(getContext())) {
setAnimation();
} else {
//step2:创建TTAdNative对象
mTTAdNative = TTAdManagerHolder.get().createAdNative(this);
//在合适的时机申请权限,如read_phone_state,防止获取不了imei时候,下载类广告没有填充的问题
//在开屏时候申请不太合适,因为该页面倒计时结束或者请求超时会跳转,在该页面申请权限,体验不好
// TTAdManagerHolder.getInstance(this).requestPermissionIfNecessary(this);
//定时,AD_TIME_OUT时间到时执行,如果开屏广告没有加载则跳转到主页面
mHandler.sendEmptyMessageDelayed(MSG_GO_MAIN, AD_TIME_OUT);
//加载开屏广告
loadSplashAd();
}
} catch (Exception e) {
e.printStackTrace();
goToMainActivity();
}
setAnimation();
// setAnimation();
}
}
......
......@@ -14,6 +14,7 @@ import com.mints.highgold.common.Constant;
import com.mints.highgold.login.LoginApi;
import com.mints.highgold.login.OnLoginListener;
import com.mints.highgold.manager.AmapLocationManager;
import com.mints.highgold.manager.UserManager;
import com.mints.highgold.mvp.model.WXInfo;
import com.mints.highgold.mvp.presenters.WxLoginPresenter;
import com.mints.highgold.mvp.views.WxLoginView;
......@@ -225,22 +226,24 @@ public class WxLoginActivity extends BaseActivity implements WxLoginView, OnLogi
@Override
public void loginSuc() {
try {
// 登录成功初始化鱼玩盒子userid
getBaseApplication().initYwSdk();
} catch (Exception e) {
}
// UserManager.getInstance().userLogout();
try {
// try {
// // 登录成功初始化鱼玩盒子userid
// getBaseApplication().initYwSdk();
// } catch (Exception e) {
// }
// try {
// 登录成功初始化愉悦推
// YuyuetuiManager.getInstance().initSdk(this);
} catch (Exception e) {
}
// } catch (Exception e) {
// }
try {
getBaseApplication().initUm(getContext());
} catch (Exception e) {
}
// try {
// getBaseApplication().initUm(getContext());
// } catch (Exception e) {
// }
AppConfig.mainWaterviewStatus = true;
spUtil.putBoolean(Constant.USER_DEVICE_LOGIN, true);
......
......@@ -237,18 +237,6 @@ public class MainFragment extends BaseFragment
// 点击当前标签时调用
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_LOAN) {
// try {
// DiskLruCacheHelper dlch = new DiskLruCacheHelper(getContext());
// if (dlch != null) {
// LocationBean lb = dlch.getAsSerializable(Constant.LOCATION_DATA);
// if (lb != null) {
// showToast(JsonUtil.toJson(lb));
// }
// }
// } catch (Exception e) {
// }
if (!TextUtils.isEmpty(userID)) {
loanPresenter.getUserTaskMsg(false);
} else {
......@@ -418,32 +406,6 @@ public class MainFragment extends BaseFragment
switch (view.getId()) {
case R.id.tv_fragment_main_whatgold:// 如何赚金币
readyGo(WhatGoldActivity.class);
// readyGo(HytechVedioActivity.class);
// HytechVedioAdManager.getInstance(getActivity()).loanHytechAd(0,0,"","");
// readyGo(WxLoginActivity.class);
// System.out.println("mcg __ id:"+ DevicesUtil.getPesudoUniqueID());
// bundle = new Bundle();
// bundle.putString(Constant.DAICHAO_URL, "http://market.mints-id.com/home/shop/70");
// readyGo(WebActivity.class, bundle);
// try {
// System.out.println("mcg __ oaid"+ DevicesUtil.getOaid());
// } catch (Exception e) {
// e.printStackTrace();
// }
// bundle = new Bundle();
// bundle.putInt(Constant.MAIN_ALL_COIN, 5000);
// bundle.putInt(Constant.MAIN_CUR_FLAG, Constant.MAIN_CUR_ONE);
// bundle.putString(Constant.MAIN_CARRIET_TURN, Constant.CARRIER_NEW_USER);
// readyGo(AwardActivity.class, bundle);
// loadCsjFullAd(Constant.CARRIER_DAILY_DOWNLOAD);
break;
case R.id.iv_fragment_main_putcard:// 补卡
break;
......@@ -463,79 +425,50 @@ public class MainFragment extends BaseFragment
}
break;
case R.id.ll_fragment_main_try:// 点一点
// int downloandCompleteCount = userConfig.getDownloandCompleteCount();
// if (downloandCompleteCount >= userConfig.getDownloandNeedCount()) {
// showToast("试玩赚金币已完成,请明日再来");
// return;
// }
//
// if (userConfig.getDownLoadTaskOrder() == 0) {
// //立言前 穿山甲后
// openDownloadTask(Constant.AD_SOURCE_LY, downloandCompleteCount, userConfig.getDownLoadTaskNeedLYCount());
// } else {
// openDownloadTask(Constant.AD_SOURCE_CSJ, downloandCompleteCount, userConfig.getDownLoadTaskNeedCSJCount());
// }
break;
case R.id.ll_fragment_main_vedio:// 观看视频
// if (userConfig.getVideoCompleteCount() >= userConfig.getVideoNeedCount()) {
// showToast("看福利视频已完成,请明日再来");
// return;
// }
//
// loadCsjAd(TTAdManagerHolder.TT_AD_VEDIO_MAIN_LOOK, Constant.CARRIER_DAILY_VIDEO);
break;
// case R.id.rl_fragment_main_pan:// 大转盘
// if (userConfig.getDaily_turn_complatecount() >= userConfig.getDaily_turn_maxcount()) {
// showToast("抽奖赢手机已完成,请明日再来");
// return;
// }
//
// bundle = new Bundle();
// bundle.putString(Constant.MAIN_CARRIET_TURN, Constant.CARRIER_DAILY_TURN);
// bundle.putInt(Constant.PAN_LOADAD_TYPE, userConfig.getTurnOrderType());
// readyGo(TurntableActivity.class, bundle);
// break;
case R.id.ll_fragment_main_game:// 游戏
// if (userConfig.isAdFlag()) {
// new RxPermissions(getActivity())
// .request(Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_EXTERNAL_STORAGE)
// .subscribe(granted -> {
// if (granted) {
//// String gameId = "chengyudaguanren";
// String gameId = userConfig.getGameHomeId();
// if (!TextUtils.isEmpty(gameId) && liebaoManager.hasGame(gameId)) {
// liebaoManager.startH5Game(gameId);
// } else {
// boolean main = getActivity() instanceof MainActivity;
// if (main) {
// MainActivity activity = (MainActivity) getActivity();
// activity.clickTab3Layout();
// }
// }
// } else {
// showMissingPermissionDialog("设备、储存");
// }
// });
// } else {
// boolean main = getActivity() instanceof MainActivity;
// if (main) {
// MainActivity activity = (MainActivity) getActivity();
// activity.clickTab2Layout();
// }
// }
boolean main = getActivity() instanceof MainActivity;
if (main) {
MainActivity activity = (MainActivity) getActivity();
activity.clickTab2Layout();
if (userConfig.isAdFlag()) {
new RxPermissions(getActivity())
.request(Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_EXTERNAL_STORAGE)
.subscribe(granted -> {
if (granted) {
// String gameId = "chengyudaguanren";
String gameId = userConfig.getGameHomeId();
if (!TextUtils.isEmpty(gameId) && liebaoManager.hasGame(gameId)) {
liebaoManager.startH5Game(gameId);
} else {
boolean main = getActivity() instanceof MainActivity;
if (main) {
MainActivity activity = (MainActivity) getActivity();
activity.clickTab3Layout();
}
}
} else {
showMissingPermissionDialog("设备、储存");
}
});
} else {
boolean main = getActivity() instanceof MainActivity;
if (main) {
MainActivity activity = (MainActivity) getActivity();
activity.clickTab2Layout();
}
}
// boolean main = getActivity() instanceof MainActivity;
// if (main) {
// MainActivity activity = (MainActivity) getActivity();
// activity.clickTab2Layout();
// }
break;
case R.id.ll_fragment_main_friend:// 邀请好友
readyGo(FriendsNewActivity.class);
// readyGo(FriendsActivity.class);
break;
case R.id.iv_fragment_main_banner:
main = getActivity() instanceof MainActivity;
boolean main = getActivity() instanceof MainActivity;
if (main) {
MainActivity activity = (MainActivity) getActivity();
activity.clickTab2Layout();
......@@ -580,11 +513,6 @@ public class MainFragment extends BaseFragment
return;
}
// Bundle bundle = new Bundle();
// bundle.putInt(Constant.NORMAL_WATER_COIN, userConfig.getConfigNormalWaterCoin());
// bundle.putInt(Constant.PATCH_WATER_COIN, userConfig.getConfigPatchWaterCoin());
// readyGo(DrinkClockActivity.class, bundle);
loanPresenter.clickForWater();
} else if (water == 4) {
// 喝水打卡汽泡
......@@ -601,14 +529,20 @@ public class MainFragment extends BaseFragment
} else {
onlineIncome = Integer.valueOf(waterCoin);
// 在线收益奖励
HashMap<String, Object> vo = new HashMap<>();
vo.put("carrierType", Constant.CARRIER_ONLINE_INCOME);
vo.put("status", Constant.TASK_STATUS);
if (onlineIncome != -1) {
vo.put("online_income", onlineIncome);
}
loanPresenter.reportAddCoinMsg(vo, Constant.CARRIER_ONLINE_INCOME);
// // 在线收益奖励
// HashMap<String, Object> vo = new HashMap<>();
// vo.put("carrierType", Constant.CARRIER_ONLINE_INCOME);
// vo.put("status", Constant.TASK_STATUS);
// if (onlineIncome != -1) {
// vo.put("online_income", onlineIncome);
// }
// loanPresenter.reportAddCoinMsg(vo, Constant.CARRIER_ONLINE_INCOME);
Bundle bundle = new Bundle();
bundle.putInt(Constant.MAIN_CUR_COIN, onlineIncome);
// bundle.putInt(Constant.MAIN_ALL_COIN, userConfig.getCoin());
bundle.putString(Constant.MAIN_CARRIET_TURN, Constant.CARRIER_ONLINE_INCOME_DOUBLE);
readyGo(AwardActivity.class, bundle);
}
}
......@@ -629,10 +563,10 @@ public class MainFragment extends BaseFragment
}
// 设置随机广告权重
// if (vedioAdingManager != null) {
// vedioAdingManager.initAdWeight(data.getVedioplan_csj_vedio_rate(), data.getVedioplan_liyan_vedio_rate(), data.getVedioplan_lyh_vedio_rate(), data.getVedioplan_csj_full_screen_video_rate());
//// vedioAdingManager.initAdWeight(1, 100, 2, 3);
// }
if (vedioAdingManager != null) {
vedioAdingManager.initAdWeight(data.getVedioplan_csj_vedio_rate(), data.getVedioplan_liyan_vedio_rate(), data.getVedioplan_lyh_vedio_rate(), data.getVedioplan_csj_full_screen_video_rate());
// vedioAdingManager.initAdWeight(1, 100, 2, 3);
}
System.out.println("mcg __ 首页权重值:csjVedioWeight:" + data.getVedioplan_csj_vedio_rate() + " lyWeight:" + data.getVedioplan_liyan_vedio_rate() + " ylhWeight:" + data.getVedioplan_lyh_vedio_rate() + " csjFullWeight:" + data.getVedioplan_csj_full_screen_video_rate());
......@@ -646,48 +580,27 @@ public class MainFragment extends BaseFragment
System.out.println("mcg __ 首页广告完成数:csjVedioAdCount:" + data.getVedioplan_csj_vedio_surplus() + " lyAdCount:" + data.getVedioplan_liyan_vedio_surplus() + " ylhAdCount:" + data.getVedioplan_lyh_vedio_surplus() + " csjFullAdCount:" + data.getVedioplan_csj_full_screen_video_surplus());
// userManager.setAdShowFlag(data.isAdFlag());
userManager.setAdShowFlag(data.isAdFlag());
// // 游戏赚按钮
// boolean main = getActivity() instanceof MainActivity;
// if (data.isAdFlag()) {
// if (main) {
// MainActivity activity = (MainActivity) getActivity();
// activity.setclickTab3LayoutVisible();
// activity.setclickTab4LayoutVisible();
// }
// } else {
// if (main) {
// MainActivity activity = (MainActivity) getActivity();
// activity.setclickTab3LayoutGone();
// activity.setclickTab4LayoutGone();
// }
// }
// 游戏赚按钮
boolean main = getActivity() instanceof MainActivity;
if (data.isAdFlag()) {
if (main) {
MainActivity activity = (MainActivity) getActivity();
activity.setclickTab3LayoutVisible();
activity.setclickTab4LayoutVisible();
}
} else {
if (main) {
MainActivity activity = (MainActivity) getActivity();
activity.setclickTab3LayoutGone();
activity.setclickTab4LayoutGone();
}
}
// // 成语闯关
// if (data.isAdFlag()) {
//
// String gameHomeName = userConfig.getGameHomeName();
// if (TextUtils.isEmpty(gameHomeName)) {
// tvFragmentMainGametitle.setText("成语闯关");
// } else {
// tvFragmentMainGametitle.setText(gameHomeName);
// }
// String gameHomeIcon = userConfig.getGameHomeIcon();
// if (!TextUtils.isEmpty(gameHomeIcon)) {
// GlideUtils.loadImageViewLoding(getContext(), gameHomeIcon, ivFragmentMainGameicon, R.mipmap.ic_newman_game, R.mipmap.ic_newman_game);
// }
// tvFragmentMainGamehint.setText(new SpanUtils().append("玩游戏瓜分").setForegroundColor(getResources().getColor(R.color.graya))
// .append("10").setForegroundColor(getResources().getColor(R.color.main_mints))
// .append("亿").setForegroundColor(getResources().getColor(R.color.graya))
// .create());
// } else {
// tvFragmentMainGametitle.setText("更多金币");
// tvFragmentMainGamehint.setText("赚取更多金币");
// ivFragmentMainGameicon.setImageResource(R.mipmap.ic_launcher);
// }
// 成语闯关
if (data.isAdFlag()) {
if (false) {
String gameHomeName = userConfig.getGameHomeName();
if (TextUtils.isEmpty(gameHomeName)) {
tvFragmentMainGametitle.setText("成语闯关");
......@@ -1397,7 +1310,7 @@ public class MainFragment extends BaseFragment
// 显示红包动画
initGiftAnim(rlFragmentMainRedbox);
// TTPreLoadExpressManager.getInstance().loadTtFrameLayout(getContext());
TTPreLoadExpressManager.getInstance().loadTtFrameLayout(getContext());
// 下拉刷新监听
mainMainCrlRefresh.setOnRefreshListener(refreshLayout -> onRefresh());
......@@ -1421,7 +1334,7 @@ public class MainFragment extends BaseFragment
Manifest.permission.ACCESS_FINE_LOCATION)
.subscribe(granted -> {
if (granted) {
// getBaseApplication().initUm(getContext());
getBaseApplication().initUm(getContext());
AmapLocationManager.getInstance().startLocation(mLocationHandler);
} else {
showMissingPermissionDialog("设备、储存、位置");
......@@ -1481,14 +1394,14 @@ public class MainFragment extends BaseFragment
spUtil.putBoolean(Constant.LOAN_PERMISSION_FLAG, false);
// 加载banner广告
// initTTBanner();
initTTBanner();
new RxPermissions(getActivity())
.request(Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION)
.subscribe(granted -> {
if (granted) {
// getBaseApplication().initUm(getContext());
getBaseApplication().initUm(getContext());
AmapLocationManager.getInstance().startLocation(mLocationHandler);
if (!AppConfig.lyAdSdkInitState) {
getBaseApplication().initGold(getBaseApplication().getApplicationContext());
......
......@@ -117,7 +117,7 @@ public class MyFragment extends BaseFragment
gvMy.setOnItemClickListener(this);
// 加载banner广告
// initTTBanner();
initTTBanner();
}
/**
......@@ -148,13 +148,13 @@ public class MyFragment extends BaseFragment
super.onResume();
//应用商店上线隐藏广告
// if (userManager.getAdShowFlag()) {
// if (ttUtil != null && flMyTtbanner != null) {
// ttUtil.getBannerInit(getContext(), TTAdManagerHolder.TT_AD_BANNER_ID_MY, flMyTtbanner, 370, 80);
// }
// } else {
// flMyTtbanner.setVisibility(View.GONE);
// }
if (userManager.getAdShowFlag()) {
if (ttUtil != null && flMyTtbanner != null) {
ttUtil.getBannerInit(getContext(), TTAdManagerHolder.TT_AD_BANNER_ID_MY, flMyTtbanner, 370, 80);
}
} else {
flMyTtbanner.setVisibility(View.GONE);
}
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_MY) {
if (!TextUtils.isEmpty(userManager.getUserID())) {
......@@ -348,53 +348,53 @@ public class MyFragment extends BaseFragment
@Override
public void getMyRotationChartSuc(BannerBean data) {
if (data != null && !data.isShow()) {
bvMyBanner.setVisibility(View.GONE);
return;
}
bvMyBanner.setVisibility(View.VISIBLE);
setBannerAdapter(data.getList());
// if (UserManager.getInstance().getAdShowFlag()) {
// if (data != null && !data.isShow()) {
// bvMyBanner.setVisibility(View.GONE);
// return;
// }
// bvMyBanner.setVisibility(View.VISIBLE);
// setBannerAdapter(data.getList());
// } else {
// if (data != null && !data.isShow()) {
// bvMyBanner.setVisibility(View.GONE);
// return;
// }
// bvMyBanner.setVisibility(View.VISIBLE);
// setBannerAdapter(data.getList());
if (UserManager.getInstance().getAdShowFlag()) {
if (data != null && !data.isShow()) {
bvMyBanner.setVisibility(View.GONE);
return;
}
bvMyBanner.setVisibility(View.VISIBLE);
setBannerAdapter(data.getList());
} else {
bvMyBanner.setVisibility(View.GONE);
}
}
@Override
public void getMyHotActivitySuc(BannerBean data) {
if (data != null && !data.isShow()) {
llMyHot.setVisibility(View.GONE);
return;
}
llMyHot.setVisibility(View.VISIBLE);
hotList = data.getList();
if (myAdapter != null) {
myAdapter = null;
}
myAdapter = new MyAdapter(getContext(), hotList);
gvMy.setAdapter(myAdapter);
// if (UserManager.getInstance().getAdShowFlag()) {
// if (data != null && !data.isShow()) {
// llMyHot.setVisibility(View.GONE);
// return;
// }
// llMyHot.setVisibility(View.VISIBLE);
// hotList = data.getList();
// if (myAdapter != null) {
// myAdapter = null;
// }
// myAdapter = new MyAdapter(getContext(), hotList);
// gvMy.setAdapter(myAdapter);
// } else {
// if (data != null && !data.isShow()) {
// llMyHot.setVisibility(View.GONE);
// return;
// }
// llMyHot.setVisibility(View.VISIBLE);
// hotList = data.getList();
// if (myAdapter != null) {
// myAdapter = null;
// }
// myAdapter = new MyAdapter(getContext(), hotList);
// gvMy.setAdapter(myAdapter);
if (UserManager.getInstance().getAdShowFlag()) {
if (data != null && !data.isShow()) {
llMyHot.setVisibility(View.GONE);
return;
}
llMyHot.setVisibility(View.VISIBLE);
hotList = data.getList();
if (myAdapter != null) {
myAdapter = null;
}
myAdapter = new MyAdapter(getContext(), hotList);
gvMy.setAdapter(myAdapter);
} else {
llMyHot.setVisibility(View.GONE);
}
}
private void setUserLoginStatus() {
......
......@@ -927,19 +927,19 @@ public class VersusFragment extends BaseFragment
}
// 鱼玩盒子
if (userManager.getAdShowFlag()) {
// if (Build.VERSION.SDK_INT <= 28) {
// 目前只支持anrdoid 10以下
tvVersusYwhzgold.setText("+" + data.getYwhzCoin());
if (data.isYwhzShow()) {
llVersusYwhz.setVisibility(View.VISIBLE);
viewVersusYwhz.setVisibility(View.VISIBLE);
} else {
llVersusYwhz.setVisibility(View.GONE);
viewVersusYwhz.setVisibility(View.GONE);
}
// if (userManager.getAdShowFlag()) {
//// if (Build.VERSION.SDK_INT <= 28) {
// // 目前只支持anrdoid 10以下
// tvVersusYwhzgold.setText("+" + data.getYwhzCoin());
// if (data.isYwhzShow()) {
// llVersusYwhz.setVisibility(View.VISIBLE);
// viewVersusYwhz.setVisibility(View.VISIBLE);
// } else {
// llVersusYwhz.setVisibility(View.GONE);
// viewVersusYwhz.setVisibility(View.GONE);
// }
}
//// }
// }
// ----------------------------
//第一次喝水 Complete 0-未完成 1-完成 2-领取
......@@ -1691,7 +1691,7 @@ public class VersusFragment extends BaseFragment
spUtil = SPUtil.getInstance(getContext());
// 加载banner广告
// initTTBanner();
initTTBanner();
}
/**
......
......@@ -99,7 +99,6 @@
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20pt"
......
......@@ -110,7 +110,6 @@
android:src="@mipmap/ic_drawcash_wx_enable" />
<ImageView
android:visibility="invisible"
android:id="@+id/iv_drawcash_alipay"
android:layout_width="0dp"
android:layout_height="136pt"
......@@ -242,17 +241,11 @@
android:textSize="16sp" />
<Button
android:visibility="invisible"
android:id="@+id/btn_drawcash_six"
android:layout_width="0dp"
android:layout_height="160pt"
android:layout_marginLeft="16pt"
android:layout_weight="1"
android:background="@drawable/rb_index_checked"
android:gravity="center"
android:text="提现50元"
android:textColor="@drawable/rb_index_text_color"
android:textSize="16sp" />
android:visibility="invisible" />
</LinearLayout>
......
......@@ -60,7 +60,6 @@
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:id="@+id/tab_rl_game"
android:layout_width="0dp"
android:layout_height="wrap_content"
......@@ -97,7 +96,6 @@
android:layout_height="match_parent">
<ImageView
android:visibility="gone"
android:layout_width="12pt"
android:layout_height="12pt"
android:layout_alignParentRight="true"
......@@ -132,7 +130,6 @@
<LinearLayout
android:visibility="gone"
android:id="@+id/tab_rl_money"
android:layout_width="0dp"
android:layout_height="wrap_content"
......
......@@ -101,7 +101,7 @@
android:background="@drawable/shape_bg_write"
android:elevation="2dip"
android:gravity="center"
android:text="退出"
android:text="切换账号"
android:textColor="@color/product_net_text"
android:textSize="16sp"
android:visibility="gone" />
......
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