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
b88f7457
Commit
b88f7457
authored
Sep 09, 2020
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reactor:初始化README文件,将客服小壹id 14 提取到常量中,方便后续修改
parent
9632959d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
6 deletions
+37
-6
README.md
README.md
+28
-0
P2PCustomActionHandlerImpl.java
m-im/src/main/java/com/yidianling/im/bridge/P2PCustomActionHandlerImpl.java
+2
-2
ImConstants.kt
m-im/src/main/java/com/yidianling/im/config/constants/ImConstants.kt
+2
-1
IMChatUtil.kt
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
+0
-0
IMServiceImpl.kt
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
+2
-1
NewMultiMessageFragment.kt
m-im/src/main/java/com/yidianling/im/ui/page/NewMultiMessageFragment.kt
+3
-2
No files found.
README.md
0 → 100644
View file @
b88f7457
# 壹点灵 v4.1.55
# AS 规范
尽量使用同一版本的 IDE 进行开发
编码格式统一为 UTF-8
编辑完 .kt .java、.xml 等文件后一定要 格式化,格式化,格式化(使用 AS 默认模板即可)
代码格式化:Command + Option + L | Control + Alt + L
删除多余的 import,减少警告出现,可利用 AS 的 Optimize Imports(Settings -> Keymap -> Optimize Imports)
无用import清理:Control + Option + O | Control + Alt + O
# commit 风格
使用中文表达,尽量控制在 20 个字以内(如果你发觉 20 个字描述不了,那很可能是因为这一次 commit 不够纯粹,可以考虑将之分成两部分内容或更多内容分次提交)
保持 commit 是纯粹的、详细的 (有利于我们发现问题时进行细粒化到具体内容 revert commit,而不是遇到问题需要 revert 结果把一些好的、没问题的内容也捆绑 revert 掉了)
格式:(一般情况下使用下面 7 种标识已经足够了)
feat:新功能(feature)
fix:修补bug
docs:文档(documentation)
style: 格式(不影响代码运行的变动)
refactor:重构(即不是新增功能,也不是修改bug的代码变动)
test:增加测试
chore:构建过程或辅助工具的变动
# yidianling
# yidianling
m-im/src/main/java/com/yidianling/im/bridge/P2PCustomActionHandlerImpl.java
View file @
b88f7457
...
...
@@ -274,7 +274,7 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
@Override
public
boolean
isBindPhone
(
final
Activity
activity
,
String
toUid
)
{
//小壹特殊处理,没有绑定也可以和小壹聊天
if
(
toUid
.
equals
(
"14"
))
{
if
(
toUid
.
equals
(
ImConstants
.
KEFUXIAOYI
))
{
return
true
;
}
...
...
@@ -585,7 +585,7 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
if
(
mActivity
==
null
||
mActivity
.
isFinishing
())
return
;
list
.
clear
();
if
(
"14"
.
equals
(
toChatUsername
)
||
"4108805"
.
equals
(
toChatUsername
))
{
if
(
ImConstants
.
KEFUXIAOYI
.
equals
(
toChatUsername
)
||
"4108805"
.
equals
(
toChatUsername
))
{
list
.
add
(
"历史聊天记录"
);
// list.add("返回首页");
list
.
add
(
"客服热线"
);
...
...
m-im/src/main/java/com/yidianling/im/config/constants/ImConstants.kt
View file @
b88f7457
...
...
@@ -42,7 +42,8 @@ class ImConstants {
//连接倾听未绑定手机提示
const
val
TEL_BINDPHONE
=
"电话连接需要绑定手机哦~"
const
val
KEFUXIAOYI
=
"14"
}
...
...
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
View file @
b88f7457
This diff is collapsed.
Click to expand it.
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
View file @
b88f7457
...
...
@@ -31,6 +31,7 @@ import com.yidianling.im.api.bean.IMSendCustomNotificationResultCallBack
import
com.yidianling.im.api.service.IImService
import
com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import
com.yidianling.im.config.NimApplication
import
com.yidianling.im.config.constants.ImConstants
import
com.yidianling.im.helper.IMChatUtil
import
com.yidianling.im.helper.LogoutHelper
import
com.yidianling.im.helper.ImObserversHelper
...
...
@@ -73,7 +74,7 @@ class IMServiceImpl : IImService {
context
.
startActivity
(
ImIn
.
loginWayIntent
(
context
))
return
}
SessionHelper
.
startP2PSession
(
context
,
-
1
,
"14"
,
null
,
P2PCustomActionHandlerImpl
(
"14"
,
"客服小壹"
,
"https://static.ydlcdn.com/mobile/images/avatar_girl_app.png"
))
SessionHelper
.
startP2PSession
(
context
,
-
1
,
ImConstants
.
KEFUXIAOYI
,
null
,
P2PCustomActionHandlerImpl
(
"14"
,
"客服小壹"
,
"https://static.ydlcdn.com/mobile/images/avatar_girl_app.png"
))
}
override
fun
imLogin
(
info
:
IMLoginInfo
)
{
...
...
m-im/src/main/java/com/yidianling/im/ui/page/NewMultiMessageFragment.kt
View file @
b88f7457
...
...
@@ -20,6 +20,7 @@ import com.yidianling.im.R
import
com.yidianling.im.api.event.ImLogoutEvent
import
com.yidianling.im.api.event.UpdateBottomBarUnreadNumEvent
import
com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import
com.yidianling.im.config.constants.ImConstants
import
com.yidianling.im.event.MessageListRefreshEvent
import
com.yidianling.im.event.ReQureyUnreadNum
import
com.yidianling.im.event.UpdateTabUnreadNumEvent
...
...
@@ -295,8 +296,8 @@ class NewMultiMessageFragment : BaseFragment() {
private
fun
initKefu
()
{
ll_kefu
.
setOnClickListener
{
if
(
ImIn
.
isLogin
())
{
SessionHelper
.
startP2PSession
(
context
,
-
1
,
"14"
,
null
,
P2PCustomActionHandlerImpl
(
"14"
,
"客服小壹"
,
"14"
))
SessionHelper
.
startP2PSession
(
context
,
-
1
,
ImConstants
.
KEFUXIAOYI
,
null
,
P2PCustomActionHandlerImpl
(
ImConstants
.
KEFUXIAOYI
,
"客服小壹"
,
ImConstants
.
KEFUXIAOYI
))
}
else
{
ToastUtil
.
toastShort
(
"请登录后再试"
)
}
...
...
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