Commit ebde0e39 by 刘鹏

fix: 解决心理咨询fragment初始化activity问题

parent fa974dc6
...@@ -8,8 +8,8 @@ ext { ...@@ -8,8 +8,8 @@ ext {
"m-confide" : "0.0.49.09", "m-confide" : "0.0.49.09",
"m-consultant" : "0.0.59.79", "m-consultant" : "0.0.59.79",
"m-fm" : "0.0.30.03", "m-fm" : "0.0.30.03",
"m-user" : "0.0.61.34", "m-user" : "0.0.61.36",
"m-home" : "0.0.22.62", "m-home" : "0.0.22.63",
"m-im" : "0.0.19.20", "m-im" : "0.0.19.20",
"m-dynamic" : "0.0.7.22", "m-dynamic" : "0.0.7.22",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
...@@ -91,8 +91,8 @@ ext { ...@@ -91,8 +91,8 @@ ext {
"m-confide" : "0.0.49.09", "m-confide" : "0.0.49.09",
"m-consultant" : "0.0.59.79", "m-consultant" : "0.0.59.79",
"m-fm" : "0.0.30.01", "m-fm" : "0.0.30.01",
"m-user" : "0.0.61.34", "m-user" : "0.0.61.36",
"m-home" : "0.0.22.62", "m-home" : "0.0.22.63",
"m-im" : "0.0.19.20", "m-im" : "0.0.19.20",
"m-dynamic" : "0.0.7.22", "m-dynamic" : "0.0.7.22",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
......
package com.yidianling.home.ui.fragment package com.yidianling.home.ui.fragment
import android.app.Dialog import android.app.Dialog
import android.content.Context
import android.text.TextUtils import android.text.TextUtils
import android.view.View import android.view.View
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
...@@ -50,8 +52,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -50,8 +52,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
IHomeContract.View, IHomeContract.View,
SwipeRefreshLayout.OnRefreshListener { SwipeRefreshLayout.OnRefreshListener {
var mActivity = activity private lateinit var mActivity: FragmentActivity
var mContext = context private lateinit var mContext: Context
private var adapter: YdlHomeAdapter? = null private var adapter: YdlHomeAdapter? = null
private var homeEvent: HomeImpl? = null private var homeEvent: HomeImpl? = null
...@@ -89,6 +91,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -89,6 +91,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
} }
override fun initDataAndEvent() { override fun initDataAndEvent() {
mActivity = requireActivity()
mContext = requireContext()
homeEvent = HomeImpl(mActivity!!, this) homeEvent = HomeImpl(mActivity!!, this)
initView() initView()
initAdapter() initAdapter()
......
...@@ -21,6 +21,7 @@ import com.yidianling.common.tools.RxKeyboardTool ...@@ -21,6 +21,7 @@ import com.yidianling.common.tools.RxKeyboardTool
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.LoginUtils import com.yidianling.user.LoginUtils
import com.yidianling.user.R import com.yidianling.user.R
import com.yidianling.user.StatusUtils
import com.yidianling.user.constants.UserBIConstants import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.ui.login.contract.IInputPassWordContract import com.yidianling.user.ui.login.contract.IInputPassWordContract
import com.yidianling.user.ui.login.presenter.InputPassWordPresenterImpl import com.yidianling.user.ui.login.presenter.InputPassWordPresenterImpl
...@@ -151,6 +152,7 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput ...@@ -151,6 +152,7 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput
UserBIConstants.POSITION_PHONE_REGISTER_CLICK, UserBIConstants.POSITION_PHONE_REGISTER_CLICK,
25 25
) )
if (OneKeyLoginHelp.openInstallKey.isNotEmpty() && StatusUtils.isUseOpenInstall) {
ActionCountUtils.baiduCount( ActionCountUtils.baiduCount(
UserBIConstants.APP_REGISTER_PAGE, UserBIConstants.APP_REGISTER_PAGE,
UserBIConstants.POSITION_PHONE_REGISTER_CLICK, UserBIConstants.POSITION_PHONE_REGISTER_CLICK,
...@@ -161,6 +163,8 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput ...@@ -161,6 +163,8 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput
OpenInstall.reportRegister(); OpenInstall.reportRegister();
} }
}
private fun setClickEvent() { private fun setClickEvent() {
et_input_password.addTextChangedListener(object : TextWatcher { et_input_password.addTextChangedListener(object : TextWatcher {
......
...@@ -20,7 +20,6 @@ import com.meituan.android.walle.WalleChannelReader ...@@ -20,7 +20,6 @@ import com.meituan.android.walle.WalleChannelReader
import com.mobile.auth.gatewayauth.* import com.mobile.auth.gatewayauth.*
import com.mobile.auth.gatewayauth.model.TokenRet import com.mobile.auth.gatewayauth.model.TokenRet
import com.tbruyelle.rxpermissions2.RxPermissions import com.tbruyelle.rxpermissions2.RxPermissions
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.BaseActivity import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.utils.JPushUtils import com.ydl.ydlcommon.utils.JPushUtils
...@@ -87,7 +86,7 @@ object OneKeyLoginHelp { ...@@ -87,7 +86,7 @@ object OneKeyLoginHelp {
it.setAuthSDKInfo(YDL_USER_APP_KEY) it.setAuthSDKInfo(YDL_USER_APP_KEY)
} else if (appType == YDL_EXPERT_APP) { } else if (appType == YDL_EXPERT_APP) {
it.setAuthSDKInfo(YDL_EXPERT_APP_KEY) it.setAuthSDKInfo(YDL_EXPERT_APP_KEY)
}else if (appType == YDL_XINLIZIXUN_APP) { } else if (appType == YDL_XINLIZIXUN_APP) {
it.setAuthSDKInfo(YDL_XINLIZIXUN_APP_KEY) it.setAuthSDKInfo(YDL_XINLIZIXUN_APP_KEY)
} }
...@@ -108,8 +107,10 @@ object OneKeyLoginHelp { ...@@ -108,8 +107,10 @@ object OneKeyLoginHelp {
if (!checkBoxHidden) { if (!checkBoxHidden) {
mPrivacyBeforeText = "同意" mPrivacyBeforeText = "同意"
} }
if (appType == YDL_USER_APP) {
getOpenInstallKey() getOpenInstallKey()
} }
}
/** /**
* 检查认证环境 * 检查认证环境
...@@ -452,8 +453,10 @@ object OneKeyLoginHelp { ...@@ -452,8 +453,10 @@ object OneKeyLoginHelp {
25, 25,
openInstallKey openInstallKey
) )
if (OneKeyLoginHelp.openInstallKey.isNotEmpty() && StatusUtils.isUseOpenInstall) {
// 用户注册成功后调用 // 用户注册成功后调用
OpenInstall.reportRegister(); OpenInstall.reportRegister()
}
} else { } else {
ActionCountUtils.countUid( ActionCountUtils.countUid(
UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK,
......
...@@ -40,6 +40,7 @@ import com.yidianling.common.tools.RxKeyboardTool ...@@ -40,6 +40,7 @@ import com.yidianling.common.tools.RxKeyboardTool
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.LoginUtils import com.yidianling.user.LoginUtils
import com.yidianling.user.R import com.yidianling.user.R
import com.yidianling.user.StatusUtils
import com.yidianling.user.UserHelper import com.yidianling.user.UserHelper
import com.yidianling.user.UserHelper.isLogin import com.yidianling.user.UserHelper.isLogin
import com.yidianling.user.api.bean.UserResponseBean import com.yidianling.user.api.bean.UserResponseBean
...@@ -188,9 +189,11 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -188,9 +189,11 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
25, 25,
OneKeyLoginHelp.openInstallKey OneKeyLoginHelp.openInstallKey
) )
if (OneKeyLoginHelp.openInstallKey.isNotEmpty() && StatusUtils.isUseOpenInstall) {
// 用户注册成功后调用 // 用户注册成功后调用
OpenInstall.reportRegister(); OpenInstall.reportRegister();
} }
}
private fun initAuthHelper() { private fun initAuthHelper() {
......
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