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

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

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