Commit 912e23d8 authored by 张释方's avatar 张释方

添加天天赚现金,删除分红赚

parent 68fb9a75
......@@ -356,7 +356,7 @@ dependencies {
implementation 'com.tencent.tbs.tbssdk:sdk:43903'
// //芒果联盟
// implementation 'com.openppeace.mgmob:mgmob:1.3.5-alpha5'//MGMob
// implementation 'com.openppeace.mgmob:mgmob:1.3.5-alpha6'//MGMob
// testImplementation 'junit:junit:4.13'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
......
......@@ -6,7 +6,11 @@ import java.util.List;
public class TurnBean implements Serializable {
/**
* configs : [{"count":150,"type":"coin","key":"t1","index":0,"title":"150金币"},{"count":10,"type":"cash","key":"t2","index":1,"title":"现金10元"},{"count":200,"type":"coin","key":"t8","index":2,"title":"200金币"},{"count":100,"type":"coin","key":"t3","index":3,"title":"100金币"},{"count":300,"type":"coin","key":"t4","index":4,"title":"300金币"},{"count":250,"type":"coin","key":"t5","index":5,"title":"250金币"},{"count":350,"type":"coin","key":"t6","index":6,"title":"350金币"},{"count":40,"type":"cash","key":"t7","index":7,"title":"现金40元"}]
* configs : [{"count":150,"type":"coin","key":"t1","index":0,"title":"150金币"},
* {"count":10,"type":"cash","key":"t2","index":1,"title":"现金10元"},{"count":200,"type":"coin","key":"t8","index":2,"title":"200金币"},
* {"count":100,"type":"coin","key":"t3","index":3,"title":"100金币"},{"count":300,"type":"coin","key":"t4","index":4,"title":"300金币"},
* {"count":250,"type":"coin","key":"t5","index":5,"title":"250金币"},{"count":350,"type":"coin","key":"t6","index":6,"title":"350金币"},
* {"count":40,"type":"cash","key":"t7","index":7,"title":"现金40元"}]
* max : 30
*/
......@@ -70,6 +74,7 @@ public class TurnBean implements Serializable {
private String rewardTitle;
private ParamsBean params;
public String getTitle() {
return title;
}
......@@ -78,6 +83,9 @@ public class TurnBean implements Serializable {
this.title = title;
}
public ParamsBean getparams(){
return params;
}
public String getIcon() {
return icon;
}
......@@ -106,6 +114,9 @@ public class TurnBean implements Serializable {
private int max;
private int complete;
private int coin;
private String xmPlaceId;
public String getXmPlaceId() { return xmPlaceId; }
public int getMax() {
return max;
......
......@@ -221,20 +221,16 @@ class HomePresenter : BasePresenter<HomeView>() {
* 公众号弹框参数传递
*/
fun setWechatTipsStatus(status: Int) {
LogUtil.d("GzhPresenter", "setWechatTipsStatus*******************************************")
val vo = HashMap<String, Any>()
vo["status"] = status
AppHttpManager.getInstance(loanApplication)
.call(loanService.setWechatTipsStatus(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
override fun onCompleted() {
LogUtil.d("GzhPresenter", "********************onCompleted**********************")
if (isLinkView) return
}
override fun onError(e: Throwable) {
LogUtil.d("GzhPresenter", "********************onError**********************${e.printStackTrace()}")
e.printStackTrace().toString()
if (isLinkView) return
}
......@@ -245,13 +241,9 @@ class HomePresenter : BasePresenter<HomeView>() {
val message: String = baseResponse.getMessage()
when (code) {
200 -> {
//请求成功后可以在这里响应请求
LogUtil.d("GzhPresenter", "********************成功了**********************")
}
else -> {
view.showToast(message)
//请求成功后可以在这里响应请求
LogUtil.d("GzhPresenter", "*********************不成功*********************")
}
}
}
......
......@@ -629,6 +629,7 @@ public interface LoanService {
*/
@POST("api/setWechatTipsStatus")
Observable<BaseResponse<JsonObject>> setWechatTipsStatus(@Body Map<String, Object> vo);
/**
* 默认http工厂
*/
......@@ -676,9 +677,8 @@ public interface LoanService {
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
.build();
return retrofit.create(LoanService.class);
}
}
}
......@@ -76,7 +76,6 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
.request(Manifest.permission.READ_PHONE_STATE)
.subscribe { granted: Boolean ->
if (granted) {
mobile = mobile.replace(" ".toRegex(), "")
loginPresenter.bindingMobile(mobile, code)
} else {
......
......@@ -152,68 +152,68 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param fragment
* @param bean
*/
// private fun loadGDTNativeExpressAd(fragment: CampaignFragment, bean: JsBridgeBean) {
//
// // 创建广告
// mNativeExpressAD2 = NativeExpressAD2(applicationContext, "", object : NativeExpressAD2.AdLoadListener {
// override fun onLoadSuccess(list: List<NativeExpressADData2>) {
// fragment.setBannerLoad(bean.requestId)
// gdtBannerRenderAd(fragment, bean, list)
// }
//
// override fun onNoAD(adError: AdError) {
// fragment.setBannerError(bean.requestId)
// }
// })
// mNativeExpressAD2?.setAdSize(390, 0) // 单位dp
// mNativeExpressAD2?.loadAd(1)
// destroyAd()
// bannerContainer?.removeAllViews()
// }
/* private fun loadGDTNativeExpressAd(fragment: CampaignFragment, bean: JsBridgeBean) {
// 创建广告
mNativeExpressAD2 = NativeExpressAD2(applicationContext, "", object : NativeExpressAD2.AdLoadListener {
override fun onLoadSuccess(list: List<NativeExpressADData2>) {
fragment.setBannerLoad(bean.requestId)
gdtBannerRenderAd(fragment, bean, list)
}
override fun onNoAD(adError: AdError) {
fragment.setBannerError(bean.requestId)
}
})
mNativeExpressAD2?.setAdSize(390, 0) // 单位dp
mNativeExpressAD2?.loadAd(1)
destroyAd()
bannerContainer?.removeAllViews()
}*/
/**
* 渲染广告
* @param adDataList
*/
// private fun gdtBannerRenderAd(fragment: CampaignFragment, bean: JsBridgeBean, adDataList: List<NativeExpressADData2>) {
// if (adDataList.size > 0) {
// bannerContainer?.removeAllViews()
// mNativeExpressADData2 = adDataList[0]
// mNativeExpressADData2?.setAdEventListener(object : AdEventListener {
// override fun onClick() {
// Log.i(TAG, "onClick: $mNativeExpressADData2")
// fragment.setBannerClick(bean.requestId)
// }
//
// override fun onExposed() {
// Log.i(TAG, "onImpression: $mNativeExpressADData2")
// fragment.setBannerExpose(bean.requestId)
// }
//
// override fun onRenderSuccess() {
// Log.i(TAG, "onRenderSuccess: $mNativeExpressADData2")
// bannerContainer?.removeAllViews()
// if (mNativeExpressADData2?.getAdView() != null) {
// bannerContainer?.addView(mNativeExpressADData2?.getAdView())
// }
// }
//
// override fun onRenderFail() {
// Log.i(TAG, "onRenderFail: $mNativeExpressADData2")
// fragment.setBannerError(bean.requestId)
// }
//
// override fun onAdClosed() {
// Log.i(TAG, "onAdClosed: $mNativeExpressADData2")
// fragment.setBannerClose(bean.requestId)
// bannerContainer?.removeAllViews()
// mNativeExpressADData2?.destroy()
// }
// })
// mNativeExpressADData2!!.render()
// }
// }
/* private fun gdtBannerRenderAd(fragment: CampaignFragment, bean: JsBridgeBean, adDataList: List<NativeExpressADData2>) {
if (adDataList.size > 0) {
bannerContainer?.removeAllViews()
mNativeExpressADData2 = adDataList[0]
mNativeExpressADData2?.setAdEventListener(object : AdEventListener {
override fun onClick() {
Log.i(TAG, "onClick: $mNativeExpressADData2")
fragment.setBannerClick(bean.requestId)
}
override fun onExposed() {
Log.i(TAG, "onImpression: $mNativeExpressADData2")
fragment.setBannerExpose(bean.requestId)
}
override fun onRenderSuccess() {
Log.i(TAG, "onRenderSuccess: $mNativeExpressADData2")
bannerContainer?.removeAllViews()
if (mNativeExpressADData2?.getAdView() != null) {
bannerContainer?.addView(mNativeExpressADData2?.getAdView())
}
}
override fun onRenderFail() {
Log.i(TAG, "onRenderFail: $mNativeExpressADData2")
fragment.setBannerError(bean.requestId)
}
override fun onAdClosed() {
Log.i(TAG, "onAdClosed: $mNativeExpressADData2")
fragment.setBannerClose(bean.requestId)
bannerContainer?.removeAllViews()
mNativeExpressADData2?.destroy()
}
})
mNativeExpressADData2!!.render()
}
}*/
/**
......@@ -279,52 +279,52 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param fragment
* @param bean
*/
// private fun loadGDTBannerAd(fragment: CampaignFragment?, bean: JsBridgeBean) {
// var pid = bean.pid
// // TODO: 2021/1/8 demo中代码位写死, 媒体注意替换
// pid = ""
// //广点通底部Banner
// unifiedBannerView = UnifiedBannerView(this@XiaomanActivity, pid, object : UnifiedBannerADListener {
// override fun onNoAD(adError: AdError) {
// Log.e(TAG, "广告加载失败: onNoAD")
// fragment?.setBannerError(bean.requestId)
// }
//
// override fun onADReceive() {
// Log.e(TAG, "广告加载成功回调: onADReceive")
// fragment?.setBannerLoad(bean.requestId)
// }
//
// override fun onADExposure() {
// Log.e(TAG, "广告曝光: onADExposure")//2.2.7.1 曝光上报,在活动入口渲染完成后必须调用
// fragment?.setBannerExpose(bean.requestId)
// }
//
// override fun onADClosed() {
// Log.e(TAG, "广告关闭: onADClosed")
// fragment?.setBannerClose(bean.requestId)
// }
//
// override fun onADClicked() {
// Log.e(TAG, "广告点击: onADClicked")//2.2.7.2 点击上报,活动入口点击时进行调用必须调用
// fragment?.setBannerClick(bean.requestId)
// }
//
// override fun onADLeftApplication() {
// Log.e(TAG, "广告点击离开 APP : onADLeftApplication")
// }
//
// override fun onADOpenOverlay() {
// Log.e(TAG, "广告打开浮层: onADOpenOverlay")
// }
//
// override fun onADCloseOverlay() {
// Log.e(TAG, "广告浮层关闭: onADCloseOverlay")
// }
// })
// bannerContainer?.addView(unifiedBannerView, getUnifiedBannerLayoutParams())
// unifiedBannerView!!.loadAD()
// }
/* private fun loadGDTBannerAd(fragment: CampaignFragment?, bean: JsBridgeBean) {
var pid = bean.pid
// TODO: 2021/1/8 demo中代码位写死, 媒体注意替换
pid = ""
//广点通底部Banner
unifiedBannerView = UnifiedBannerView(this@XiaomanActivity, pid, object : UnifiedBannerADListener {
override fun onNoAD(adError: AdError) {
Log.e(TAG, "广告加载失败: onNoAD")
fragment?.setBannerError(bean.requestId)
}
override fun onADReceive() {
Log.e(TAG, "广告加载成功回调: onADReceive")
fragment?.setBannerLoad(bean.requestId)
}
override fun onADExposure() {
Log.e(TAG, "广告曝光: onADExposure")//2.2.7.1 曝光上报,在活动入口渲染完成后必须调用
fragment?.setBannerExpose(bean.requestId)
}
override fun onADClosed() {
Log.e(TAG, "广告关闭: onADClosed")
fragment?.setBannerClose(bean.requestId)
}
override fun onADClicked() {
Log.e(TAG, "广告点击: onADClicked")//2.2.7.2 点击上报,活动入口点击时进行调用必须调用
fragment?.setBannerClick(bean.requestId)
}
override fun onADLeftApplication() {
Log.e(TAG, "广告点击离开 APP : onADLeftApplication")
}
override fun onADOpenOverlay() {
Log.e(TAG, "广告打开浮层: onADOpenOverlay")
}
override fun onADCloseOverlay() {
Log.e(TAG, "广告浮层关闭: onADCloseOverlay")
}
})
bannerContainer?.addView(unifiedBannerView, getUnifiedBannerLayoutParams())
unifiedBannerView!!.loadAD()
}*/
/**
* 加载穿山甲视频广告
......@@ -407,36 +407,36 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param fragment
* @param bean
*/
// private fun loadCSJBannerAd(fragment: CampaignFragment, bean: JsBridgeBean) {
// val mTTAdNative = TTAdSdk.getAdManager().createAdNative(applicationContext)//2.2.9.3穿山甲底部banner
// var pid = bean.pid
// // 在demo中,为了方便测试,写死.媒体在实际应用中注意替换
// pid = "946012845"
// val adSlot = AdSlot.Builder()
// .setCodeId(pid) //广告位id
// .setSupportDeepLink(true)
// .setAdCount(1) //请求广告数量为1到3条
// .setExpressViewAcceptedSize(600f, 0f) //期望模板广告view的size,单位dp
// .build()
// mTTAdNative.loadBannerExpressAd(adSlot, object : TTAdNative.NativeExpressAdListener {
// //请求失败回调
// override fun onError(code: Int, message: String) {
// fragment.setBannerError(bean.requestId)
// }
//
// //请求成功回调
// override fun onNativeExpressAdLoad(ads: List<TTNativeExpressAd>) {
// if (ads == null || ads.size == 0) {
// return
// }
// fragment.setBannerLoad(bean.requestId)
// mTTAd = ads[0]
// mTTAd?.setSlideIntervalTime(30 * 1000) //设置轮播间隔 ms,不调用则不进行轮播展示
// bindBytedanceBannerAdListener(fragment, bean, mTTAd!!)
// mTTAd?.render() //调用render开始渲染广告
// }
// })
// }
/* private fun loadCSJBannerAd(fragment: CampaignFragment, bean: JsBridgeBean) {
val mTTAdNative = TTAdSdk.getAdManager().createAdNative(applicationContext)//2.2.9.3穿山甲底部banner
var pid = bean.pid
// 在demo中,为了方便测试,写死.媒体在实际应用中注意替换
pid = "946012845"
val adSlot = AdSlot.Builder()
.setCodeId(pid) //广告位id
.setSupportDeepLink(true)
.setAdCount(1) //请求广告数量为1到3条
.setExpressViewAcceptedSize(600f, 0f) //期望模板广告view的size,单位dp
.build()
mTTAdNative.loadBannerExpressAd(adSlot, object : TTAdNative.NativeExpressAdListener {
//请求失败回调
override fun onError(code: Int, message: String) {
fragment.setBannerError(bean.requestId)
}
//请求成功回调
override fun onNativeExpressAdLoad(ads: List<TTNativeExpressAd>) {
if (ads == null || ads.size == 0) {
return
}
fragment.setBannerLoad(bean.requestId)
mTTAd = ads[0]
mTTAd?.setSlideIntervalTime(30 * 1000) //设置轮播间隔 ms,不调用则不进行轮播展示
bindBytedanceBannerAdListener(fragment, bean, mTTAd!!)
mTTAd?.render() //调用render开始渲染广告
}
})
}*/
/**
* 绑定穿山甲banner类型监听
......@@ -444,31 +444,31 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param bean
* @param ad
*/
// private fun bindBytedanceBannerAdListener(fragment: CampaignFragment, bean: JsBridgeBean, ad: TTNativeExpressAd) {//绑定穿山甲banner监听
// ad.setExpressInteractionListener(object : TTNativeExpressAd.ExpressAdInteractionListener {
// override fun onAdClicked(view: View, type: Int) {
// fragment.setBannerClick(bean.requestId)
// }
//
// override fun onAdShow(view: View, type: Int) {}
// override fun onRenderFail(view: View, msg: String, code: Int) {
// fragment.setBannerError(bean.requestId)
// }
//
// override fun onRenderSuccess(view: View, width: Float, height: Float) {
// fragment.setBannerExpose(bean.requestId)
// //在渲染成功回调时展示广告,提升体验
// bannerContainer?.removeAllViews()
// bannerContainer?.addView(view)
// }
// })
//
// //dislike设置
// bindDislike(fragment, bean, ad)
// if (ad.interactionType != TTAdConstant.INTERACTION_TYPE_DOWNLOAD) {
// return
// }
// }
/*private fun bindBytedanceBannerAdListener(fragment: CampaignFragment, bean: JsBridgeBean, ad: TTNativeExpressAd) {//绑定穿山甲banner监听
ad.setExpressInteractionListener(object : TTNativeExpressAd.ExpressAdInteractionListener {
override fun onAdClicked(view: View, type: Int) {
fragment.setBannerClick(bean.requestId)
}
override fun onAdShow(view: View, type: Int) {}
override fun onRenderFail(view: View, msg: String, code: Int) {
fragment.setBannerError(bean.requestId)
}
override fun onRenderSuccess(view: View, width: Float, height: Float) {
fragment.setBannerExpose(bean.requestId)
//在渲染成功回调时展示广告,提升体验
bannerContainer?.removeAllViews()
bannerContainer?.addView(view)
}
})
//dislike设置
bindDislike(fragment, bean, ad)
if (ad.interactionType != TTAdConstant.INTERACTION_TYPE_DOWNLOAD) {
return
}
}*/
/**
* 穿山甲banner广告关闭事件绑定
......@@ -476,34 +476,21 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
* @param bean
* @param ad
*/
// private fun bindDislike(fragment: CampaignFragment, bean: JsBridgeBean, ad: TTNativeExpressAd) {
//
// //使用默认个性化模板中默认dislike弹出样式
// ad.setDislikeCallback(this@XiaomanActivity, object : TTAdDislike.DislikeInteractionCallback {
// override fun onSelected(position: Int, value: String) {
// //用户选择不喜欢原因后,移除广告展示
// fragment.setBannerClose(bean.requestId)
// bannerContainer?.removeAllViews()
// }
//
// override fun onCancel() {}
// override fun onRefuse() {}
// })
// }
/*private fun bindDislike(fragment: CampaignFragment, bean: JsBridgeBean, ad: TTNativeExpressAd) {
override fun onBackPressed() {
if (campaignFragment != null) {
campaignFragment.backButtonClick(object : CampaignFragment.CallBack {
override fun onSuccess(jsonData: String) {
super@XiaomanActivity.onBackPressed()
//使用默认个性化模板中默认dislike弹出样式
ad.setDislikeCallback(this@XiaomanActivity, object : TTAdDislike.DislikeInteractionCallback {
override fun onSelected(position: Int, value: String) {
//用户选择不喜欢原因后,移除广告展示
fragment.setBannerClose(bean.requestId)
bannerContainer?.removeAllViews()
}
override fun onFailure(code: String, errmsg: String) {}
override fun onCancel() {}
override fun onRefuse() {}
})
} else {
super.onBackPressed()
}
}
}*/
/**
* 释放前一个 NativeExpressADData2 的资源
......@@ -534,4 +521,23 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
}
}
}
/* override fun onClick(v: View?) {
when (v?.id) {
R.id.iv_left_icon -> finish()
}
}*/
override fun onBackPressed() {
if (campaignFragment != null) {
campaignFragment.backButtonClick(object : CampaignFragment.CallBack {
override fun onSuccess(jsonData: String) {
super@XiaomanActivity.onBackPressed()
}
override fun onFailure(code: String, errmsg: String) {}
})
} else {
super.onBackPressed()
}
}
}
\ No newline at end of file
......@@ -216,8 +216,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
if (activity == null || requireActivity().isFinishing) {
return
}
LogUtil.d("GzhPresenter", "getHallBaseMsgSuc************************************")
// 公众号弹框
GzhDialogShow(data)
......@@ -326,7 +324,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 公众号弹出(判断)
*/
private fun GzhDialogShow(data: UserTaskMsgBean) {
LogUtil.d("GzhPresenter", "GzhDialogShow***************************************")
//用户 第二天打开应用并且非重新下载安装
if (data.isShowWechatTips && !ps.getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) {
gzhDialog()
......
......@@ -157,13 +157,10 @@ class MyFragment : BaseFragment(),
DownloadApkManager.tryOnceInstallApk()
if (!TextUtils.isEmpty(userManager.userID)) {
LogUtil.d("lixianshouyi", "用户已经登录........................")
myPresenter.getAutoUserHallBaseMsg()
refreshHighTask()
} else {
LogUtil.d("lixianshouyi", "用户还么有登录........................")
// 游客登录
myPresenter.userLogin()
}
......@@ -208,7 +205,6 @@ class MyFragment : BaseFragment(),
}
override fun getUserTaskMsgSuc(data: MyInfo?) {
LogUtil.d("lixianshouyi","getUserTaskMsgSuc.......................................")
srl_my.finishRefresh(true)
......@@ -228,7 +224,6 @@ class MyFragment : BaseFragment(),
}
override fun getUserTaskMsgFail() {
LogUtil.d("lixianshouyi","getUserTaskMsgFail.......................................")
srl_my.finishRefresh(false)
userConfig = null
......@@ -237,13 +232,9 @@ class MyFragment : BaseFragment(),
}
override fun getMyHotActivitySuc(data: BannerBean?) {
LogUtil.d("lixianshouyi","getMyHotActivitySuc.......................................")
if (activity != null && !requireActivity().isFinishing) {
data?.let {
/*if (it.ListBean().toUrl.equals(Constant.HOT_ACTIVITY_SHEEP)){
Log.d("MyFragment","*************************不是吧")
}*/
vp_grid.visibility = View.VISIBLE
hotList.clear()
hotList.addAll(it.list)
......@@ -258,6 +249,7 @@ class MyFragment : BaseFragment(),
for (i in 0..data.size - 1) {
if (data.get(i).toUrl.equals(Constant.HOT_ACTIVITY_SHEEP)) {
XmManager.loadMater(data.get(i).xmPlaceId)
LogUtil.d("clickOnLinster", "--------------------------剪羊毛曝光入口!")
break
}
}
......@@ -303,7 +295,6 @@ class MyFragment : BaseFragment(),
}
override fun getSignInHomePageMsgSuc(signBean: SignCardBean?) {
LogUtil.d("lixianshouyi","getSignInHomePageMsgSuc.......................................")
if (signBean == null) {
signCardBean = null
return
......@@ -315,7 +306,6 @@ class MyFragment : BaseFragment(),
}
override fun signInHomePageSuc() {
LogUtil.d("lixianshouyi","signInHomePageSuc.......................................")
val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, curSignCoin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_SIGNIN_HOMEPAGE_AWARD)
......@@ -324,7 +314,6 @@ class MyFragment : BaseFragment(),
//游客登陆成功
override fun userLoginSuc() {
LogUtil.d("lixianshouyi","userLoginSuc.......................................")
SceneManager.signIn(requireActivity())
myPresenter.getAutoUserHallBaseMsg()
......@@ -332,7 +321,6 @@ class MyFragment : BaseFragment(),
}
override fun getHallBaseMsgSuc(data: UserTaskMsgBean) {
LogUtil.d("lixianshouyi","getHallBaseMsgSuc.......................................")
if (requireActivity().isFinishing) {
return
}
......@@ -370,9 +358,6 @@ class MyFragment : BaseFragment(),
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_OFFLINE_DOUBLE)
readyGo(AwardActivity::class.java, bundle)
}
//添加判断如果是第二天登录则打开公众号界面
//点击后直接关闭
// gzhDialog()//公众号
}
}
......@@ -1030,6 +1015,7 @@ class MyFragment : BaseFragment(),
if (!TextUtils.isEmpty(hotBean.toUrl)) {
// 自有界面
when (hotBean.toUrl) {
//小满剪羊毛
Constant.HOT_ACTIVITY_SHEEP -> {
XmManager.exprotClick(hotBean.xmPlaceId)
val bundle = Bundle()
......
......@@ -19,6 +19,7 @@ import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.MokuManager
import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.manager.XmManager
import com.mints.goodmoney.mvp.model.ClickTurnBean
import com.mints.goodmoney.mvp.model.TurnBean
import com.mints.goodmoney.mvp.presenters.TurnTablePresenter
......@@ -53,12 +54,15 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
private var rope: YoYo.YoYoString? = null
// 转盘
private val firstColor = "#FF7C00"
private val secondColor = "#fbaa7e"
private var desList: MutableList<String> = ArrayList()
private var colorsArray: MutableList<Int> = ArrayList()
private var bitmapList: MutableList<Bitmap> = ArrayList()
// private val hotList: MutableList<BannerBean.ListBean> = mutableListOf()
private var isTurnTable = true
private var clickTurnData: ClickTurnBean? = null
private var turnTableData: TurnBean? = null
......@@ -251,6 +255,10 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
.append(data.surplus.toString()).setFontSize(BubbleUtils.dp2px(28)).setForegroundColor(ContextCompat.getColor(mContext, R.color.color_E72C2B))
.append("次机会").setForegroundColor(ContextCompat.getColor(mContext, R.color.black))
.create()
//上报小满placeid
uploadxmplaceid(turnTableData)
gvTurnTable.setAdapter(TurnTableAdapter(activity, data.bottoms))
Timer().schedule(1000) {
......@@ -260,6 +268,19 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
}
}
//上报小满
private fun uploadxmplaceid(turnTableData: TurnBean?) {
turnTableData?.let {
for (i in 0..turnTableData!!.bottoms.size - 1) {
if (it.bottoms.get(i).toOtherKey.equals("4")) {
XmManager.loadMater(turnTableData!!.bottoms.get(i).getparams().xmPlaceId)
LogUtil.d("clickOnLinster", "-------------------------------显示上报PlaceId----${turnTableData!!.bottoms.get(i).title}----${turnTableData!!.bottoms.get(i).getparams().xmPlaceId}")
break
}
}
}
}
private fun actionPageForType(toOtherKey: String, position: Int) {
if (!userManager.userIsLogin()) {
readyGo(WxLoginActivity::class.java)
......@@ -272,16 +293,20 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
shareArticle()
}
"1" -> {
LogUtil.d("clickOnLinster", "--------------------------1")
readyGo(TaskCpdActivity::class.java)
}
"2" -> {
/*"2" -> {
val bundle = Bundle()
bundle.putInt(Constant.WRAPPER_TYPE, Constant.WRAPPER_TYPE_FRIENDS)
readyGo(WrapperActivity::class.java, bundle)
}
}*/
"3" -> {
gotoMoku()
}
"4" -> {
showXiaoman()
}
}
turnTableData?.let {
......@@ -291,6 +316,23 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
}
}
/**
* 天天赚现金
*/
private fun showXiaoman(){
val bundle = Bundle()
//传入小满placeid
for (i in 0..turnTableData!!.bottoms.size - 1) {
if (turnTableData!!.bottoms.get(i).toOtherKey.equals("4")) {
XmManager.exprotClick(turnTableData!!.bottoms.get(i).getparams().xmPlaceId)
bundle.putString(Constant.ACTIVITY_TITLE, turnTableData!!.bottoms.get(i).title)
bundle.putString(Constant.ACTIVITY_ID, turnTableData!!.bottoms.get(i).getparams().xmPlaceId)
LogUtil.d("clickOnLinster", "--------------------天天赚现金点击上报-----------4----${turnTableData!!.bottoms.get(i).title}----${turnTableData!!.bottoms.get(i).getparams().xmPlaceId}")
break
}
}
readyGo(XiaomanActivity::class.java, bundle)
}
/**
* 分享文章
*/
......@@ -300,6 +342,9 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
readyGo(WrapperActivity::class.java, bundle)
}
/**
* 分红赚
*/
private fun gotoMoku() {
RxPermissions(requireActivity())
.request(Manifest.permission.READ_PHONE_STATE,
......
......@@ -86,6 +86,9 @@ allprojects {
}
//小满
maven { url "http://47.97.184.214:8081/nexus/content/groups/public" }
//芒果联盟
// maven { url "https://dl.bintray.com/openppeace/maven" }
}
}
......
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