Commit 519d6148 by 刘鹏

feat: 1. 修复咨询列表点击刷新问题。2.去掉openInstall

parent 9014f2e8
...@@ -53,9 +53,6 @@ ...@@ -53,9 +53,6 @@
<meta-data <meta-data
android:name="com.ydl.component.base.DemoGlobalConfig" android:name="com.ydl.component.base.DemoGlobalConfig"
android:value="ModuleConfig" /> android:value="ModuleConfig" />
<meta-data
android:name="com.openinstall.APP_KEY"
android:value="jz0d0s"/>
<activity <activity
android:name="com.tencent.tauth.AuthActivity" android:name="com.tencent.tauth.AuthActivity"
android:launchMode="singleTask" android:launchMode="singleTask"
......
...@@ -12,7 +12,6 @@ import android.provider.Settings ...@@ -12,7 +12,6 @@ import android.provider.Settings
import android.util.Log import android.util.Log
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.fm.openinstall.OpenInstall
import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper
import com.tbruyelle.rxpermissions2.RxPermissions import com.tbruyelle.rxpermissions2.RxPermissions
import com.umeng.analytics.MobclickAgent import com.umeng.analytics.MobclickAgent
...@@ -87,8 +86,6 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -87,8 +86,6 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// YDLavManager.instances.init(this, "3387e9b251f3491e9221a9877e8f7830") // YDLavManager.instances.init(this, "3387e9b251f3491e9221a9877e8f7830")
YdlCommonRouterManager.initYdlCommonRoute(PlatformTempCommonRouteImpl()) YdlCommonRouterManager.initYdlCommonRoute(PlatformTempCommonRouteImpl())
OpenInstall.init(this);// TODO: 1/29/21 统计渠道测试
StatusUtils.isUseOpenInstall = true
// 初始化一键登录sdk // 初始化一键登录sdk
OneKeyLoginHelp.sdkInit(this, OneKeyLoginHelp.YDL_USER_APP, PhoneNumberAuthHelper.SERVICE_TYPE_LOGIN) OneKeyLoginHelp.sdkInit(this, OneKeyLoginHelp.YDL_USER_APP, PhoneNumberAuthHelper.SERVICE_TYPE_LOGIN)
bindService() bindService()
......
...@@ -6,7 +6,7 @@ ext { ...@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.50.21", "m-confide" : "0.0.50.21",
"m-consultant" : "0.0.60.66", "m-consultant" : "0.0.60.67",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.48", "m-user" : "0.0.62.48",
"m-home" : "0.0.23.90", "m-home" : "0.0.23.90",
...@@ -94,7 +94,7 @@ ext { ...@@ -94,7 +94,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.50.21", "m-confide" : "0.0.50.21",
"m-consultant" : "0.0.60.66", "m-consultant" : "0.0.60.67",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.48", "m-user" : "0.0.62.48",
"m-home" : "0.0.23.90", "m-home" : "0.0.23.90",
......
...@@ -577,6 +577,7 @@ class ExpertSearchAdapter( ...@@ -577,6 +577,7 @@ class ExpertSearchAdapter(
doctor.id ?: "" doctor.id ?: ""
) )
} }
onExpertClick?.onExpertClick()
//判断是否已登录 //判断是否已登录
if (!ConsultantIn.getUserImpl().loginByOneKeyLogin(context, true)) { if (!ConsultantIn.getUserImpl().loginByOneKeyLogin(context, true)) {
return@setOnClickListener return@setOnClickListener
......
...@@ -13,7 +13,4 @@ public class StatusUtils { ...@@ -13,7 +13,4 @@ public class StatusUtils {
// 是否第一次启动App // 是否第一次启动App
public static boolean isFirstStartApp = false; public static boolean isFirstStartApp = false;
// 是否使用openInstall
public static boolean isUseOpenInstall = false;
} }
...@@ -5,7 +5,6 @@ import android.content.Intent ...@@ -5,7 +5,6 @@ import android.content.Intent
import android.text.TextUtils import android.text.TextUtils
import android.util.Log import android.util.Log
import android.view.View import android.view.View
import com.fm.openinstall.OpenInstall
import com.ydl.ydlcommon.base.BaseActivity import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.bean.StatusBarOptions import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.data.http.RxUtils import com.ydl.ydlcommon.data.http.RxUtils
...@@ -32,7 +31,6 @@ import com.yidianling.user.route.UserIn ...@@ -32,7 +31,6 @@ import com.yidianling.user.route.UserIn
import com.yidianling.user.safePrivate.FingerPrintCheckActivity import com.yidianling.user.safePrivate.FingerPrintCheckActivity
import com.yidianling.user.safePrivate.FingerPrintUtil import com.yidianling.user.safePrivate.FingerPrintUtil
import com.yidianling.user.safePrivate.HandUnlockCheckActivity import com.yidianling.user.safePrivate.HandUnlockCheckActivity
import com.yidianling.user.ui.login.OneKeyLoginHelp
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable import io.reactivex.disposables.Disposable
...@@ -187,22 +185,11 @@ class SmsLoginActivity : BaseActivity() { ...@@ -187,22 +185,11 @@ class SmsLoginActivity : BaseActivity() {
* 注册流程成功之后,进行百度监测 注册埋点 * 注册流程成功之后,进行百度监测 注册埋点
*/ */
fun baiduActionBury() { fun baiduActionBury() {
if (OneKeyLoginHelp.openInstallKey.isNotEmpty() && StatusUtils.isUseOpenInstall) { ActionCountUtils.baiduCount(
ActionCountUtils.baiduCount( UserBIConstants.APP_REGISTER_PAGE,
UserBIConstants.APP_REGISTER_PAGE, UserBIConstants.POSITION_CODE_REGISTER_CLICK,
UserBIConstants.POSITION_CODE_REGISTER_CLICK, 25
25, )
OneKeyLoginHelp.openInstallKey
)
// 用户注册成功后调用
OpenInstall.reportRegister();
} else {
ActionCountUtils.baiduCount(
UserBIConstants.APP_REGISTER_PAGE,
UserBIConstants.POSITION_CODE_REGISTER_CLICK,
25
)
}
} }
//关闭手势解锁页面与指纹解锁页面 //关闭手势解锁页面与指纹解锁页面
......
...@@ -11,7 +11,6 @@ import android.text.method.HideReturnsTransformationMethod ...@@ -11,7 +11,6 @@ import android.text.method.HideReturnsTransformationMethod
import android.text.method.PasswordTransformationMethod import android.text.method.PasswordTransformationMethod
import android.view.View import android.view.View
import android.view.animation.AnimationUtils import android.view.animation.AnimationUtils
import com.fm.openinstall.OpenInstall
import com.ydl.ydlcommon.base.BaseMvpActivity import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.StatusBarUtils import com.ydl.ydlcommon.utils.StatusBarUtils
...@@ -21,7 +20,6 @@ import com.yidianling.common.tools.RxKeyboardTool ...@@ -21,7 +20,6 @@ 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
...@@ -152,17 +150,6 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput ...@@ -152,17 +150,6 @@ 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(
UserBIConstants.APP_REGISTER_PAGE,
UserBIConstants.POSITION_PHONE_REGISTER_CLICK,
25,
OneKeyLoginHelp.openInstallKey
)
// 用户注册成功后调用
OpenInstall.reportRegister();
}
} }
......
...@@ -12,10 +12,6 @@ import android.view.View ...@@ -12,10 +12,6 @@ import android.view.View
import android.widget.ImageView import android.widget.ImageView
import android.widget.RelativeLayout import android.widget.RelativeLayout
import android.widget.TextView import android.widget.TextView
import com.fm.openinstall.OpenInstall
import com.fm.openinstall.listener.AppInstallAdapter
import com.fm.openinstall.model.AppData
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.ydl.ydlcommon.base.BaseActivity import com.ydl.ydlcommon.base.BaseActivity
...@@ -32,6 +28,7 @@ import com.yidianling.common.tools.RxDeviceTool ...@@ -32,6 +28,7 @@ import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
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.StatusUtils import com.yidianling.user.StatusUtils
import com.yidianling.user.UserHelper import com.yidianling.user.UserHelper
import com.yidianling.user.api.bean.UserResponseBean import com.yidianling.user.api.bean.UserResponseBean
...@@ -71,7 +68,6 @@ object OneKeyLoginHelp { ...@@ -71,7 +68,6 @@ object OneKeyLoginHelp {
private var checkBoxHidden = false // 协议勾选框是否展示m-user private var checkBoxHidden = false // 协议勾选框是否展示m-user
var mPrivacyBeforeText = "登录即代表您同意" // 隐私协议文案 var mPrivacyBeforeText = "登录即代表您同意" // 隐私协议文案
private lateinit var mActivity: BaseActivity private lateinit var mActivity: BaseActivity
var openInstallKey = ""
fun sdkInit(activity: BaseActivity, appType: Int, authType: Int) { fun sdkInit(activity: BaseActivity, appType: Int, authType: Int) {
mActivity = activity mActivity = activity
...@@ -107,9 +103,6 @@ object OneKeyLoginHelp { ...@@ -107,9 +103,6 @@ object OneKeyLoginHelp {
if (!checkBoxHidden) { if (!checkBoxHidden) {
mPrivacyBeforeText = "同意" mPrivacyBeforeText = "同意"
} }
if (appType == YDL_USER_APP) {
getOpenInstallKey()
}
} }
/** /**
...@@ -306,7 +299,8 @@ object OneKeyLoginHelp { ...@@ -306,7 +299,8 @@ object OneKeyLoginHelp {
var loginLogo = "ic_ydl_login_logo" var loginLogo = "ic_ydl_login_logo"
var loginHeight = 40 var loginHeight = 40
var loginWidth = 118 var loginWidth = 118
var appPrivacyOneTip = "壹点灵用户使用协议" val appName= mActivity.resources.getString(R.string.user_login_name_start)
var appPrivacyOneTip = "${appName}用户使用协议"
var appPrivacyOne = "https://h5.ydl.com/SDUserProtol" var appPrivacyOne = "https://h5.ydl.com/SDUserProtol"
var appPrivacyTwo = "https://m.ydl.com/Protol/yinsi" var appPrivacyTwo = "https://m.ydl.com/Protol/yinsi"
if (mAppType == YDL_EXPERT_APP) { if (mAppType == YDL_EXPERT_APP) {
...@@ -483,12 +477,8 @@ object OneKeyLoginHelp { ...@@ -483,12 +477,8 @@ object OneKeyLoginHelp {
"", "",
"", "",
25, 25,
openInstallKey ""
) )
if (OneKeyLoginHelp.openInstallKey.isNotEmpty() && StatusUtils.isUseOpenInstall) {
// 用户注册成功后调用
OpenInstall.reportRegister()
}
} else { } else {
ActionCountUtils.countUid( ActionCountUtils.countUid(
UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK,
...@@ -595,21 +585,6 @@ object OneKeyLoginHelp { ...@@ -595,21 +585,6 @@ object OneKeyLoginHelp {
} }
/** /**
* CPA(CPS)推广渠道统计
* 获取安装携带的参数
* 注:1、不要在 init 之后,紧接着调用 getInstall,防止网络等问题导致 getInstall 超时,从而获取数据失败
*/
private fun getOpenInstallKey() {
OpenInstall.getInstall(object : AppInstallAdapter() {
override fun onInstall(appData: AppData) {
// 获取渠道数据 转换值同步IOS "AppData{channel='" + this.channel + '\'' + ", data='" + this.data + '\'' + '}'
openInstallKey =
appData.toString().replace("AppData", "").replace("channel", "channelCode")
}
})
}
/**
* @param isOpenDialog true: 使用弹窗展示一键登录 * @param isOpenDialog true: 使用弹窗展示一键登录
* false: 使用全页面展示一键登录 * false: 使用全页面展示一键登录
* @return true:登录。false:未登录 * @return true:登录。false:未登录
......
...@@ -13,7 +13,6 @@ import android.view.View ...@@ -13,7 +13,6 @@ import android.view.View
import android.view.animation.AnimationUtils import android.view.animation.AnimationUtils
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.fm.openinstall.OpenInstall
import com.meituan.android.walle.WalleChannelReader import com.meituan.android.walle.WalleChannelReader
import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper
import com.mobile.auth.gatewayauth.ResultCode import com.mobile.auth.gatewayauth.ResultCode
...@@ -56,8 +55,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers ...@@ -56,8 +55,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.user_activity_register_and_login_bottom.* import kotlinx.android.synthetic.main.user_activity_register_and_login_bottom.*
import kotlinx.android.synthetic.main.user_activity_register_and_login_new.* import kotlinx.android.synthetic.main.user_activity_register_and_login_new.*
import kotlinx.android.synthetic.main.user_activity_register_and_login_new.img_reg_back
import kotlinx.android.synthetic.main.user_activity_register_and_login_new.view_lin
/** /**
* @author jiucheng * @author jiucheng
...@@ -160,12 +157,8 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -160,12 +157,8 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
"", "",
"", "",
25, 25,
OneKeyLoginHelp.openInstallKey ""
) )
if (OneKeyLoginHelp.openInstallKey.isNotEmpty() && StatusUtils.isUseOpenInstall) {
// 用户注册成功后调用
OpenInstall.reportRegister();
}
} }
...@@ -198,7 +191,9 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -198,7 +191,9 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
} }
private fun initView() { private fun initView() {
val str = "壹点灵用户使用协议、隐私保护政策" val name = resources.getString(R.string.user_login_name_start)
val str = "${name}用户使用协议、隐私保护政策"
var start = name.length
val spannableString = SpannableString(str) val spannableString = SpannableString(str)
spannableString.setSpan(object : ClickableSpan() { spannableString.setSpan(object : ClickableSpan() {
override fun updateDrawState(ds: TextPaint) { override fun updateDrawState(ds: TextPaint) {
...@@ -217,7 +212,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -217,7 +212,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
) )
} }
} }
}, 3, 9, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) }, start, start+6, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
spannableString.setSpan(object : ClickableSpan() { spannableString.setSpan(object : ClickableSpan() {
override fun updateDrawState(ds: TextPaint) { override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds) super.updateDrawState(ds)
...@@ -235,7 +230,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -235,7 +230,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
) )
} }
} }
}, 10, str.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) }, start + 7, str.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
tv_protocol.text = spannableString tv_protocol.text = spannableString
tv_protocol.movementMethod = LinkMovementMethod.getInstance() tv_protocol.movementMethod = LinkMovementMethod.getInstance()
......
...@@ -6,13 +6,12 @@ import android.content.Context ...@@ -6,13 +6,12 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.Build
import androidx.core.content.ContextCompat
import android.text.TextUtils import android.text.TextUtils
import android.view.View import android.view.View
import android.view.animation.AnimationUtils import android.view.animation.AnimationUtils
import android.view.inputmethod.InputMethodManager import android.view.inputmethod.InputMethodManager
import android.widget.EditText import android.widget.EditText
import com.fm.openinstall.OpenInstall import androidx.core.content.ContextCompat
import com.ydl.ydlcommon.base.BaseMvpActivity import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.StatusBarUtils import com.ydl.ydlcommon.utils.StatusBarUtils
...@@ -22,7 +21,6 @@ import com.yidianling.common.tools.RxKeyboardTool ...@@ -22,7 +21,6 @@ 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.constants.UserBIConstants import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.http.request.BindPhoneJavaParam import com.yidianling.user.http.request.BindPhoneJavaParam
...@@ -271,22 +269,11 @@ class VerificationCodeActivity : ...@@ -271,22 +269,11 @@ class VerificationCodeActivity :
override fun baiduActionBury() { override fun baiduActionBury() {
if (StatusUtils.isUseOpenInstall) { ActionCountUtils.baiduCount(
ActionCountUtils.baiduCount( UserBIConstants.APP_REGISTER_PAGE,
UserBIConstants.APP_REGISTER_PAGE, UserBIConstants.POSITION_CODE_REGISTER_CLICK,
UserBIConstants.POSITION_CODE_REGISTER_CLICK, 25
25, )
OneKeyLoginHelp.openInstallKey
)
// 用户注册成功后调用
OpenInstall.reportRegister();
} else {
ActionCountUtils.baiduCount(
UserBIConstants.APP_REGISTER_PAGE,
UserBIConstants.POSITION_CODE_REGISTER_CLICK,
25
)
}
} }
override fun verificationErrorCode() { override fun verificationErrorCode() {
......
...@@ -3,7 +3,6 @@ package com.yidianling.user.ui.login.presenter ...@@ -3,7 +3,6 @@ package com.yidianling.user.ui.login.presenter
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.Activity import android.app.Activity
import android.text.TextUtils import android.text.TextUtils
import com.fm.openinstall.OpenInstall
import com.umeng.socialize.bean.SHARE_MEDIA import com.umeng.socialize.bean.SHARE_MEDIA
import com.ydl.ydlcommon.mvp.base.BasePresenter import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.router.YdlCommonOut import com.ydl.ydlcommon.router.YdlCommonOut
...@@ -230,7 +229,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : ...@@ -230,7 +229,7 @@ class LoginPresenterImpl(view: ILoginContract.View) :
"", "",
"", "",
25, 25,
OneKeyLoginHelp.openInstallKey ""
) )
} else { } else {
mView.baiduActionBury( mView.baiduActionBury(
...@@ -244,11 +243,9 @@ class LoginPresenterImpl(view: ILoginContract.View) : ...@@ -244,11 +243,9 @@ class LoginPresenterImpl(view: ILoginContract.View) :
"", "",
"", "",
25, 25,
OneKeyLoginHelp.openInstallKey ""
) )
} }
// 用户注册成功后调用
OpenInstall.reportRegister()
} else { } else {
ActionCountUtils.countUid( ActionCountUtils.countUid(
UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK,
......
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName">
<string name="user_login_name_start">心理咨询</string>
</resources>
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName">
<string name="user_login_name_start">壹点灵</string>
</resources>
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