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
7d5a3b03
Commit
7d5a3b03
authored
Jan 04, 2020
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加私聊默认文案获取接口
parent
4779cea0
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
6 deletions
+52
-6
config.gradle
config.gradle
+3
-3
YDLP2PMessageActivity.java
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLP2PMessageActivity.java
+24
-0
InputPanel.java
m-im/src/main/java/com/yidianling/uikit/business/session/module/input/InputPanel.java
+5
-1
ServiceApi.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceApi.kt
+6
-0
ServiceImpl.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
+7
-0
SystemInfoBean.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/response/SystemInfoBean.kt
+6
-0
im_nim_message_activity_text_layout.xml
m-im/src/main/res_uikit/layout/im_nim_message_activity_text_layout.xml
+1
-2
No files found.
config.gradle
View file @
7d5a3b03
...
@@ -47,7 +47,7 @@ ext {
...
@@ -47,7 +47,7 @@ ext {
"m-fm"
:
"0.0.24"
,
"m-fm"
:
"0.0.24"
,
"m-user"
:
"0.0.42"
,
"m-user"
:
"0.0.42"
,
"m-home"
:
"0.0.8.2"
,
"m-home"
:
"0.0.8.2"
,
"m-im"
:
"0.0.4.1"
,
"m-im"
:
"0.0.4.
6
1"
,
"m-dynamic"
:
"0.0.2"
,
"m-dynamic"
:
"0.0.2"
,
"m-muse"
:
"0.0.21"
,
"m-muse"
:
"0.0.21"
,
...
@@ -64,7 +64,7 @@ ext {
...
@@ -64,7 +64,7 @@ ext {
"m-tests-api"
:
"0.0.1"
,
"m-tests-api"
:
"0.0.1"
,
"m-user-api"
:
"0.0.9"
,
"m-user-api"
:
"0.0.9"
,
"m-home-api"
:
"0.0.3"
,
"m-home-api"
:
"0.0.3"
,
"m-im-api"
:
"0.0.
5
"
,
"m-im-api"
:
"0.0.
6.1
"
,
"m-dynamic-api"
:
"0.0.1"
,
"m-dynamic-api"
:
"0.0.1"
,
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
...
@@ -110,7 +110,7 @@ ext {
...
@@ -110,7 +110,7 @@ ext {
"m-tests-api"
:
"0.0.1"
,
"m-tests-api"
:
"0.0.1"
,
"m-user-api"
:
"0.0.9"
,
"m-user-api"
:
"0.0.9"
,
"m-home-api"
:
"0.0.3"
,
"m-home-api"
:
"0.0.3"
,
"m-im-api"
:
"0.0.
5
"
,
"m-im-api"
:
"0.0.
6.1
"
,
"m-dynamic-api"
:
"0.0.1"
,
"m-dynamic-api"
:
"0.0.1"
,
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLP2PMessageActivity.java
View file @
7d5a3b03
package
com
.
yidianling
.
uikit
.
business
.
session
.
activity
;
package
com
.
yidianling
.
uikit
.
business
.
session
.
activity
;
import
android.annotation.SuppressLint
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.util.DisplayMetrics
;
import
android.util.DisplayMetrics
;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
android.widget.Toast
;
import
android.widget.Toast
;
...
@@ -26,9 +28,13 @@ import com.yidianling.uikit.api.NimUIKit;
...
@@ -26,9 +28,13 @@ import com.yidianling.uikit.api.NimUIKit;
import
com.yidianling.uikit.business.session.fragment.YDLMessageFragment
;
import
com.yidianling.uikit.business.session.fragment.YDLMessageFragment
;
import
com.yidianling.uikit.custom.bridge.ActionHandlerStorage
;
import
com.yidianling.uikit.custom.bridge.ActionHandlerStorage
;
import
com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler
;
import
com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler
;
import
com.yidianling.uikit.custom.http.ServiceImpl
;
import
java.util.List
;
import
java.util.List
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.schedulers.Schedulers
;
/**
/**
* 点对点聊天界面
* 点对点聊天界面
* <p/>
* <p/>
...
@@ -84,6 +90,9 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
...
@@ -84,6 +90,9 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
registerObservers
(
true
);
registerObservers
(
true
);
NIMClient
.
getService
(
MsgService
.
class
).
clearUnreadCount
(
sessionId
,
SessionTypeEnum
.
P2P
);
NIMClient
.
getService
(
MsgService
.
class
).
clearUnreadCount
(
sessionId
,
SessionTypeEnum
.
P2P
);
//初始化输入框中的hint消息
initDefaultHintMessage
();
}
}
@Override
@Override
...
@@ -123,6 +132,21 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
...
@@ -123,6 +132,21 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
}
}
}
}
@SuppressLint
(
"CheckResult"
)
private
void
initDefaultHintMessage
()
{
ServiceImpl
.
Companion
.
getInstance
().
getHintMessage
()
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
res
->
{
if
(
res
.
data
!=
null
&&
!
TextUtils
.
isEmpty
(
res
.
data
.
getValue1
()))
{
if
(
messageFragment
.
getInputPanel
().
getInputContent
()
==
null
||
messageFragment
.
getInputPanel
().
getInputContent
().
equals
(
""
))
{
messageFragment
.
getInputPanel
().
setInputHintContent
(
res
.
data
.
getValue1
());
}
}
},
throwable
->
{
});
}
@Override
@Override
protected
void
onStop
()
{
protected
void
onStop
()
{
super
.
onStop
();
super
.
onStop
();
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/module/input/InputPanel.java
View file @
7d5a3b03
...
@@ -137,6 +137,11 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
...
@@ -137,6 +137,11 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
messageEditText
.
setText
(
content
==
null
?
""
:
content
);
messageEditText
.
setText
(
content
==
null
?
""
:
content
);
}
}
//设置输入框hint内容
public
void
setInputHintContent
(
String
content
)
{
messageEditText
.
setHint
(
content
==
null
?
""
:
content
);
}
//获取当前聊天输入框内容
//获取当前聊天输入框内容
public
String
getInputContent
()
{
public
String
getInputContent
()
{
return
messageEditText
.
getText
().
toString
();
return
messageEditText
.
getText
().
toString
();
...
@@ -296,7 +301,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
...
@@ -296,7 +301,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
@Override
@Override
public
void
onFocusChange
(
View
v
,
boolean
hasFocus
)
{
public
void
onFocusChange
(
View
v
,
boolean
hasFocus
)
{
messageEditText
.
setHint
(
""
);
checkSendButtonEnable
(
messageEditText
);
checkSendButtonEnable
(
messageEditText
);
}
}
});
});
...
...
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceApi.kt
View file @
7d5a3b03
...
@@ -59,4 +59,9 @@ interface ServiceApi{
...
@@ -59,4 +59,9 @@ interface ServiceApi{
@GET
(
"consult/expert-page/products"
)
@GET
(
"consult/expert-page/products"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
serviceList
(
@Query
(
"doctorId"
)
doctorId
:
String
):
Observable
<
BaseAPIResponse
<
List
<
ServiceItemBean
>>>
fun
serviceList
(
@Query
(
"doctorId"
)
doctorId
:
String
):
Observable
<
BaseAPIResponse
<
List
<
ServiceItemBean
>>>
//获取输入框的hint内容
@GET
(
"systemconfig/get-chat-remind-config"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
getHintMessage
():
Observable
<
BaseAPIResponse
<
SystemInfoBean
>>
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
View file @
7d5a3b03
...
@@ -83,4 +83,10 @@ class ServiceImpl private constructor(){
...
@@ -83,4 +83,10 @@ class ServiceImpl private constructor(){
fun
serviceList
(
doctorId
:
String
):
Observable
<
BaseAPIResponse
<
List
<
ServiceItemBean
>>>
{
fun
serviceList
(
doctorId
:
String
):
Observable
<
BaseAPIResponse
<
List
<
ServiceItemBean
>>>
{
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
serviceList
(
doctorId
)
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
serviceList
(
doctorId
)
}
}
/**
* 获取输入框的hint内容
*/
fun
getHintMessage
():
Observable
<
BaseAPIResponse
<
SystemInfoBean
>>
{
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
getHintMessage
()
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/response/SystemInfoBean.kt
0 → 100644
View file @
7d5a3b03
package
com.yidianling.uikit.custom.http.response
class
SystemInfoBean
(
var
value1
:
String
=
""
)
\ No newline at end of file
m-im/src/main/res_uikit/layout/im_nim_message_activity_text_layout.xml
View file @
7d5a3b03
...
@@ -78,10 +78,9 @@
...
@@ -78,10 +78,9 @@
android:layout_weight=
"1"
android:layout_weight=
"1"
android:autoLink=
"all"
android:autoLink=
"all"
android:background=
"#ffffff"
android:background=
"#ffffff"
android:hint=
"隐私保密,安心咨询"
android:maxHeight=
"72dp"
android:maxHeight=
"72dp"
android:maxLines=
"4"
android:maxLines=
"4"
android:textColorHint=
"#
999999
"
android:textColorHint=
"#
CCCCCC
"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
</LinearLayout>
</LinearLayout>
...
...
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