Commit 807572e6 authored by mengcuiguang's avatar mengcuiguang

优化广告

parent 8ad1a498
......@@ -10,8 +10,8 @@ android {
applicationId "com.mints.highgold"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 3
versionName "1.0.2"
versionCode 4
versionName "1.0.3"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -6,6 +6,7 @@ import android.text.TextUtils;
import com.mints.highgold.common.AppConfig;
import com.mints.highgold.common.Constant;
import com.mints.highgold.mvp.model.VedioAdingBean;
import com.mints.highgold.utils.ToastUtil;
import java.util.ArrayList;
import java.util.Calendar;
......
......@@ -305,11 +305,9 @@ public class AwardActivity extends BaseActivity implements AwardView {
TextUtils.equals(CARRIER_TYPE, Constant.CARRIER_REDENVELOPE) ||
TextUtils.equals(CARRIER_TYPE, Constant.CARRIER_ONLINE_INCOME_DOUBLE)) {
if (BuildConfig.DEBUG) {
if (csjFullAdCount <= 0 && ylhAdCount <= 0 && csjVedioAdCount <= 0) {
showToast("无视频可加载,请联系客服");
return;
}
if (csjFullAdCount <= 0 && ylhAdCount <= 0 && csjVedioAdCount <= 0) {
showToast("今日视频已看完,请明天再来吧");
return;
}
......@@ -355,12 +353,15 @@ public class AwardActivity extends BaseActivity implements AwardView {
} else {
// loanYlhAd(CARRIER_TYPE);
if (BuildConfig.DEBUG) {
hideLoading();
showToast("无视频可加载,请联系客服");
} else {
loanYlhAd(CARRIER_TYPE);
}
hideLoading();
showToast("今日视频已看完,请明天再来吧");
// if (BuildConfig.DEBUG) {
// hideLoading();
// showToast("无视频可加载,请联系客服");
// } else {
// loanYlhAd(CARRIER_TYPE);
// }
}
}
......
......@@ -2002,16 +2002,15 @@ public class MainFragment extends BaseFragment
* @param downloadCoin
*/
private void getRandomVedioAd(String carrierType, int coin, String extraId, int downloadCoin) {
if (BuildConfig.DEBUG) {
int csjVedioAdCount = AppConfig.csjVedioAdCount;
int ylhAdCount = AppConfig.ylhAdCount;
int csjFullAdCount = AppConfig.csjFullAdCount;
if (csjFullAdCount <= 0 && ylhAdCount <= 0 && csjVedioAdCount <= 0) {
showToast("无视频可加载,请联系客服");
return;
}
int csjVedioAdCount = AppConfig.csjVedioAdCount;
int ylhAdCount = AppConfig.ylhAdCount;
int csjFullAdCount = AppConfig.csjFullAdCount;
if (csjFullAdCount <= 0 && ylhAdCount <= 0 && csjVedioAdCount <= 0) {
showToast("今日视频已看完,请明天再来吧");
return;
}
showLoading("加载中...");
CARRIER_TYPE = carrierType;
......@@ -2060,13 +2059,15 @@ public class MainFragment extends BaseFragment
} else if (ylhAdCount > 0) {
loanYlhAd(carrierType);
} else {
if (BuildConfig.DEBUG) {
hideLoading();
showToast("无视频可加载,请联系客服");
} else {
loanYlhAd(carrierType);
}
hideLoading();
showToast("今日视频已看完,请明天再来吧");
// if (BuildConfig.DEBUG) {
// hideLoading();
// showToast("无视频可加载,请联系客服");
// } else {
// loanYlhAd(carrierType);
// }
}
}
......
......@@ -2373,14 +2373,12 @@ public class VersusFragment extends BaseFragment
* @param downloadCoin
*/
private void getRandomVedioAd(String carrierType, int coin, String extraId, int downloadCoin) {
if (BuildConfig.DEBUG) {
int csjVedioAdCount = AppConfig.csjVedioAdCount;
int ylhAdCount = AppConfig.ylhAdCount;
int csjFullAdCount = AppConfig.csjFullAdCount;
if (csjFullAdCount <= 0 && ylhAdCount <= 0 && csjVedioAdCount <= 0) {
showToast("无视频可加载,请联系客服");
return;
}
int csjVedioAdCount = AppConfig.csjVedioAdCount;
int ylhAdCount = AppConfig.ylhAdCount;
int csjFullAdCount = AppConfig.csjFullAdCount;
if (csjFullAdCount <= 0 && ylhAdCount <= 0 && csjVedioAdCount <= 0) {
showToast("今日视频已看完,请明天再来吧");
return;
}
showLoading("加载中...");
......@@ -2427,12 +2425,15 @@ public class VersusFragment extends BaseFragment
loanYlhAd(carrierType);
} else {
// loanYlhAd(carrierType);
if (BuildConfig.DEBUG) {
hideLoading();
showToast("无视频可加载,请联系客服");
} else {
loanYlhAd(carrierType);
}
hideLoading();
showToast("今日视频已看完,请明天再来吧");
// if (BuildConfig.DEBUG) {
// hideLoading();
// showToast("无视频可加载,请联系客服");
// } else {
// loanYlhAd(carrierType);
// }
}
}
......
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