Commit ebde0e39 by 刘鹏

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

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