Commit 311f61d7 authored by mengcuiguang's avatar mengcuiguang

添加ywhz等

parent c1d4be40
......@@ -219,6 +219,11 @@ dependencies {
implementation(name: 'x5fit-2.0.3', ext: 'aar')
implementation(name: 'gdtfit-2.0.3', ext: 'aar')
implementation files("libs/qq_x5.jar")
// 鱼丸盒子
implementation(name: 'xzzq_ywsdk_1.1.0', ext: 'aar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41"
implementation 'com.liulishuo.filedownloader:library:1.7.7'
implementation "org.greenrobot:eventbus:3.1.0-RC"
testImplementation 'junit:junit:4.12'
......
......@@ -295,18 +295,6 @@
# ===================== JZVedio START ================
-keep public class cn.jzvd.JZMediaSystem {*; }
-keep public class cn.jzvd.demo.CustomMedia.CustomMedia {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaIjk {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaSystemAssertFolder {*; }
-keep class tv.danmaku.ijk.media.player.** {*; }
-dontwarn tv.danmaku.ijk.media.player.*
-keep interface tv.danmaku.ijk.media.player.** { *; }
# ======================= JZVedio END ================
# ===================== umeng START ================
-keep class com.umeng.** {*;}
-keepclassmembers class * {
......
......@@ -210,6 +210,17 @@
android:authorities="${applicationId}.TTMultiProvider"
android:exported="false" />
<!-- 鱼丸盒子广告 -->
<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.bytedance.sdk.openadsdk.TTFileProvider"
......
......@@ -4,22 +4,17 @@ import android.app.IntentService
import android.app.Notification
import android.content.Context
import android.content.Intent
import android.text.TextUtils
import cn.jpush.android.api.BasicPushNotificationBuilder
import cn.jpush.android.api.JPushInterface
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.OaidManager
import com.mints.goodmoney.manager.ShumeiManager
import com.mints.library.utils.CommonUtils
import com.mob.MobSDK
import com.orhanobut.logger.*
import com.orhanobut.logger.AndroidLogAdapter
import com.orhanobut.logger.FormatStrategy
import com.orhanobut.logger.Logger
import com.orhanobut.logger.PrettyFormatStrategy
import com.tendcloud.tenddata.TCAgent
import com.umeng.commonsdk.UMConfigure
import com.yilan.sdk.ui.YLUIInit
import com.yilan.sdk.ui.configs.CommentConfig
import com.yilan.sdk.ui.configs.FeedConfig
import com.yilan.sdk.ui.configs.YLUIConfig
import net.grandcentrix.tray.AppPreferences
/**
* 子线程初始化SDK
......@@ -40,7 +35,6 @@ class InitAppService : IntentService("InitializeService") {
}
}
private val ps by lazy { AppPreferences(this) }
private var isInit: Boolean = false
override fun onHandleIntent(intent: Intent?) {
......@@ -60,9 +54,6 @@ class InitAppService : IntentService("InitializeService") {
* 子线程进行初始化SDK操作
*/
private fun initApplication() {
// 移动安全联盟 oaid
initMsaMdid()
// TalkingData数据埋点与错误日志
TalkingDataConfig()
......@@ -85,23 +76,6 @@ class InitAppService : IntentService("InitializeService") {
initJpush()
}
/**
* 移动安全联盟 oaid
*/
private fun initMsaMdid() {
try {
if (TextUtils.isEmpty(ps.getString(Constant.OAID, ""))) {
OaidManager(object : OaidManager.AppIdsUpdater {
override fun OnIdsAvalid(oaid: String) {
ps.put(Constant.OAID, oaid)
}
}).InitSdk(this)
}
} catch (e: Exception) {
e.printStackTrace()
}
}
/**
* 设置TalkingData
*/
......
......@@ -2,6 +2,7 @@ package com.mints.goodmoney;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.text.TextUtils;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
......@@ -9,18 +10,27 @@ import androidx.multidex.MultiDex;
import androidx.multidex.MultiDexApplication;
import com.bun.miitmdid.core.JLibrary;
import com.component.dly.xzzq_ywsdk.YwSDK;
import com.mints.goodmoney.manager.OaidManager;
import com.mints.goodmoney.manager.TtCsjAdManager;
import com.mints.goodmoney.manager.UserManager;
import com.mints.goodmoney.manager.YlhAdManager;
import com.mints.goodmoney.utils.LogUtil;
import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.net.LoanService;
import com.mints.goodmoney.utils.ForegroundOrBackground;
import com.mints.goodmoney.utils.SystemUtils;
import com.mints.goodmoney.utils.rxutil.CommonRxTask;
import com.mints.goodmoney.utils.rxutil.RxjavaUtil;
import com.yilan.sdk.ui.YLUIInit;
import com.yilan.sdk.ui.configs.CommentConfig;
import com.yilan.sdk.ui.configs.FeedConfig;
import com.yilan.sdk.ui.configs.YLUIConfig;
import net.grandcentrix.tray.AppPreferences;
import org.jetbrains.annotations.NotNull;
import rx.Scheduler;
import rx.schedulers.Schedulers;
......@@ -32,9 +42,11 @@ import rx.schedulers.Schedulers;
public class MintsApplication extends MultiDexApplication {
private static Context mContext;
public static String OAID = "";
private static LocalBroadcastManager mLocalBroadcatManager;
private Scheduler defaultSubscribeScheduler;
private LoanService loanService;
public static Context getContext() {
......@@ -74,6 +86,9 @@ public class MintsApplication extends MultiDexApplication {
* 三方配置
*/
private void thirdConfig() {
// 移动安全联盟 oaid
initOaid();
// 子线程初始化三方SDK
String processName = SystemUtils.INSTANCE.getProcessName(this, android.os.Process.myPid());
if (processName != null) {
......@@ -92,6 +107,26 @@ public class MintsApplication extends MultiDexApplication {
// 一览视频
initYL();
// 鱼丸盒子
// initYwhz();
}
/**
* 移动安装联盟 获取OAID等设备标识符
*/
private void initOaid() {
try {
new OaidManager(new OaidManager.AppIdsUpdater() {
@Override
public void OnIdsAvalid(@NotNull String ids) {
OAID = ids;
}
}).InitSdk(this);
} catch (Exception e) {
e.printStackTrace();
LogUtil.e(e);
}
}
/**
......@@ -134,6 +169,64 @@ public class MintsApplication extends MultiDexApplication {
FeedConfig.getInstance().setPlayerStyle(FeedConfig.STYLE_NATIVE); //FeedConfig.STYLE_STYLE_FEED_PLAY当前页面播放
}
/**
* 鱼丸盒子
*/
private void initYwhz() {
if (UserManager.getInstance().userIsLogin()) {
if (Build.VERSION.SDK_INT > 28) {
// android10 延迟加载 因为获取不到oaid
RxjavaUtil.executeRxTask(new CommonRxTask<String>("") {
@Override
public void doInIOThread() {
try {
Thread.sleep(1500);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
@Override
public void doInUIThread() {
initYwSdk();
}
});
} else {
initYwSdk();
}
}
}
/**
* 鱼丸盒子
*/
public void initYwSdk() {
UserManager userManager = UserManager.getInstance();
String userID = userManager.getUserID();
if (!userManager.userIsLogin() || TextUtils.isEmpty(userID)) {
// 用户id为空 或 未登录 = 游客
userID = "0";
}
String appid = "";
String appSecret = "";
if (BuildConfig.DEBUG) {
appid = "1725";
appSecret = "0yzizbqwyjt104gsdukmto53qclo9ljs";
} else {
appid = "1726";
appSecret = "g4fuod79v6e7cw4liw91iwfm5qryvz1u";
}
String oaid = "";
if (Build.VERSION.SDK_INT > 28) {
oaid = OAID;
}
YwSDK.Companion.setDebugMode();
YwSDK.Companion.init(this, appSecret, appid, userID, "1", oaid);
}
/**
* app退出
*/
......
......@@ -14,14 +14,10 @@ public class AppConfig {
public static boolean app_updateing = false;
/**
* 默认的屏蔽宽度
*/
public static float design_width = 750;
/**
* app应用首页 0-主页 1-position 2-我
* app应用首页 0-主页 1-大转盘 2-邀请好友 3-我
*/
public static int fragmentClickFlag = 0;
// public static int fragmentClickFlag = 1;
/**
* ylh 剩余广告播放数
......@@ -35,28 +31,5 @@ public class AppConfig {
* csjVedio 剩余广告播放数
*/
public static int csjVedioAdCount = 5;
/**
* mintegralVedio 剩余广告播放数
*/
public static int mintegralAdCount = 0;
/**
* shanhuVedio 剩余广告播放数
*/
public static int shanhuAdCount = 0;
/**
* hytechVedio 剩余广告播放数
*/
public static int hytechVedioAdCount = 0;
/**
* 创神 剩余广告播放数
*/
public static int chuangshenVedioAdCount = 0;
/**
* 多盟 剩余广告播放数
*/
public static int duomentVedioAdCount = 0;
/**
* 多盟 剩余广告播放数
*/
public static int sdhzVedioAdCount = 0;
}
......@@ -53,11 +53,6 @@ object Constant {
*/
var ICASH_PATH = Environment.getExternalStorageDirectory().path + "/money/" + "apk/"
/**
* oaid
*/
const val OAID = "device_oaid"
/**
* app应用首页 0-主页 1-pan 2-friends 3-我
*/
......
......@@ -2,6 +2,7 @@ package com.mints.goodmoney.mvp.presenters;
import android.text.TextUtils;
import com.mints.goodmoney.MintsApplication;
import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.common.DeviceInfo;
import com.mints.goodmoney.manager.AppHttpManager;
......@@ -115,7 +116,7 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
/**
* 提交设备信息
*/
public void saveTerminalInfo(AppPreferences ps, double curCash) {
public void saveTerminalInfo( double curCash) {
view.showLoading("加载中...");
HashMap<String, Object> vo = new HashMap<>();
......@@ -135,7 +136,7 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
vo.put("uuid", new DeviceUuidFactory().getDeviceUuid());
vo.put("osversion", deviceInfo.getOSVersion());
vo.put("appversion", deviceInfo.getVersionName());
vo.put("oaid", ps.getString(Constant.OAID,""));
vo.put("oaid", MintsApplication.OAID);
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
......
package com.mints.goodmoney.mvp.presenters
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.common.DeviceInfo
import com.mints.goodmoney.manager.AppHttpManager
......@@ -30,7 +31,7 @@ class HomePresenter : BasePresenter<HomeView>() {
vo["mac1"] = macAddress
vo["androidid"] = deviceInfo.getAndroidId(null)
vo["imei"] = deviceInfo.iMEI
vo["oaid"] = ps.getString(Constant.OAID, "")!!
vo["oaid"] = MintsApplication.OAID
vo["os"] = "android"
vo["model"] = deviceInfo.brand + " " + deviceInfo.mobileModel
vo["uuid"] = DeviceUuidFactory().deviceUuid
......@@ -141,7 +142,7 @@ class HomePresenter : BasePresenter<HomeView>() {
/**
* 游客登录
*/
fun userLogin(ps: AppPreferences) {
fun userLogin() {
val vo = HashMap<String, Any>()
vo["device"] = DeviceUuidFactory().deviceUuid.toString()
AppHttpManager.getInstance(loanApplication)
......@@ -160,7 +161,7 @@ class HomePresenter : BasePresenter<HomeView>() {
when (code) {
200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo(ps)
saveTerminalInfo()
}
else -> view.showToast(message)
}
......@@ -173,7 +174,7 @@ class HomePresenter : BasePresenter<HomeView>() {
*
* @param context
*/
fun saveTerminalInfo(ps: AppPreferences) {
fun saveTerminalInfo() {
val vo = HashMap<String, Any>()
val deviceInfo: DeviceInfo = DeviceInfo.instance
val macAddress: String = deviceInfo.getMacAddress()
......@@ -182,7 +183,7 @@ class HomePresenter : BasePresenter<HomeView>() {
vo["mac1"] = macAddress
vo["androidid"] = deviceInfo.getAndroidId(null)
vo["imei"] = deviceInfo.iMEI
vo["oaid"] = ps.getString(Constant.OAID, "")!!
vo["oaid"] = MintsApplication.OAID
vo["os"] = "android"
vo["model"] = deviceInfo.brand + " " + deviceInfo.mobileModel
vo["uuid"] = DeviceUuidFactory().deviceUuid
......
package com.mints.goodmoney.mvp.presenters
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.common.DeviceInfo
import com.mints.goodmoney.manager.AppHttpManager
......@@ -97,7 +98,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
/**
* 登录
*/
fun login(mobile: String, smsCode: String, ps: AppPreferences) {
fun login(mobile: String, smsCode: String) {
view.showLoading("加载中...")
val vo = HashMap<String, Any>()
vo["mobile"] = mobile
......@@ -125,7 +126,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
when (code) {
200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo(ps,data.consumer.pk_id)
saveTerminalInfo(data.consumer.pk_id)
view.loginSuc()
}
else -> view.showToast(message)
......@@ -137,7 +138,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
/**
* 微信登录
*/
fun login(ps: AppPreferences,wxInfo: String) {
fun login(wxInfo: String) {
view.showLoading("加载中...")
val vo = HashMap<String, Any>()
vo["shumeiId"] = ShumeiManager.getInstance().shumeiDeviceId
......@@ -165,7 +166,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
when (code) {
200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo(ps,data.consumer.pk_id)
saveTerminalInfo(data.consumer.pk_id)
view.loginSuc()
}
else -> view.showToast(message)
......@@ -179,7 +180,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
*
* @param context
*/
fun saveTerminalInfo(ps: AppPreferences,userId:Long) {
fun saveTerminalInfo(userId:Long) {
val vo = HashMap<String, Any>()
val deviceInfo: DeviceInfo = DeviceInfo.instance
val macAddress: String = deviceInfo.getMacAddress()
......@@ -188,7 +189,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
vo["mac1"] = macAddress
vo["androidid"] = deviceInfo.getAndroidId(null)
vo["imei"] = deviceInfo.iMEI
vo["oaid"] = ps.getString(Constant.OAID, "")!!
vo["oaid"] = MintsApplication.OAID
vo["os"] = "android"
vo["model"] = deviceInfo.brand + " " + deviceInfo.mobileModel
vo["uuid"] = DeviceUuidFactory().deviceUuid
......
package com.mints.goodmoney.mvp.presenters
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.common.DeviceInfo
import com.mints.goodmoney.manager.AppHttpManager
......@@ -152,7 +153,7 @@ class MyPresenter : BasePresenter<MyView>() {
/**
* 游客登录
*/
fun userLogin(ps: AppPreferences) {
fun userLogin() {
val vo = HashMap<String, Any>()
vo["device"] = DeviceUuidFactory().deviceUuid.toString()
AppHttpManager.getInstance(loanApplication)
......@@ -171,7 +172,7 @@ class MyPresenter : BasePresenter<MyView>() {
when (code) {
200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo(ps)
saveTerminalInfo()
}
else -> view.showToast(message)
}
......@@ -184,7 +185,7 @@ class MyPresenter : BasePresenter<MyView>() {
*
* @param context
*/
fun saveTerminalInfo(ps: AppPreferences) {
fun saveTerminalInfo() {
val vo = HashMap<String, Any>()
val deviceInfo: DeviceInfo = DeviceInfo.instance
val macAddress: String = deviceInfo.getMacAddress()
......@@ -193,7 +194,7 @@ class MyPresenter : BasePresenter<MyView>() {
vo["mac1"] = macAddress
vo["androidid"] = deviceInfo.getAndroidId(null)
vo["imei"] = deviceInfo.iMEI
vo["oaid"] = ps.getString(Constant.OAID, "")!!
vo["oaid"] = MintsApplication.OAID
vo["os"] = "android"
vo["model"] = deviceInfo.brand + " " + deviceInfo.mobileModel
vo["uuid"] = DeviceUuidFactory().deviceUuid
......
......@@ -2,6 +2,7 @@ package com.mints.goodmoney.mvp.presenters
import android.content.Context
import android.text.TextUtils
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.common.DeviceInfo
import com.mints.library.net.neterror.BaseSubscriber
......@@ -21,7 +22,7 @@ class PanPresenter : BasePresenter<PanView>() {
/**
* 游客登录
*/
fun userLogin(ps: AppPreferences) {
fun userLogin() {
val vo = HashMap<String, Any>()
vo["device"] = DeviceUuidFactory().deviceUuid.toString()
AppHttpManager.getInstance(loanApplication)
......@@ -40,7 +41,7 @@ class PanPresenter : BasePresenter<PanView>() {
when (code) {
200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo(ps)
saveTerminalInfo()
}
else -> view.showToast(message)
}
......@@ -53,7 +54,7 @@ class PanPresenter : BasePresenter<PanView>() {
*
* @param context
*/
fun saveTerminalInfo(ps: AppPreferences) {
fun saveTerminalInfo() {
val vo = HashMap<String, Any>()
val deviceInfo: DeviceInfo = DeviceInfo.instance
val macAddress: String = deviceInfo.getMacAddress()
......@@ -62,7 +63,7 @@ class PanPresenter : BasePresenter<PanView>() {
vo["mac1"] = macAddress
vo["androidid"] = deviceInfo.getAndroidId(null)
vo["imei"] = deviceInfo.iMEI
vo["oaid"] = ps.getString(Constant.OAID,"")!!
vo["oaid"] = MintsApplication.OAID
vo["os"] = "android"
vo["model"] = deviceInfo.brand + " " + deviceInfo.mobileModel
vo["uuid"] = DeviceUuidFactory().deviceUuid
......
......@@ -35,7 +35,6 @@ class DrawcashActivity : BaseActivity(),
DrawcashView, View.OnClickListener, OnItemClickListener, OnLoginListener {
private val drawcashPresenter by lazy { DrawcashPresenter() }
private val ps by lazy { AppPreferences(context) }
private val userManager by lazy { UserManager.getInstance() }
private val loginApi by lazy { LoginApi() }
private lateinit var drawcashAdapter: DrawcashAdapter
......@@ -142,7 +141,7 @@ class DrawcashActivity : BaseActivity(),
return
}
drawcashPresenter.saveTerminalInfo(ps, priceList!![drawcashAdapter.getPosition()].money)
drawcashPresenter.saveTerminalInfo( priceList!![drawcashAdapter?.getPosition()].money)
}
}
}
......
......@@ -22,7 +22,7 @@ import com.mints.library.utils.nodoubleclick.AntiShake
import com.tbruyelle.rxpermissions.RxPermissions
import kotlinx.android.synthetic.main.activity_login.*
import net.grandcentrix.tray.AppPreferences
import java.util.HashMap
import java.util.*
/**
* 描述:登录
......@@ -33,7 +33,6 @@ class LoginActivity : BaseActivity()
, LoginView, View.OnClickListener, OnLoginListener {
private val loginPresenter by lazy { LoginPresenter() }
private val ps by lazy { AppPreferences(this) }
private val loginApi by lazy { LoginApi() }
private var mobile: String? = null
......@@ -114,7 +113,7 @@ class LoginActivity : BaseActivity()
loginPresenter.bindingMobile(mobile, code)
} else {
// 登录
loginPresenter.login(mobile, code, ps)
loginPresenter.login(mobile, code)
}
} else {
showMissingPermissionDialog("设备")
......@@ -156,6 +155,12 @@ class LoginActivity : BaseActivity()
}
override fun loginSuc() {
// try {
// // 登录成功初始化鱼玩盒子userid
// baseApplication.initYwSdk()
// } catch (e: Exception) {
// }
// false-登录 true-绑定手机号
if (loginFlag) {
showToast("绑定成功")
......@@ -186,7 +191,7 @@ class LoginActivity : BaseActivity()
}
if (!isFinishing) {
loginPresenter.login(ps, JsonUtil.toJson(wxInfo))
loginPresenter.login(JsonUtil.toJson(wxInfo))
}
} catch (e: Exception) {
e.printStackTrace()
......
......@@ -52,6 +52,20 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
tab_iv_main.setSelected(true)
tab_tv_main.setSelected(true)
// if (panFragment == null) {
// panFragment = PanFragment()
// }
// if (!panFragment!!.isAdded) {
// // 提交事务
// supportFragmentManager.beginTransaction()
// .add(R.id.content_layout, panFragment!!).commitAllowingStateLoss()
//
// // 记录当前Fragment
// currentFragment = panFragment
// }
// tab_iv_pan.setSelected(true)
// tab_tv_pan.setSelected(true)
tab_rl_main.setOnClickListener(this)
tab_rl_pan.setOnClickListener(this)
tab_rl_friends.setOnClickListener(this)
......@@ -100,6 +114,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
R.id.tab_rl_pan -> clickTab2Layout()
R.id.tab_rl_friends -> {
clickTab3Layout()
// YwSDK_WebActivity.open(this)
}
R.id.tab_rl_my -> clickTab4Layout()
}
......
......@@ -44,8 +44,8 @@ class MainFragment : BaseFragment(), HomeView, AdVideoCallback, View.OnClickList
private var powerDialog: PowerDialog? = null
// 视频相关
private var bigRewardCoin = 0
private var smallRewardCoin = 0
private var bigRewardCoin = 0 // 大红包
private var smallRewardCoin = 0 // 小红包
private var littleVideoFragment: LittleVideoFragment? = null
private val VEDIO_MAX_COUNT = 12 // 当前缓存视频id最大数
private val vedioIdList by lazy { ArrayList<String>() }//记录播放的视频id
......@@ -91,7 +91,7 @@ class MainFragment : BaseFragment(), HomeView, AdVideoCallback, View.OnClickList
if (!TextUtils.isEmpty(userManager?.userID)) {
homePresenter.getHallBaseMsg()
} else {
homePresenter.userLogin(ps)
homePresenter.userLogin()
}
littleVideoFragment?.onResume()
......
......@@ -54,7 +54,6 @@ import java.util.*
@SuppressLint("SetTextI18n")
class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshListener, View.OnClickListener, AdapterView.OnItemClickListener {
private val ps by lazy { AppPreferences(context) }
private val myPresenter by lazy { MyPresenter() }
private val userManager by lazy { UserManager.getInstance() }
......@@ -84,7 +83,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
myPresenter.getUserHallBaseMsg()
} else {
// 游客登录
myPresenter.userLogin(ps)
myPresenter.userLogin()
}
}
......@@ -131,7 +130,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
myPresenter.getUserHallBaseMsg()
} else {
// 游客登录
myPresenter.userLogin(ps)
myPresenter.userLogin()
}
}
}
......@@ -210,7 +209,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
if (userManager.userID.isNotEmpty()) {
myPresenter.getUserHallBaseMsg()
} else {
myPresenter.userLogin(ps)
myPresenter.userLogin()
}
}
......
......@@ -18,7 +18,6 @@ import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.library.net.netstatus.NetUtils
import com.mints.library.utils.json.JsonUtil
import kotlinx.android.synthetic.main.fragment_main_pan.*
import net.grandcentrix.tray.AppPreferences
/**
* 描述:大转盘
......@@ -28,7 +27,6 @@ import net.grandcentrix.tray.AppPreferences
class PanFragment : BaseFragment(), PanView {
private val panPresenter by lazy { PanPresenter() }
private val ps by lazy { AppPreferences(context) }
private val userManager by lazy { UserManager.getInstance() }
private var isLoadPanSuc = false // 是否加载大转盘成功
private val carrierType = Constant.CARRIER_CHALLENGE_TURN
......@@ -53,7 +51,7 @@ class PanFragment : BaseFragment(), PanView {
if (AppConfig.fragmentClickFlag === Constant.FRAGMENT_CLICK_PAN) {
if (TextUtils.isEmpty(userManager?.userID)) {
// 游客登录
panPresenter.userLogin(ps)
panPresenter.userLogin()
}
if (!isLoadPanSuc && NetUtils.isNetworkConnected(getContext())) {
......
......@@ -101,16 +101,16 @@ public abstract class BaseAppFragment extends TransitionFragment {
public void onDetach() {
super.onDetach();
// for bug ---> java.lang.IllegalStateException: Activity has been destroyed
try {
Field childFragmentManager = Fragment.class.getDeclaredField("mChildFragmentManager");
childFragmentManager.setAccessible(true);
childFragmentManager.set(this, null);
} catch (NoSuchFieldException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
// try {
// Field childFragmentManager = Fragment.class.getDeclaredField("mChildFragmentManager");
// childFragmentManager.setAccessible(true);
// childFragmentManager.set(this, null);
//
// } catch (NoSuchFieldException e) {
// throw new RuntimeException(e);
// } catch (IllegalAccessException e) {
// throw new RuntimeException(e);
// }
}
/**
......
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