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
a3541e56
Commit
a3541e56
authored
Apr 08, 2020
by
ydl
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/daoyi_kuoliu' into 咨询加声网
# Conflicts: # config.gradle
parents
36040170
b1ede74c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
23 deletions
+25
-23
config.gradle
config.gradle
+1
-1
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+17
-13
UserInfoDialog.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/UserInfoDialog.kt
+7
-9
No files found.
config.gradle
View file @
a3541e56
...
...
@@ -45,7 +45,7 @@ ext {
"m-confide"
:
"0.0.48.7.24"
,
"m-consultant"
:
"0.0.58.5"
,
"m-fm"
:
"0.0.29.3"
,
"m-user"
:
"0.0.60.
1
"
,
"m-user"
:
"0.0.60.
4
"
,
"m-home"
:
"0.0.19.1"
,
"m-im"
:
"0.0.17.8"
,
"m-dynamic"
:
"0.0.7.5"
,
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
a3541e56
...
...
@@ -189,6 +189,12 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private
String
server_num
;
// 服务时长
private
String
good_num
;
// 好评率
private
int
userInfoDialogAge
=
0
;
private
String
userInfoDialogSex
=
""
;
private
String
userInfoDialogConsultType
=
""
;
private
String
userInfoDialogQuestionDes
=
""
;
private
String
userInfoDialogSourceFrom
=
""
;
private
UserInfoDialog
userInfoDialog
=
null
;
@SuppressLint
(
"HandlerLeak"
)
...
...
@@ -434,32 +440,27 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
// 如果对方是用户,自己是助理,则展示标题文本右侧icon,并设置点击事件,展示用户信息弹窗
if
(
ActionHandlerStorage
.
getL
(
sessionId
).
getUserType
()
==
1
&&
ModularServiceManager
.
INSTANCE
.
provide
(
IUserService
.
class
).
getUserInfo
().
getUser_type
()
==
3
)
{
if
(
null
==
userInfoDialog
)
{
int
age
=
0
;
String
sex
=
""
;
String
consultType
=
""
;
String
questionDes
=
""
;
for
(
UserQuestInfoBean
bean
:
hasCollectedInResp
.
data
)
{
if
(
TextUtils
.
equals
(
bean
.
getUserInfoType
(),
"age"
))
{
try
{
String
year
=
bean
.
getContent
();
a
ge
=
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
)
-
Integer
.
valueOf
(
year
);
userInfoDialogA
ge
=
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
)
-
Integer
.
valueOf
(
year
);
}
catch
(
Exception
e
)
{
}
}
else
if
(
TextUtils
.
equals
(
bean
.
getUserInfoType
(),
"gener"
))
{
try
{
s
ex
=
bean
.
getContent
();
userInfoDialogS
ex
=
bean
.
getContent
();
}
catch
(
Exception
e
)
{
}
}
else
if
(
TextUtils
.
equals
(
bean
.
getUserInfoType
(),
"questionType"
))
{
try
{
c
onsultType
=
bean
.
getContent
();
userInfoDialogC
onsultType
=
bean
.
getContent
();
}
catch
(
Exception
e
)
{
}
}
else
if
(
TextUtils
.
equals
(
bean
.
getUserInfoType
(),
"questionContent"
))
{
try
{
q
uestionDes
=
bean
.
getContent
();
userInfoDialogQ
uestionDes
=
bean
.
getContent
();
}
catch
(
Exception
e
)
{
}
}
}
userInfoDialog
=
new
UserInfoDialog
(
getActivity
(),
String
.
valueOf
(
age
),
sex
,
consultType
,
questionDes
);
getSourceFrom
();
}
}
...
...
@@ -478,15 +479,18 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
res
->
{
if
(
null
!=
userInfoDialog
&&
!
TextUtils
.
isEmpty
(
res
.
data
))
{
userInfoDialog
.
setSourceFrom
(
res
.
data
)
;
if
(!
TextUtils
.
isEmpty
(
res
.
data
))
{
userInfoDialog
SourceFrom
=
res
.
data
;
}
});
}
public
void
showUserInfoDialog
()
{
if
(
null
!=
userInfoDialog
)
userInfoDialog
.
show
();
if
(
userInfoDialog
!=
null
)
{
userInfoDialog
.
dismiss
();
}
userInfoDialog
=
new
UserInfoDialog
(
getActivity
(),
userInfoDialogSourceFrom
,
String
.
valueOf
(
userInfoDialogAge
),
userInfoDialogSex
,
userInfoDialogConsultType
,
userInfoDialogQuestionDes
);
userInfoDialog
.
show
();
}
private
void
addScrollListener
()
{
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/UserInfoDialog.kt
View file @
a3541e56
...
...
@@ -3,6 +3,7 @@ package com.yidianling.uikit.custom.widget
import
android.app.Dialog
import
android.content.Context
import
android.os.Bundle
import
android.text.TextUtils
import
android.view.Gravity
import
android.view.View
import
android.view.WindowManager
...
...
@@ -15,6 +16,7 @@ import kotlinx.android.synthetic.main.im_user_info_dialog_layout.*
*/
class
UserInfoDialog
(
private
val
mContext
:
Context
,
private
val
sourceFrom
:
String
,
//来源
private
val
age
:
String
,
//年龄
private
val
sex
:
String
,
//性别
private
val
consultType
:
String
,
//咨询类型
...
...
@@ -32,6 +34,11 @@ class UserInfoDialog(
window
.
setGravity
(
Gravity
.
CENTER
)
window
.
attributes
=
params
if
(!
TextUtils
.
isEmpty
(
sourceFrom
))
{
user_info_dialog_sourceFrom
.
visibility
=
View
.
VISIBLE
user_info_dialog_sourceFrom_tv
.
text
=
sourceFrom
}
user_info_dialog_age_tv
.
text
=
age
user_info_dialog_sex_tv
.
text
=
sex
user_info_dialog_consultType_tv
.
text
=
consultType
...
...
@@ -43,12 +50,4 @@ class UserInfoDialog(
}
}
}
/**
* 设置来源
*/
fun
setSourceFrom
(
txt
:
String
)
{
user_info_dialog_sourceFrom
.
visibility
=
View
.
VISIBLE
user_info_dialog_sourceFrom_tv
.
text
=
txt
}
}
\ No newline at end of file
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