Commit 5dd47928 authored by mengcuiguang's avatar mengcuiguang

代码优化

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