Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
f699b29e
Commit
f699b29e
authored
Dec 17, 2019
by
konghaorui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 登录埋点数据异常
parent
5992f71e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
37 deletions
+28
-37
config.gradle
config.gradle
+4
-4
UserBIConstants.kt
m-user/src/main/java/com/yidianling/user/constants/UserBIConstants.kt
+6
-6
SmsLoginActivity.kt
m-user/src/main/java/com/yidianling/user/ui/SmsLoginActivity.kt
+3
-3
InputPassWordPresenterImpl.kt
m-user/src/main/java/com/yidianling/user/ui/login/presenter/InputPassWordPresenterImpl.kt
+6
-6
LoginPresenterImpl.kt
m-user/src/main/java/com/yidianling/user/ui/login/presenter/LoginPresenterImpl.kt
+6
-14
VerificationCodePresenterImpl.kt
m-user/src/main/java/com/yidianling/user/ui/login/presenter/VerificationCodePresenterImpl.kt
+3
-4
No files found.
config.gradle
View file @
f699b29e
ext
{
kotlin_version
=
"1.3.21"
dev_mode
=
tru
e
dev_mode
=
fals
e
ydl_app
=
[
appName
:
"心理咨询壹点灵"
,
...
...
@@ -46,7 +46,7 @@ ext {
"m-confide"
:
"0.0.40"
,
"m-consultant"
:
"0.0.49"
,
"m-fm"
:
"0.0.23"
,
"m-user"
:
"0.0.
39
"
,
"m-user"
:
"0.0.
41
"
,
"m-muse"
:
"0.0.20"
,
"m-tests"
:
"0.0.14"
,
...
...
@@ -65,7 +65,7 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.2
8.3
"
,
"ydl-platform"
:
"0.0.2
9
"
,
//第二步 若干
"ydl-webview"
:
"0.0.28"
,
...
...
@@ -105,7 +105,7 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.2
8.3
"
,
"ydl-platform"
:
"0.0.2
9
"
,
//第二步 若干
"ydl-webview"
:
"0.0.28"
,
...
...
m-user/src/main/java/com/yidianling/user/constants/UserBIConstants.kt
View file @
f699b29e
...
...
@@ -19,8 +19,8 @@ class UserBIConstants {
//百度监测 用户注册行为
const
val
APP_REGISTER_PAGE
=
"app_register_page"
const
val
POSITION_LOGIN_CLICK
=
"login_click"
//登录点击
const
val
POSITION_LOGIN_SUCCESS_CLICK
=
"login_success_click"
//登录成功点击
const
val
POSITION_LOGIN_CLICK
=
PART_ID_LOGIN_MAIN_PREFIX
+
"login_click"
//登录点击
const
val
POSITION_LOGIN_SUCCESS_CLICK
=
PART_ID_LOGIN_MAIN_PREFIX
+
"login_success_click"
//登录成功点击
//百度监测 应用启动
const
val
POSITION_APP_START_UP_CLICK
=
"app_start_up_click"
//应用启动
...
...
@@ -42,10 +42,10 @@ class UserBIConstants {
* action type
* 行为数据埋点,sign1字段 是对同一key下多种不同行为的描述
*/
const
val
ACTION_TYPE_CODE_LOGIN
:
String
=
PART_ID_LOGIN_MAIN_PREFIX
+
"code_login"
//验证码登录
const
val
ACTION_TYPE_RESET_PWD
:
String
=
PART_ID_LOGIN_MAIN_PREFIX
+
"reset_pwd"
//重置密码登录
const
val
ACTION_TYPE_PWD_LOGIN
:
String
=
PART_ID_LOGIN_MAIN_PREFIX
+
"pwd_login"
//手机号密码登录
const
val
ACTION_TYPE_DIRECT_LOGIN
:
String
=
PART_ID_LOGIN_MAIN_PREFIX
+
"direct_login"
//一键登录
const
val
ACTION_TYPE_CODE_LOGIN
:
String
=
"code_login"
//验证码登录
const
val
ACTION_TYPE_RESET_PWD
:
String
=
"reset_pwd"
//重置密码登录
const
val
ACTION_TYPE_PWD_LOGIN
:
String
=
"pwd_login"
//手机号密码登录
const
val
ACTION_TYPE_DIRECT_LOGIN
:
String
=
"direct_login"
//一键登录
const
val
ACTION_TYPE_QQ_THIRD_LOGIN
:
String
=
"qq_login"
//QQ登录
const
val
ACTION_TYPE_WX_THIRD_LOGIN
:
String
=
"wx_login"
//WX登录
}
...
...
m-user/src/main/java/com/yidianling/user/ui/SmsLoginActivity.kt
View file @
f699b29e
...
...
@@ -16,9 +16,9 @@ import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.yidianling.router.im.IMLoginInfo
import
com.yidianling.router.im.IMRequestCallback
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.LoginUtils
import
com.yidianling.user.UserConstants
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.constants.UserBIConstants
import
com.yidianling.user.http.UserHttp
import
com.yidianling.user.http.UserHttpImpl
...
...
@@ -134,7 +134,7 @@ class SmsLoginActivity : BaseActivity() {
return
}
ActionCountUtils
.
count
(
UserBIConstants
.
ACTION_TYPE_CODE_LOGIN
)
ActionCountUtils
.
count
(
UserBIConstants
.
POSITION_LOGIN_CLICK
,
UserBIConstants
.
ACTION_TYPE_CODE_LOGIN
)
Log
.
e
(
"短信验证码:"
,
code
+
" - "
+
phoneNum
+
" - "
+
et_code
.
text
.
toString
());
loginSub
=
userHttp
.
login
(
LoginParam
(
code
,
phoneNum
,
null
,
2
,
et_code
.
text
.
toString
()))
...
...
@@ -150,7 +150,7 @@ class SmsLoginActivity : BaseActivity() {
if
(
it
.
firstLogin
==
1
)
{
baiduActionBury
()
}
else
{
ActionCountUtils
.
countUid
(
it
.
uid
!!
,
UserBIConstants
.
ACTION_TYPE_CODE_LOGIN
)
ActionCountUtils
.
countUid
(
UserBIConstants
.
POSITION_LOGIN_SUCCESS_CLICK
,
it
.
uid
!!
,
UserBIConstants
.
ACTION_TYPE_CODE_LOGIN
)
}
ActivityManager
.
finishActivity
(
LoginActivity
::
class
.
java
)
if
(
ActivityManager
.
getActivitySize
()
<=
1
)
{
...
...
m-user/src/main/java/com/yidianling/user/ui/login/presenter/InputPassWordPresenterImpl.kt
View file @
f699b29e
...
...
@@ -5,13 +5,12 @@ import android.text.TextUtils
import
com.ydl.ydlcommon.mvp.base.BasePresenter
import
com.ydl.ydlcommon.router.YdlCommonOut
import
com.ydl.ydlcommon.utils.StringUtils
import
com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.LoginUtils
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.constants.UserBIConstants
import
com.yidianling.user.http.request.PhoneLoginPwdParam
import
com.yidianling.user.http.request.PhoneResetPwdParam
...
...
@@ -39,7 +38,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
*/
override
fun
resetPwd
(
newPassword
:
String
,
phone
:
String
,
msgCode
:
String
,
phoneCountryCode
:
String
)
{
ActionCountUtils
.
count
(
UserBIConstants
.
ACTION_TYPE_RESET_PWD
)
ActionCountUtils
.
count
(
UserBIConstants
.
POSITION_LOGIN_CLICK
,
UserBIConstants
.
ACTION_TYPE_RESET_PWD
)
var
param
=
PhoneResetPwdParam
(
StringUtils
.
md5
(
newPassword
),
phoneCountryCode
,
msgCode
,
phone
)
mModel
.
resetPwd
(
param
)
...
...
@@ -56,7 +55,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
}
else
{
ToastUtil
.
toastShort
(
"修改密码成功"
)
saveUserData
(
it
.
data
)
ActionCountUtils
.
count
(
UserBIConstants
.
ACTION_TYPE_RESET_PWD
)
ActionCountUtils
.
count
Uid
(
UserBIConstants
.
POSITION_LOGIN_SUCCESS_CLICK
,
it
.
data
.
uid
!!
,
UserBIConstants
.
ACTION_TYPE_RESET_PWD
)
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
// 重设密码登录已经不可能是首次登录,所以不进行百度埋点
//view.baiduActionBury()
...
...
@@ -77,7 +76,8 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
@SuppressLint
(
"CheckResult"
)
override
fun
userLoginByPassword
(
inputPassword
:
String
,
phone
:
String
,
phoneCountryCode
:
String
)
{
ActionCountUtils
.
count
(
UserBIConstants
.
ACTION_TYPE_PWD_LOGIN
)
ActionCountUtils
.
count
(
UserBIConstants
.
POSITION_LOGIN_CLICK
,
UserBIConstants
.
ACTION_TYPE_PWD_LOGIN
)
var
param
=
PhoneLoginPwdParam
(
StringUtils
.
md5
(
inputPassword
),
phoneCountryCode
,
phone
)
...
...
@@ -98,7 +98,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
mView
.
baiduActionBury
()
}
else
{
ActionCountUtils
.
countUid
(
UserBIConstants
.
ACTION_TYPE_PWD_LOGIN
,
it
.
data
.
uid
!!
)
ActionCountUtils
.
countUid
(
UserBIConstants
.
POSITION_LOGIN_SUCCESS_CLICK
,
it
.
data
.
uid
!!
,
UserBIConstants
.
ACTION_TYPE_PWD_LOGIN
)
}
mView
.
closeActivity
()
}
...
...
m-user/src/main/java/com/yidianling/user/ui/login/presenter/LoginPresenterImpl.kt
View file @
f699b29e
...
...
@@ -6,14 +6,12 @@ import android.text.TextUtils
import
com.umeng.socialize.bean.SHARE_MEDIA
import
com.ydl.ydlcommon.mvp.base.BasePresenter
import
com.ydl.ydlcommon.router.YdlCommonOut
import
com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.LoginUtils
import
com.yidianling.user.
UserHelper
import
com.yidianling.user.
api.bean.UserResponseBean
import
com.yidianling.user.constants.UserBIConstants
import
com.yidianling.user.http.UserHttpImpl
import
com.yidianling.user.http.request.BindPhoneJavaParam
...
...
@@ -59,7 +57,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
@SuppressLint
(
"CheckResult"
)
override
fun
autoLogin
(
bean
:
PhoneLoginAutoParam
)
{
ActionCountUtils
.
count
(
UserBIConstants
.
ACTION_TYPE_DIRECT_LOGIN
)
ActionCountUtils
.
count
(
UserBIConstants
.
POSITION_LOGIN_CLICK
,
UserBIConstants
.
ACTION_TYPE_DIRECT_LOGIN
)
mModel
.
autoLogin
(
bean
)
.
subscribeOn
(
Schedulers
.
io
())
...
...
@@ -73,7 +71,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
mView
.
baiduActionBury
(
it
.
data
.
uid
,
UserBIConstants
.
POSITION_ALIYUN_REGISTER_CLICK
)
}
else
{
ActionCountUtils
.
count
(
UserBIConstants
.
ACTION_TYPE_DIRECT_LOGIN
)
ActionCountUtils
.
count
Uid
(
UserBIConstants
.
POSITION_LOGIN_SUCCESS_CLICK
,
it
.
data
.
uid
!!
,
UserBIConstants
.
ACTION_TYPE_DIRECT_LOGIN
)
}
mView
.
autoLoginSuccess
()
...
...
@@ -175,9 +173,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
override
fun
loginByThird
(
activity
:
Activity
,
media
:
SHARE_MEDIA
)
{
val
sign1
=
if
(
media
==
SHARE_MEDIA
.
QQ
)
UserBIConstants
.
ACTION_TYPE_QQ_THIRD_LOGIN
else
UserBIConstants
.
ACTION_TYPE_WX_THIRD_LOGIN
ActionCountUtils
.
count
(
UserHelper
.
getUserInfo
()
!!
.
uid
,
UserBIConstants
.
PART_ID_LOGIN_MAIN
,
UserBIConstants
.
POSITION_LOGIN_CLICK
,
"友盟三方登录url无法获取"
,
"友盟三方登录api无法获取"
,
sign1
)
ActionCountUtils
.
count
(
UserBIConstants
.
POSITION_LOGIN_CLICK
,
sign1
)
UserHttpImpl
.
getInstance
()
...
...
@@ -203,17 +199,13 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
mView
.
baiduActionBury
(
it
.
data
.
uid
,
UserBIConstants
.
POSITION_QQ_REGISTER_CLICK
)
}
else
{
ActionCountUtils
.
count
(
UserHelper
.
getUserInfo
()
!!
.
uid
,
UserBIConstants
.
PART_ID_LOGIN_MAIN
,
UserBIConstants
.
POSITION_LOGIN_SUCCESS_CLICK
,
"友盟三方登录url无法获取"
,
"友盟三方登录api无法获取"
,
sign1
)
ActionCountUtils
.
countUid
(
UserBIConstants
.
POSITION_LOGIN_SUCCESS_CLICK
,
it
.
data
.
uid
!!
,
sign1
)
}
}
else
{
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
mView
.
baiduActionBury
(
it
.
data
.
uid
,
UserBIConstants
.
POSITION_WX_REGISTER_CLICK
)
}
else
{
ActionCountUtils
.
count
(
UserHelper
.
getUserInfo
()
!!
.
uid
,
UserBIConstants
.
PART_ID_LOGIN_MAIN
,
UserBIConstants
.
POSITION_LOGIN_SUCCESS_CLICK
,
"友盟三方登录url无法获取"
,
"友盟三方登录api无法获取"
,
sign1
)
ActionCountUtils
.
countUid
(
UserBIConstants
.
POSITION_LOGIN_SUCCESS_CLICK
,
it
.
data
.
uid
!!
,
sign1
)
}
}
},
{
...
...
m-user/src/main/java/com/yidianling/user/ui/login/presenter/VerificationCodePresenterImpl.kt
View file @
f699b29e
...
...
@@ -2,13 +2,12 @@ package com.yidianling.user.ui.login.presenter
import
android.text.TextUtils
import
com.ydl.ydlcommon.mvp.base.BasePresenter
import
com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.LoginUtils
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.constants.UserBIConstants
import
com.yidianling.user.http.request.BindPhoneJavaParam
import
com.yidianling.user.http.request.PhoneLoginCodeParam
...
...
@@ -129,7 +128,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
* 验证码验证码登录
*/
override
fun
loginByMsgCode
(
phone
:
String
,
phoneCountryCode
:
String
,
msgCode
:
String
)
{
ActionCountUtils
.
count
(
UserBIConstants
.
ACTION_TYPE_CODE_LOGIN
)
ActionCountUtils
.
count
(
UserBIConstants
.
POSITION_LOGIN_CLICK
,
UserBIConstants
.
ACTION_TYPE_CODE_LOGIN
)
var
param
=
PhoneLoginCodeParam
(
msgCode
,
phoneCountryCode
,
phone
)
mModel
.
loginByMsgCode
(
param
)
.
subscribeOn
(
Schedulers
.
io
())
...
...
@@ -146,7 +145,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
if
(
it
.
data
.
firstLogin
==
1
)
{
//第一次登录:是注册
mView
.
baiduActionBury
()
}
else
{
ActionCountUtils
.
countUid
(
UserBIConstants
.
ACTION_TYPE_CODE_LOGIN
,
it
.
data
.
uid
!!
)
ActionCountUtils
.
countUid
(
UserBIConstants
.
POSITION_LOGIN_SUCCESS_CLICK
,
it
.
data
.
uid
!!
,
UserBIConstants
.
ACTION_TYPE_CODE_LOGIN
)
}
mView
.
closeActivity
()
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment