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 {
......
......@@ -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