Commit 60a54eaf by 万齐军

Merge branch 'feat/qj/confide_optimize' into 'release'

Feat/qj/confide optimize

See merge request app_android_lib/YDL-Component!238
parents ef86e01f cb9f150f
......@@ -662,10 +662,8 @@ class YDLavManager {
* 如果正在通话中,则不进行退出操作
* */
if (reason == CONNECTION_CHANGE_REASON_REMOTE_LOGIN) {
if (!activityIsExists(ConsultantAudioHomeActivity::class.java) && !activityIsExists(
AudioHomeActivity::class.java
)
) {
if (!activityIsExists(ConsultantAudioHomeActivity::class.java) &&
!activityIsExists(AudioHomeActivity::class.java)) {
isOnlineRtm = false
logout()
} else {
......
......@@ -5,6 +5,7 @@ import android.os.Looper
import com.umeng.socialize.UMAuthListener
import com.umeng.socialize.UMShareAPI
import com.umeng.socialize.bean.SHARE_MEDIA
import com.ydl.ydlcommon.app.Apm
import com.ydl.ydlcommon.data.http.CustomThrowable
import com.yidianling.user.http.request.ThirdLoginParam
import io.reactivex.Observable
......@@ -72,6 +73,7 @@ class LoginObservable(val activity: Activity, private val media: SHARE_MEDIA): O
}
override fun onError(p0: SHARE_MEDIA?, p1: Int, p2: Throwable?) {
Apm.reportCustom("login", "third_auth_error", p2 ?: Exception("${p0},$p1"))
observer?.onError(p2?:Throwable("未知异常"))
}
......
......@@ -14,6 +14,7 @@ import android.widget.RelativeLayout
import android.widget.TextView
import com.mobile.auth.gatewayauth.*
import com.mobile.auth.gatewayauth.model.TokenRet
import com.ydl.ydlcommon.app.Apm
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.utils.JPushUtils
......@@ -506,6 +507,7 @@ object OneKeyLoginHelp {
"一键登录失败 msg:${it.msg}"
)
ToastUtil.toastShort(it.msg)
Apm.reportCustom("login", "oneKey_error", Exception("${it.code},${it.msg}"))
mPhoneNumberAuthHelper?.hideLoginLoading()
}
}, {
......@@ -513,6 +515,7 @@ object OneKeyLoginHelp {
AliYunLogConfig.LOGIN,
"一键登录Error msg:${it.message}"
)
Apm.reportCustom("login", "oneKey_error", it)
ToastUtil.toastShort(it.message)
mPhoneNumberAuthHelper?.hideLoginLoading()
})
......@@ -524,6 +527,7 @@ object OneKeyLoginHelp {
}
override fun onTokenFailed(s: String) {
Apm.reportCustom("login", "oneKey_error", Exception("TokenFailed:${s}"))
LogUtil.e("onTokenFailed"+s)
mIsGetTokenSuccess = false
val tokenRet = TokenRet.fromJson(s)
......
......@@ -2,6 +2,7 @@ package com.yidianling.user.ui.login.presenter
import android.annotation.SuppressLint
import android.text.TextUtils
import com.ydl.ydlcommon.app.Apm
import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.StringUtils
......@@ -114,10 +115,12 @@ class InputPassWordPresenterImpl :
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 登录失败 msg: ${it.msg}")
ToastUtil.toastShort(it.msg)
Apm.reportCustom("login", "password_error", Exception("密码登录失败,$phoneCountryCode-$phone"))
mView.startAnim()
} else {
if (it.data.userInfo?.user_type == 2) {
mView.showNormalDialog()
Apm.reportCustom("login", "isexpert", Exception("登录—专家帐号,$phoneCountryCode-$phone"))
} else {
saveUserData(it.data)
if (it.data.firstLogin == 1) {//第一次登录:是注册
......@@ -137,6 +140,7 @@ class InputPassWordPresenterImpl :
}
}, {
YdlCommonOut.showToast(it.message!!)
Apm.reportCustom("login", "password_error", it)
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 Error msg: ${it.message}")
......
......@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
import android.app.Activity
import android.text.TextUtils
import com.umeng.socialize.bean.SHARE_MEDIA
import com.ydl.ydlcommon.app.Apm
import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.YDLCacheUtils
......@@ -20,7 +21,6 @@ import com.yidianling.user.http.UserHttpImpl
import com.yidianling.user.http.request.BindPhoneJavaParam
import com.yidianling.user.http.request.CheckAliAuthParam
import com.yidianling.user.http.request.PhoneLoginAutoParam
import com.yidianling.user.ui.login.OneKeyLoginHelp
import com.yidianling.user.ui.login.contract.ILoginContract
import com.yidianling.user.ui.login.model.LoginModelImpl
import io.reactivex.android.schedulers.AndroidSchedulers
......@@ -168,6 +168,7 @@ class LoginPresenterImpl(view: ILoginContract.View) :
if (it.data.isRegistered == 1) {
mView.showLoading(false)
mView.showHasBindedDialog()
Apm.reportCustom("login", "mobile_isbind", Exception("登录-手机被绑定,$countryCode-$phone"))
} else {
mView.checkPhoneStatusSuccess(it.data, phone)
}
......@@ -175,6 +176,7 @@ class LoginPresenterImpl(view: ILoginContract.View) :
if (it.data.isDoctor == 1) {//是专家账号
mView.showLoading(false)
mView.showNormalDialog()
Apm.reportCustom("login", "isexpert", Exception("登录—专家帐号,$countryCode-$phone"))
} else {
mView.checkPhoneStatusSuccess(it.data, phone)
}
......@@ -212,6 +214,7 @@ class LoginPresenterImpl(view: ILoginContract.View) :
.subscribe({
mView.dismissProgressView()
if (it?.data == null) {
Apm.reportCustom("login", "third_login_error", Exception("${it.code},${it.msg}"))
ToastUtil.toastShort(it.msg)
return@subscribe
}
......@@ -265,6 +268,7 @@ class LoginPresenterImpl(view: ILoginContract.View) :
}, {
mView.dismissProgressView()
Apm.reportCustom("login", "third_login_error", it)
YdlCommonOut.showToast(it.message!!)
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, media.getName() + "登录失败")
......
......@@ -2,7 +2,7 @@ package com.yidianling.user.ui.login.presenter
import android.annotation.SuppressLint
import android.text.TextUtils
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.app.Apm
import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
......@@ -47,10 +47,12 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
mView.startCountdown(60)
} else {
mView.startAnim()
Apm.reportCustom("login", "getcode_error", Exception("${phone},${it.code},${it.msg}"))
ToastUtil.toastShort(it.msg)
}
}, {
mView.startAnim()
Apm.reportCustom("login", "getcode_error", it)
ToastUtil.toastShort(it.message)
})
}
......@@ -113,11 +115,13 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
} else {
ToastUtil.toastShort(it.msg)//服务端返回{验证码错误&异常}信息
// mView.startAnim()
Apm.reportCustom("login", "bind_mobile_error", Exception("${param.countryCode}-${param.phoneNumber},${it.code},${it.msg}"))
mView.verificationErrorCode()
}
}, {
// mView.startAnim()
mView.verificationErrorCode()
Apm.reportCustom("login", "bind_mobile_error", it)
ToastUtil.toastShort(it.message)
})
......@@ -189,10 +193,12 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
} else {
ToastUtil.toastShort(it.msg)//服务端返回{验证码错误&异常}信息
// mView.startAnim()
Apm.reportCustom("login", "code_error", Exception("${phoneCountryCode}-${phone},${it.code},${it.msg}"))
mView.verificationErrorCode()
}
}, {
mView.startAnim()
Apm.reportCustom("login", "code_error", it)
ToastUtil.toastShort(it.message)
})
}
......
......@@ -5,8 +5,8 @@ import android.app.Activity
import android.app.Dialog
import android.graphics.Point
import android.os.Bundle
import androidx.appcompat.app.AlertDialog
import android.view.*
import androidx.appcompat.app.AlertDialog
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.utils.StringUtils
import com.ydl.ydlcommon.utils.log.AliYunLogConfig
......@@ -192,7 +192,6 @@ class PayDialog : Dialog {
LogHelper.getInstance().writeLogSync("支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付成功")
this.callBack?.onSuccess()
dismiss()
}, {
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付失败:${it.message}")
......
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