Commit 5dd47928 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 882d220d
...@@ -180,7 +180,7 @@ dependencies { ...@@ -180,7 +180,7 @@ dependencies {
// 三方接入 // 三方接入
// leakcanary // leakcanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4' // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
// 极光推送 // 极光推送
implementation 'cn.jiguang.sdk:jpush:3.6.6' implementation 'cn.jiguang.sdk:jpush:3.6.6'
implementation 'cn.jiguang.sdk:jcore:2.3.8' implementation 'cn.jiguang.sdk:jcore:2.3.8'
......
...@@ -23,6 +23,11 @@ public class AppConfig { ...@@ -23,6 +23,11 @@ public class AppConfig {
*/ */
public static boolean app_black_flag = false; public static boolean app_black_flag = false;
/**
* 趣步赚成功标记
*/
public static boolean scene_flag = false;
/** /**
* 先展示枫岚视频 * 先展示枫岚视频
*/ */
......
package com.mints.goodmoney.manager package com.mints.goodmoney.manager
import android.app.Activity
import android.text.TextUtils
import com.fly.scenemodule.SceneUtil import com.fly.scenemodule.SceneUtil
import com.fly.scenemodule.model.GDTInfo import com.fly.scenemodule.model.GDTInfo
import com.fly.scenemodule.model.TTInfo import com.fly.scenemodule.model.TTInfo
import com.mints.goodmoney.MintsApplication import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.common.AppConfig
/** /**
* 描述:聚乐云SDK * 描述:聚乐云SDK
...@@ -37,4 +40,14 @@ object SceneManager { ...@@ -37,4 +40,14 @@ object SceneManager {
gdtInfo.GDT_InteractionId = YlhAdManager.YLH_AD_INTERSTITIALAD_JULEYUN gdtInfo.GDT_InteractionId = YlhAdManager.YLH_AD_INTERSTITIALAD_JULEYUN
SceneUtil.initGDTConfig(gdtInfo) SceneUtil.initGDTConfig(gdtInfo)
} }
/**
* 账号同步
*/
fun signIn(activity: Activity) {
if (!TextUtils.isEmpty(UserManager.getInstance().userID)) {
SceneUtil.signIn(activity, SCENE_CHANNEL_Id, UserManager.getInstance().userID, MintsApplication.OAID)
AppConfig.scene_flag = true
}
}
} }
\ No newline at end of file
...@@ -269,13 +269,14 @@ class DrawcashActivity : BaseActivity(), ...@@ -269,13 +269,14 @@ class DrawcashActivity : BaseActivity(),
* 设置视频权重 * 设置视频权重
*/ */
private fun initAdWeight(data: DrawcashBean.VedioRules) { private fun initAdWeight(data: DrawcashBean.VedioRules) {
// vedioAdingManager?.initAdWeight(data.csJ_VEDIO, data.ylH_VEDIO, data.sdhZ_VEDIO, data.fL_VEDIO) vedioAdingManager?.initAdWeight(data.csJ_VEDIO, data.ylH_VEDIO, data.sdhZ_VEDIO, data.fL_VEDIO)
vedioAdingManager?.initAdWeight(data.csJ_VEDIO, data.ylH_VEDIO, data.sdhZ_VEDIO) // vedioAdingManager?.initAdWeight(data.csJ_VEDIO, data.ylH_VEDIO, data.sdhZ_VEDIO)
LogUtil.d(TAG, "提现权重值:csjWeight:${data.csJ_VEDIO} ylhWeight:${data.ylH_VEDIO} sdhzWeight:${data.sdhZ_VEDIO}") LogUtil.d(TAG, "提现权重值:csjWeight:${data.csJ_VEDIO} ylhWeight:${data.ylH_VEDIO} sdhzWeight:${data.sdhZ_VEDIO} flWeight:${data.fL_VEDIO}")
// 广告视频数 // 广告视频数
AppConfig.csjVedioAdCount = 10 AppConfig.csjVedioAdCount = 10
AppConfig.ylhAdCount = 10 AppConfig.ylhAdCount = 10
AppConfig.wnVedioAdCount = 10 AppConfig.wnVedioAdCount = 10
AppConfig.flVedioAdCount = 10
} }
/** /**
......
package com.mints.goodmoney.ui.fragment package com.mints.goodmoney.ui.fragment
import android.Manifest
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.ClipData import android.content.ClipData
import android.content.ClipboardManager import android.content.ClipboardManager
...@@ -9,6 +10,7 @@ import android.text.TextUtils ...@@ -9,6 +10,7 @@ import android.text.TextUtils
import android.view.View import android.view.View
import android.widget.AdapterView import android.widget.AdapterView
import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.DividerItemDecoration
import cn.sharesdk.wechat.friends.Wechat
import com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open import com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import com.fly.scenemodule.SceneUtil import com.fly.scenemodule.SceneUtil
import com.mints.goodmoney.BuildConfig import com.mints.goodmoney.BuildConfig
...@@ -39,6 +41,7 @@ import com.mints.library.utils.GlideUtils ...@@ -39,6 +41,7 @@ import com.mints.library.utils.GlideUtils
import com.mints.library.utils.nodoubleclick.AntiShake import com.mints.library.utils.nodoubleclick.AntiShake
import com.scwang.smartrefresh.layout.api.RefreshLayout import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import com.tbruyelle.rxpermissions.RxPermissions
import kotlinx.android.synthetic.main.fragment_main_my.* import kotlinx.android.synthetic.main.fragment_main_my.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
import kotlinx.android.synthetic.main.item_fragment_main_my_clock.* import kotlinx.android.synthetic.main.item_fragment_main_my_clock.*
...@@ -642,16 +645,54 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi ...@@ -642,16 +645,54 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
// 消费变现猫事件 // 消费变现猫事件
} }
Constant.HOT_ACTIVITY_CAICY -> { Constant.HOT_ACTIVITY_CAICY -> {
// 猜成语 RxPermissions(requireActivity())
SceneUtil.cCy(requireActivity()) .request(Manifest.permission.READ_PHONE_STATE)
.subscribe { granted: Boolean ->
if (granted) {
if (AppConfig.scene_flag) {
// 猜成语
SceneUtil.cCy(requireActivity())
} else {
SceneManager.signIn(requireActivity())
}
} else {
showMissingPermissionDialog("设备")
}
}
} }
Constant.HOT_ACTIVITY_DATI -> { Constant.HOT_ACTIVITY_DATI -> {
// 答题 RxPermissions(requireActivity())
SceneUtil.daTi(requireActivity()) .request(Manifest.permission.READ_PHONE_STATE)
.subscribe { granted: Boolean ->
if (granted) {
if (AppConfig.scene_flag) {
// 答题
SceneUtil.daTi(requireActivity())
} else {
SceneManager.signIn(requireActivity())
}
} else {
showMissingPermissionDialog("设备")
}
}
} }
Constant.HOT_ACTIVITY_SCRAPPAGE -> { Constant.HOT_ACTIVITY_SCRAPPAGE -> {
// 刮刮乐 RxPermissions(requireActivity())
SceneUtil.scrapPage(requireActivity()) .request(Manifest.permission.READ_PHONE_STATE)
.subscribe { granted: Boolean ->
if (granted) {
if (AppConfig.scene_flag) {
// 刮刮乐
SceneUtil.scrapPage(requireActivity())
} else {
SceneManager.signIn(requireActivity())
}
} else {
showMissingPermissionDialog("设备")
}
}
} }
Constant.HOT_ACTIVITY_BOOK -> { Constant.HOT_ACTIVITY_BOOK -> {
// 小说 // 小说
...@@ -858,8 +899,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi ...@@ -858,8 +899,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
// 聚乐云初始化 // 聚乐云初始化
SceneManager.initScene() SceneManager.initScene()
// 同步账户
SceneUtil.signIn(requireActivity(), SceneManager.SCENE_CHANNEL_Id, userManager.userID, MintsApplication.OAID)
} }
private fun initView() { private fun initView() {
......
...@@ -94,11 +94,6 @@ public class AESUtils { ...@@ -94,11 +94,6 @@ public class AESUtils {
// System.out.println("decrypted message is below :"); // System.out.println("decrypted message is below :");
// System.out.println(MD5.GetMD5Code("meijie_2016").substring(8, 24)); // System.out.println(MD5.GetMD5Code("meijie_2016").substring(8, 24));
System.out.println(detrypt("5EBue8TMfYS2P8YAZUyJUKnYvTVEblnJMwC00vC1yZHjvqq6Ws4TeaXQ+7l+iwdzoQNi2yJ9CLrG\n" + System.out.println(MD5.GetMD5Code("goodmoney_2020").substring(8, 24));
"cfQlCjaAbr5gmLokexHida7yLofB7V5ItaxTGlXyxK3CH+Wr/lvbWKmP8YROCrtzrreqP8svuf0M\n" +
"AzKbOnPhoURvpfVS5di/dk3chtujIqC74xd5XpLJfHiXQadEX+12zq+IXa0xIWezTHjL6cJBTN6y\n" +
"xg5w6+ey7EYzEdJ118HaSTr1tLu7AkxguXJez9QxhB9nifRBvgl7tlY0oL20+yGGZ3WgR/CmWh9u\n" +
"PjEy0eB3NgmNd8SRmImXDYOQDMJqxa5AUMKjQkQ/NmrDLBdRO+9zy5Ujv7YL1KVoUmmxeH5EVPZR\n" +
"nV+E", "abcdnnnnnn123456"));
} }
} }
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