Commit 397a179c authored by mengcuiguang's avatar mengcuiguang

添加来电秀代码位,代码优化等

parent 544333b1
......@@ -118,6 +118,10 @@ public class CsjVideoAdManager extends BaseVideoAd {
case Constant.CARRIER_SMALLHOMEVEDIO_DOUBLE:// 短视频翻倍
codeId = TtCsjAdManager.TT_AD_VEDIO_SMALLHOMEVEDIO;
break;
case Constant.CARRIER_KUYINYUE_VEDIO:// 来电秀
codeId = TtCsjAdManager.TT_AD_VEDIO_KYLVEDIO;
break;
default:
codeId = TtCsjAdManager.TT_AD_VEDIO_MOREDIALOG;
break;
......
......@@ -248,7 +248,7 @@ public class VideoAdingManager {
Random r = new Random();
int randomWeight = r.nextInt(weight) + 1;
LogUtil.d(TAG, "2、权重随机值:" + randomWeight);
ToastUtil.show(MintsApplication.getContext(),"权重随机值:" + randomWeight);
// ToastUtil.show(MintsApplication.getContext(),"权重随机值:" + randomWeight);
for (WeightBean weightBean : weightList) {
randomWeight -= weightBean.getWeight();
if (randomWeight <= 0) {
......
......@@ -7,6 +7,7 @@ import com.mints.goodmoney.MintsApplication;
import com.mints.goodmoney.common.AppConfig;
import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.manager.TrackManager;
import com.mints.goodmoney.manager.TtCsjAdManager;
import com.mints.goodmoney.manager.YlhAdManager;
import com.mints.goodmoney.mvp.presenters.YlhVideoAdPresenter;
import com.mints.goodmoney.mvp.views.VideoAdManagerView;
......@@ -131,6 +132,9 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
case Constant.CARRIER_SMALLHOMEVEDIO_DOUBLE:// 短视频翻倍
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID();
break;
case Constant.CARRIER_KUYINYUE_VEDIO:// 来电秀
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_KYLVEDIO_POSTID();
break;
default:// 在线收益翻倍
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MOREDIALOG_POSTID();
break;
......
......@@ -80,6 +80,7 @@ object Constant {
// 协议地址
var REGISTER_URL = BuildConfig.MainIp + "gm/register.html"//服务协议
var PRIVACY_URL = BuildConfig.MainIp + "gm/privacy.html"//隐私协议
var STRATEGY_URL = BuildConfig.MainIp + "gm/strategy.html"//团长攻略
/**
......
......@@ -42,6 +42,7 @@ public class TtCsjAdManager {
public static String TT_AD_VEDIO_BLESSINGBAG = "945730117";// 福袋
public static String TT_AD_VEDIO_HOMEVEDIO = "945744137";// 首页视频翻倍
public static String TT_AD_VEDIO_SMALLHOMEVEDIO = "945744186";// 短视频翻倍
public static String TT_AD_VEDIO_KYLVEDIO = "945791766";// 来电秀视频
/*全屏视频*/
public static String TT_AD_FULLVEDIO_ALL = "945752969";// 通用
/*信息流*/
......
......@@ -35,6 +35,7 @@ object YlhAdManager {
var YLH_AD_VEDIO_BLESSINGBAG_POSTID = "1081758148138388" //福袋
var YLH_AD_VEDIO_HOMEVEDIO_POSTID= "4051451341464487" // 首页视频翻倍
var YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID= "9051152341362610" // 短视频翻倍
var YLH_AD_VEDIO_KYLVEDIO_POSTID= "8001950728967276" // 来电秀视频
/*信息流*/
var YLH_AD_NATIVEEXPRESS_JULEYUN = "8041941770890627" //聚乐云
......
......@@ -13,6 +13,7 @@ public class KylBean implements Serializable {
private String pvurl;
private String url;
private String nm;
private String id;
private TTFeedAd adBean;
public String getPvurl() {
......@@ -39,6 +40,14 @@ public class KylBean implements Serializable {
this.nm = nm;
}
public String getVedioId() {
return id;
}
public void setVedioId(String vedioId) {
this.id = vedioId;
}
public TTFeedAd getAdBean() {
return adBean;
}
......
......@@ -33,9 +33,14 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
companion object {
const val VIDEO_URL = "video_url"
const val VIDEO_ID = "video_id"
}
//https://vring.kuyin123.com/friend/94aa83142f7f5c98?videoId=1251065712248619008
private val WEB_VEDIO_URL = "https://vring.kuyin123.com/friend/94aa83142f7f5c98?videoId="
private lateinit var videoUrl: String
private lateinit var videoId: String
private val kylVideoPresenter by lazy { KylVideoPresenter() }
private lateinit var videoAdingManager: VideoAdingManager
......@@ -53,6 +58,7 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
super.getBundleExtras(extras)
extras?.let {
videoUrl = it.getString(VIDEO_URL, "")
videoId = it.getString(VIDEO_ID, "")
}
}
......@@ -101,6 +107,12 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
override fun onClick(v: View?) {
when (v?.id) {
R.id.ivBack -> finish()
R.id.ivVedio -> {
val bundle = Bundle()
bundle.putString(WebActivity.WEB_TITLE, "视频彩铃")
bundle.putString(WebActivity.WEB_URL, WEB_VEDIO_URL + videoId)
readyGo(WebActivity::class.java, bundle)
}
R.id.ivSetting -> {
if (downloadVedioSucFlag) {
readyGo()
......@@ -145,6 +157,7 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
private fun initListener() {
ivBack.setOnClickListener(this)
ivSetting.setOnClickListener(this)
ivVedio.setOnClickListener(this)
}
/**
......
......@@ -65,6 +65,7 @@ class KuYinYuePageFragment(private val targetid: String) : LazyLoadBaseFragment(
if (kylData != null && kylData.size > 0) {
val bundle = Bundle()
bundle.putString(KylVideoActivity.VIDEO_URL, kylData[position].url)
bundle.putString(KylVideoActivity.VIDEO_ID, kylData[position].vedioId)
readyGo(KylVideoActivity::class.java, bundle)
}
......
......@@ -724,9 +724,10 @@ class MyFragment : BaseFragment(),
}
}
R.id.tv_left_subtitle -> {
if (!userManager.userIsLogin()) {
readyGo(WxLoginActivity::class.java)
}
val bundle = Bundle()
bundle.putString(WebActivity.WEB_TITLE, getString(R.string.strategy_name))
bundle.putString(WebActivity.WEB_URL, Constant.STRATEGY_URL)
readyGo(WebActivity::class.java, bundle)
}
R.id.iv_right_icon2 -> {
// 跳转QQ客服
......
......@@ -21,6 +21,20 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/ivVedio"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/shape_tv_gold"
android:gravity="center"
android:text="设置视频彩铃"
android:layout_marginBottom="100dp"
app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@color/white" />
<TextView
android:id="@+id/ivSetting"
android:layout_width="match_parent"
......
......@@ -26,6 +26,7 @@
<string name="register_name">用户注册协议</string>
<string name="privacy_name">用户隐私协议</string>
<string name="strategy_name">平台攻略</string>
<string name="permission_tip">为了正常使用来电秀,请允许以下权限。</string>
<string name="sdcard_permission">读写权限</string>
......
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