Commit 11c568d6 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 326e87ad
...@@ -15,22 +15,22 @@ object TalkingDataManager { ...@@ -15,22 +15,22 @@ object TalkingDataManager {
fun init(application:Application) { fun init(application:Application) {
try { // try {
//打开日志 // //打开日志
TCAgent.LOG_ON = BuildConfig.LOG_DEBUG // TCAgent.LOG_ON = BuildConfig.LOG_DEBUG
/** // /**
* 动态获取渠道ID(类似友盟) // * 动态获取渠道ID(类似友盟)
* AppID说是xml文件里的密钥? // * AppID说是xml文件里的密钥?
*/ // */
TCAgent.init(application, APP_KEY // TCAgent.init(application, APP_KEY
, MateUtils.getAppMetaData(application, "CHANNEL_NAME")) // , MateUtils.getAppMetaData(application, "CHANNEL_NAME"))
/** // /**
* true-开启自动捕获错误 // * true-开启自动捕获错误
*/ // */
TCAgent.setReportUncaughtExceptions(true) // TCAgent.setReportUncaughtExceptions(true)
} catch (e: Exception) { // } catch (e: Exception) {
e.printStackTrace() // e.printStackTrace()
} // }
} }
fun onResume(cxt:Context,name:String){ fun onResume(cxt:Context,name:String){
......
...@@ -49,6 +49,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -49,6 +49,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
val luckyIndexMap: MutableMap<Int, String> = HashMap() val luckyIndexMap: MutableMap<Int, String> = HashMap()
private var yoyo: YoYo.YoYoString? = null private var yoyo: YoYo.YoYoString? = null
private var isInitLuckyData = false private var isInitLuckyData = false
private var isTurnLuckyPage = false
private var nineShowBean: NineShowBean? = null private var nineShowBean: NineShowBean? = null
var carrierType = Constant.CARRIERTYPE_NINE var carrierType = Constant.CARRIERTYPE_NINE
...@@ -93,6 +94,11 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -93,6 +94,11 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
showAd() showAd()
} }
if(isTurnLuckyPage){
isTurnLuckyPage=false
clickTurn()
}
if (!TextUtils.isEmpty(userManager?.userID)) { if (!TextUtils.isEmpty(userManager?.userID)) {
myPresenter.showTurn() myPresenter.showTurn()
myPresenter.getMyInfo() myPresenter.getMyInfo()
...@@ -359,6 +365,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -359,6 +365,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
val luckyFirst = val luckyFirst =
AppPreferencesManager.get().getBoolean(Constant.LUCKY_MY_FIRST, false) AppPreferencesManager.get().getBoolean(Constant.LUCKY_MY_FIRST, false)
if (!luckyFirst) { if (!luckyFirst) {
isTurnLuckyPage=true
AppPreferencesManager.get().put(Constant.LUCKY_MY_FIRST, true) AppPreferencesManager.get().put(Constant.LUCKY_MY_FIRST, true)
val bundle = Bundle() val bundle = Bundle()
bundle.putInt(NineKnowActivity.COMPLETE, nineShowBean!!.complete) bundle.putInt(NineKnowActivity.COMPLETE, nineShowBean!!.complete)
......
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