Commit 9bc2e2fd authored by mengcuiguang's avatar mengcuiguang

穿山甲激励视频添加appip

parent 938fbeec
......@@ -10,8 +10,8 @@ android {
applicationId "com.mints.highgold"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 2
versionName "1.0.1"
versionCode 3
versionName "1.0.2"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -20,6 +20,7 @@ import com.mints.highgold.mvp.presenters.CsjVedioAdPresenter;
import com.mints.highgold.mvp.views.LyVedioAdManagerView;
import com.mints.highgold.ui.widgets.LoadingDialog;
import com.mints.highgold.utils.MD5;
import com.mints.highgold.utils.SPUtil;
import com.mints.highgold.utils.ToastUtil;
import com.mints.library.utils.json.JsonUtil;
......@@ -31,7 +32,7 @@ import java.util.HashMap;
public class CsjVedioAdManager implements LyVedioAdManagerView {
private static CsjVedioAdManager _inst;
private SPUtil spUtil;
private int curCoin;
private String extraId;
private CsjVedioAdPresenter csjVedioAdPresenter;
......@@ -61,7 +62,7 @@ public class CsjVedioAdManager implements LyVedioAdManagerView {
private void init(Activity activity) {
this.activity = activity;
spUtil = SPUtil.getInstance(activity);
userManager = UserManager.getInstance();
TTNativeExpressManager ttNativeExpressManager = new TTNativeExpressManager();
......@@ -318,6 +319,9 @@ public class CsjVedioAdManager implements LyVedioAdManagerView {
vo.put("adtype", Constant.ADTYPE_VEDIO);
vo.put("tid", tid);
vo.put("adsource", Constant.AD_SOURCE_CSJ);
if (spUtil != null) {
vo.put("ip", spUtil.getString(Constant.CSJ_VEDIO_APPIP));
}
switch (carrierType) {
case Constant.CARRIER_VERSUS_VIDEO:// 每日任务-视频
......
......@@ -270,4 +270,7 @@ public interface Constant {
String HOT_ACTIVITY_CHB = "chb";// 拆红包
String HOT_ACTIVITY_SID = "hotNews";// 新闻资讯
// 穿山甲激励视频id
String CSJ_VEDIO_APPIP = "csj_vedio_appip";
}
\ No newline at end of file
......@@ -75,6 +75,7 @@ public class UserTaskMsgBean implements Serializable {
private int vedioplan_csj_full_screen_video_surplus;
private String loanUrl;
private String appIp;// 穿山甲激励视频时传入
private boolean loanShow;
private int redPacketSecond;//一览视频 时间间隔 单位-秒
......@@ -313,4 +314,8 @@ public class UserTaskMsgBean implements Serializable {
public int getFirstGiveFriendCoin() {
return firstGiveFriendCoin;
}
public String getAppIp() {
return appIp;
}
}
......@@ -479,7 +479,7 @@ public interface LoanService {
// if (BuildConfig.DEBUG) {
// SPUtil spUtil = SPUtil.getInstance(context);
// if (TextUtils.isEmpty(spUtil.getString(Constant.LOCAL_IP))) {
// spUtil.putString(Constant.LOCAL_IP, "http://39.106.5.102:9082/gs-api/");
// spUtil.putString(Constant.LOCAL_IP, "http://39.106.5.102:9082/api-p1/");
// }
// retrofit = new Retrofit.Builder()
// .client(builder.build())
......
......@@ -42,6 +42,7 @@ import com.mints.highgold.ui.widgets.countdowntimer.CountDownTimerSupport;
import com.mints.highgold.ui.widgets.countdowntimer.OnCountDownTimerListener;
import com.mints.highgold.utils.MD5;
import com.mints.highgold.utils.RxBus;
import com.mints.highgold.utils.SPUtil;
import com.mints.highgold.utils.SoundPoolUtil;
import com.mints.highgold.utils.SpanUtils;
import com.mints.highgold.utils.Utils;
......@@ -102,6 +103,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
LinearLayout llAwardBg;
private AwardPresenter awardPresenter;
private SPUtil spUtil;
// 穿山甲
private boolean isloadTTVedio = false; // true-加载视频,服务端回调决定
......@@ -144,6 +146,8 @@ public class AwardActivity extends BaseActivity implements AwardView {
awardPresenter = new AwardPresenter();
awardPresenter.attachView(this);
spUtil = SPUtil.getInstance(getContext());
if (!UserManager.getInstance().getAdShowFlag()) {
tvAwardNext.setVisibility(View.GONE);
flAwardAd.setVisibility(View.GONE);
......@@ -1204,6 +1208,13 @@ public class AwardActivity extends BaseActivity implements AwardView {
vo.put("detailAdtype", detailAdtype);
}
// 穿山甲激励视频传入appid
if (TextUtils.equals(adsource, Constant.AD_SOURCE_CSJ)) {
if (spUtil != null) {
vo.put("ip", spUtil.getString(Constant.CSJ_VEDIO_APPIP));
}
}
switch (carrierType) {
case Constant.CARRIER_ONLINE_INCOME_DOUBLE:// 在线收益翻倍
vo.put("page", Constant.PAGE_ONE);
......
......@@ -566,6 +566,9 @@ public class MainFragment extends BaseFragment
showNewUserGift();
}
// 保存穿山甲激励视频ip
spUtil.putString(Constant.CSJ_VEDIO_APPIP, data.getAppIp());
// 设置随机广告权重
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());
......@@ -1643,6 +1646,9 @@ public class MainFragment extends BaseFragment
}
vo.put("adtype", Constant.ADTYPE_VEDIO);
vo.put("tid", tid);
if (spUtil != null) {
vo.put("ip", spUtil.getString(Constant.CSJ_VEDIO_APPIP));
}
//step4:创建广告请求参数AdSlot,具体参数含义参考文档
......
......@@ -1951,8 +1951,9 @@ public class VersusFragment extends BaseFragment
vo.put("block", Constant.BLOCK_TWO);
vo.put("order", Constant.ORDER_TWO);
}
if (spUtil != null) {
vo.put("ip", spUtil.getString(Constant.CSJ_VEDIO_APPIP));
}
vo.put("tid", tid);
//step4:创建广告请求参数AdSlot,具体参数含义参考文档
......
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