Commit 7d36ccc6 authored by jyx's avatar jyx

代码优化

parent a134d7e4
......@@ -224,10 +224,10 @@ dependencies {
// 数美
implementation files('libs/smantifraud.aar')
// 鱼丸盒子
implementation(name: 'xzzq_ywsdk_1.1.0', ext: 'aar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.0"
implementation 'com.liulishuo.filedownloader:library:1.7.7'
implementation "org.greenrobot:eventbus:3.1.0-RC"
// implementation(name: 'xzzq_ywsdk_1.1.0', ext: 'aar')
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.0"
// implementation 'com.liulishuo.filedownloader:library:1.7.7'
// implementation "org.greenrobot:eventbus:3.1.0-RC"
// 变现猫
// implementation(name: 'bxmsdk-release-3.3.1', ext: 'aar')
// 闪电盒子
......
......@@ -299,15 +299,15 @@
</provider>
<!-- 鱼丸盒子广告 -->
<provider
android:name="com.component.dly.xzzq_ywsdk.YwFileProvider"
android:authorities="${applicationId}.YwFileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/ywsdk_file_paths" />
</provider>
<!-- <provider-->
<!-- android:name="com.component.dly.xzzq_ywsdk.YwFileProvider"-->
<!-- android:authorities="${applicationId}.YwFileProvider"-->
<!-- android:exported="false"-->
<!-- android:grantUriPermissions="true">-->
<!-- <meta-data-->
<!-- android:name="android.support.FILE_PROVIDER_PATHS"-->
<!-- android:resource="@xml/ywsdk_file_paths" />-->
<!-- </provider>-->
<!-- 穿山甲广告 -->
<provider
......
//package com.wenshu.youyou.manager
//
//import android.app.Application
//import com.maplehaze.adsdk.MaplehazeSDK
//
///**
// * 描述:枫岚激励视频
// * 作者:孟崔广
// */
//object MhManager {
//
// const val APP_ID = ""
// const val POS_ID = ""
//
// /**
// * 初始化
// */
// fun initWn(application: Application) {
// MaplehazeSDK.init(application)
// }
//}
\ No newline at end of file
package com.wenshu.youyou.manager
import android.app.Application
import com.maplehaze.adsdk.MaplehazeSDK
/**
* 描述:枫岚激励视频
* 作者:孟崔广
*/
object MhManager {
const val APP_ID = ""
const val POS_ID = ""
/**
* 初始化
*/
fun initWn(application: Application) {
MaplehazeSDK.init(application)
}
}
\ No newline at end of file
package com.wenshu.youyou.manager
import android.app.Application
import android.os.Build
import android.text.TextUtils
import com.component.dly.xzzq_ywsdk.YwSDK.Companion.init
import com.component.dly.xzzq_ywsdk.YwSDK.Companion.setDebugMode
import com.wenshu.youyou.BuildConfig
import com.wenshu.youyou.wenshuApplication
/**
* 描述:鱼丸盒子游戏
* 作者:孟崔广
*/
object YwhzManager {
private const val APPID_DEBUG = ""
private const val APPSECRET_DEBUG = ""
private const val APPID_RELEASE = ""
private const val APPSECRET_RELEASE = ""
fun init(application: Application) {
val userManager = UserManager.getInstance()
var userID = userManager.userID
if (!userManager.userIsLogin() || TextUtils.isEmpty(userID)) {
// 用户id为空 或 未登录 = 游客
userID = "0"
}
val appid: String
val appSecret: String
if (BuildConfig.DEBUG) {
appid = APPID_DEBUG
appSecret = APPSECRET_DEBUG
} else {
appid = APPID_RELEASE
appSecret = APPSECRET_RELEASE
}
var oaid: String = ""
if (Build.VERSION.SDK_INT > 28) {
if (!TextUtils.isEmpty(wenshuApplication.OAID)) {
oaid = wenshuApplication.OAID
}
}
setDebugMode()
init(application, appSecret, appid, userID, "1", oaid)
}
}
\ No newline at end of file
//package com.wenshu.youyou.manager
//
//import android.app.Application
//import android.os.Build
//import android.text.TextUtils
//import com.component.dly.xzzq_ywsdk.YwSDK.Companion.setDebugMode
//import com.wenshu.youyou.BuildConfig
//import com.wenshu.youyou.wenshuApplication
//
///**
// * 描述:鱼丸盒子游戏
// * 作者:孟崔广
// */
//object YwhzManager {
//
// private const val APPID_DEBUG = ""
// private const val APPSECRET_DEBUG = ""
//
// private const val APPID_RELEASE = ""
// private const val APPSECRET_RELEASE = ""
//
// fun init(application: Application) {
// val userManager = UserManager.getInstance()
// var userID = userManager.userID
// if (!userManager.userIsLogin() || TextUtils.isEmpty(userID)) {
// // 用户id为空 或 未登录 = 游客
// userID = "0"
// }
//
// val appid: String
// val appSecret: String
// if (BuildConfig.DEBUG) {
// appid = APPID_DEBUG
// appSecret = APPSECRET_DEBUG
// } else {
// appid = APPID_RELEASE
// appSecret = APPSECRET_RELEASE
// }
// var oaid: String = ""
// if (Build.VERSION.SDK_INT > 28) {
// if (!TextUtils.isEmpty(wenshuApplication.OAID)) {
// oaid = wenshuApplication.OAID
// }
// }
// setDebugMode()
// init(application, appSecret, appid, userID, "1", oaid)
// }
//}
\ No newline at end of file
......@@ -90,11 +90,11 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
}
override fun loginSuc() {
try {
// 登录成功初始化鱼玩盒子userid
YwhzManager.init(baseApplication)
} catch (e: Exception) {
}
// try {
// // 登录成功初始化鱼玩盒子userid
// YwhzManager.init(baseApplication)
// } catch (e: Exception) {
// }
// 每日任务是否刷新任务数
TrackManager.getInstance().innerApp()
......
......@@ -15,9 +15,7 @@ import com.wenshu.youyou.common.Constant
import com.wenshu.youyou.login.LoginApi
import com.wenshu.youyou.login.OnLoginListener
import com.wenshu.youyou.manager.RsNewsManager
//import com.wenshu.youyou.manager.SceneManager
import com.wenshu.youyou.manager.TrackManager
import com.wenshu.youyou.manager.YwhzManager
import com.wenshu.youyou.mvp.model.WXInfo
import com.wenshu.youyou.mvp.presenters.LoginPresenter
import com.wenshu.youyou.mvp.views.LoginView
......@@ -116,16 +114,15 @@ class WxLoginActivity : BaseActivity()
}
override fun loginSuc() {
try {
// 登录成功初始化鱼玩盒子userid
YwhzManager.init(baseApplication)
} catch (e: Exception) {
}
// try {
// // 登录成功初始化鱼玩盒子userid
// YwhzManager.init(baseApplication)
// } catch (e: Exception) {
// }
// 每日任务是否刷新任务数
TrackManager.getInstance().innerApp()
// SceneManager.signIn(this)
RsNewsManager.init(baseApplication)
showToast("登录成功")
......
......@@ -3,7 +3,6 @@ package com.wenshu.youyou.ui.fragment
import android.os.Bundle
import android.text.TextUtils
import android.webkit.WebChromeClient
import com.component.dly.xzzq_ywsdk.YwSDK_WebActivity
import com.github.lzyzsd.jsbridge.CallBackFunction
import com.github.lzyzsd.jsbridge.DefaultHandler
import com.wenshu.youyou.BuildConfig
......@@ -11,7 +10,6 @@ import com.wenshu.youyou.R
import com.wenshu.youyou.common.AppConfig
import com.wenshu.youyou.common.Constant
import com.wenshu.youyou.manager.UserManager
import com.wenshu.youyou.manager.YwhzManager
import com.wenshu.youyou.mvp.model.PanActionInfo
import com.wenshu.youyou.mvp.model.TurntableBean
import com.wenshu.youyou.mvp.presenters.PanPresenter
......@@ -37,12 +35,12 @@ class PanFragment : BaseFragment(), PanView {
override fun initViewsAndEvents() {
panPresenter.attachView(this)
if (!TextUtils.isEmpty(userManager.userID)) {
// 登录成功的用户初始化鱼丸盒子
if (userManager.userIsLogin()) {
YwhzManager.init(baseApplication)
}
}
// if (!TextUtils.isEmpty(userManager.userID)) {
// // 登录成功的用户初始化鱼丸盒子
// if (userManager.userIsLogin()) {
// YwhzManager.init(baseApplication)
// }
// }
}
override fun onHiddenChanged(hidden: Boolean) {
......@@ -151,7 +149,7 @@ class PanFragment : BaseFragment(), PanView {
}
try {
activity?.let { YwSDK_WebActivity.open(it) }
// activity?.let { YwSDK_WebActivity.open(it) }
} catch (e: Exception) {
e.printStackTrace()
showToast("请重新退出账号登录")
......
......@@ -13,6 +13,7 @@ import androidx.multidex.MultiDexApplication;
import com.hjq.toast.ToastUtils;
import com.wenshu.youyou.common.Constant;
import com.wenshu.youyou.manager.KsManager;
import com.wenshu.youyou.manager.MhManager;
import com.wenshu.youyou.manager.MiitHelper;
import com.wenshu.youyou.manager.TtCsjAdManager;
import com.wenshu.youyou.manager.TzManager;
......@@ -125,10 +126,10 @@ public class wenshuApplication extends MultiDexApplication {
// MhManager.INSTANCE.initWn(this);
// 天卓珊瑚
TzManager.INSTANCE.initTz(this);
// TzManager.INSTANCE.initTz(this);
// 一览视频
YlVideoManager.INSTANCE.init(this);
// YlVideoManager.INSTANCE.init(this);
// 瑞狮新闻
// RsNewsManager.INSTANCE.initX5Environment(this);
......
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