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
9f397a9e
Commit
9f397a9e
authored
Jan 13, 2020
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backup
parent
148cda53
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
89 additions
and
55 deletions
+89
-55
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+2
-2
WVClickAbstractListener.java
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
+7
-1
WebJavascriptHandler.kt
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
+5
-3
config.gradle
config.gradle
+8
-8
YDLP2PMessageActivity.java
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLP2PMessageActivity.java
+0
-18
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+32
-3
ServiceApi.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceApi.kt
+3
-2
ServiceImpl.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
+3
-2
SystemInfoBean.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/response/SystemInfoBean.kt
+3
-1
ExpertConsultServiceView.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceView.kt
+15
-2
SecretActivity.kt
m-user/src/main/java/com/yidianling/user/ui/login/SecretActivity.kt
+11
-11
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+0
-2
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
9f397a9e
...
...
@@ -20,8 +20,8 @@ import java.util.List;
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_TEST
;
//
public static String appEnv = YDLConstants.ENV_PROD;
//
public static String appEnv = YDLConstants.ENV_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_PROD
;
@Override
public
void
injectAppLifecycle
(
@NotNull
Context
context
,
@NotNull
List
<
IAppLifecycles
>
lifecycles
)
{
...
...
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
View file @
9f397a9e
...
...
@@ -4,7 +4,9 @@ package com.ydl.component.service.web;
import
android.app.Activity
;
import
com.ydl.webview.H5JsBean
;
import
com.ydl.webview.H5Params
;
import
com.ydl.webview.NewH5Activity
;
import
com.yidianling.common.tools.LogUtil
;
/**
* webview 点击事件监听 抽象类
...
...
@@ -20,7 +22,11 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override
public
void
openH5
(
H5JsBean
.
H5JsCmd
.
Params
jsData
)
{
LogUtil
.
d
(
"openH5 params: "
+
jsData
.
toString
());
H5Params
h5Params
=
new
H5Params
(
jsData
.
getUrl
(),
null
);
h5Params
.
setShareData
(
jsData
.
getShare
());
h5Params
.
setShowMenu
(
jsData
.
getDot_flag
());
NewH5Activity
.
start
(
mContext
,
h5Params
);
}
@Override
...
...
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
View file @
9f397a9e
...
...
@@ -9,6 +9,7 @@ import com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.user.UserHelper
/**
* update by harvie on 2017/7/04
...
...
@@ -48,9 +49,10 @@ class WebJavascriptHandler : IJavascriptHandler{
if
(
jsData
.
url
.
equals
(
"http"
))
{
if
(
jsData
.
cmd
?.
params
?.
toUid
!=
0
)
{
wvEnventPro
?.
chat
(
ModularServiceManager
.
getPlatformUserService
()
?.
getUser
()
?.
userId
?.
toInt
()
?:
0
,
jsData
.
cmd
?.
params
?.
toUid
?:
0
,
0
,
ModularServiceManager
.
getPlatformUserService
()
?.
getUser
()
?.
token
,
jsData
.
cmd
?.
params
?.
isFromQingShu
wvEnventPro
?.
chat
(
UserHelper
.
getUserInfo
()
?.
uid
?.
toInt
()
?:
0
,
jsData
.
cmd
?.
params
?.
toUid
?:
0
,
0
,
UserHelper
.
getUserInfo
()
?.
accessToken
,
jsData
.
cmd
?.
params
?.
isFromQingShu
?:
0
)
}
else
{
wvEnventPro
?.
openH5
(
jsData
.
cmd
?.
params
)
...
...
config.gradle
View file @
9f397a9e
ext
{
kotlin_version
=
"1.3.21"
dev_mode
=
tru
e
dev_mode
=
fals
e
ydl_app
=
[
appName
:
"心理咨询壹点灵"
,
...
...
@@ -45,9 +45,9 @@ ext {
"m-confide"
:
"0.0.43"
,
"m-consultant"
:
"0.0.53"
,
"m-fm"
:
"0.0.25"
,
"m-user"
:
"0.0.4
3
"
,
"m-user"
:
"0.0.4
4
"
,
"m-home"
:
"0.0.16"
,
"m-im"
:
"0.0.
8
"
,
"m-im"
:
"0.0.
9
"
,
"m-dynamic"
:
"0.0.3"
,
"m-muse"
:
"0.0.24"
,
...
...
@@ -69,10 +69,10 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.33.
3
"
,
"ydl-platform"
:
"0.0.33.
4
"
,
//第二步 若干
"ydl-webview"
:
"0.0.32.
2
"
,
"ydl-webview"
:
"0.0.32.
3
"
,
"ydl-media"
:
"0.0.16"
,
"ydl-pay"
:
"0.0.13"
,
"m-audioim"
:
"0.0.42"
,
...
...
@@ -81,7 +81,7 @@ ext {
"router"
:
"0.0.1"
,
"ydl-net"
:
"0.0.3.1"
,
"ydl-utils"
:
"0.0.3.1"
,
"ydl-flutter-base"
:
"0.0.6"
,
"ydl-flutter-base"
:
"0.0.6
.1
"
,
]
...
...
@@ -115,10 +115,10 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.33.
3
"
,
"ydl-platform"
:
"0.0.33.
4
"
,
//第二步 若干
"ydl-webview"
:
"0.0.32.
2
"
,
"ydl-webview"
:
"0.0.32.
3
"
,
"ydl-media"
:
"0.0.15.1"
,
"ydl-pay"
:
"0.0.12.1"
,
"m-audioim"
:
"0.0.41.1"
,
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLP2PMessageActivity.java
View file @
9f397a9e
...
...
@@ -90,9 +90,6 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
registerObservers
(
true
);
NIMClient
.
getService
(
MsgService
.
class
).
clearUnreadCount
(
sessionId
,
SessionTypeEnum
.
P2P
);
//初始化输入框中的hint消息
initDefaultHintMessage
();
}
@Override
...
...
@@ -124,21 +121,6 @@ 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
protected
void
onStop
()
{
super
.
onStop
();
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
9f397a9e
...
...
@@ -163,6 +163,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private
LinearLayout
top_view_container
;
private
LinearLayout
constraint_ll
;
private
RelativeLayout
rela_zixun
;
private
ValueAnimator
anim_out
;
private
ValueAnimator
anim_in
;
private
Boolean
expertInfoViewIsIn
=
true
;
...
...
@@ -216,6 +218,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
constraint_ll
=
rootView
.
findViewById
(
R
.
id
.
constraint_ll
);
im_focus_btn
=
rootView
.
findViewById
(
R
.
id
.
im_focus_btn
);
good_num_icons
=
rootView
.
findViewById
(
R
.
id
.
good_num_icons
);
rela_zixun
=
rootView
.
findViewById
(
R
.
id
.
rela_zixun
);
//和助理私聊时的常用语逻辑
rl_common_question_enter
=
rootView
.
findViewById
(
R
.
id
.
rl_common_question
);
...
...
@@ -331,6 +334,31 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
isFirst
=
false
;
ActionHandlerStorage
.
getL
(
sessionId
).
isNeedSendMsg
(
true
);
}
//初始化私聊页面配置
initDefaultConfig
();
}
@SuppressLint
(
"CheckResult"
)
private
void
initDefaultConfig
()
{
ServiceImpl
.
Companion
.
getInstance
().
getChatViewConfig
()
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
res
->
{
if
(
"200"
.
equals
(
res
.
code
)
&&
res
.
data
!=
null
&&
!
TextUtils
.
isEmpty
(
res
.
data
.
getInputBoxReminder
()))
{
if
(
getInputPanel
().
getInputContent
()
==
null
||
getInputPanel
().
getInputContent
().
equals
(
""
))
{
getInputPanel
().
setInputHintContent
(
res
.
data
.
getInputBoxReminder
());
}
}
if
(
"200"
.
equals
(
res
.
code
)
&&
res
.
data
!=
null
)
{
if
(
res
.
data
.
getStatus
()
==
0
)
{
if
(
null
!=
getActivity
()
&&
null
!=
rela_zixun
)
{
rela_zixun
.
setVisibility
(
View
.
GONE
);
}
}
}
},
throwable
->
{
});
}
private
void
addScrollListener
()
{
...
...
@@ -553,7 +581,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
res
->
{
if
(
"200"
.
equals
(
res
.
code
))
{
if
(
"200"
.
equals
(
res
.
code
)
&&
null
!=
getActivity
()
)
{
ToastUtil
.
toastShort
(
"关注成功"
);
im_focus_btn
.
setText
(
"已关注"
);
im_focus_btn
.
setTextColor
(
Color
.
parseColor
(
"#999999"
));
...
...
@@ -563,8 +591,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
}
},
throwable
->
{
if
(
null
!=
getActivity
())
{
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
isFollowed
=
false
;
ToastUtil
.
toastShort
(
throwable
.
toString
());
// ToastUtil.toastShort(throwable.toString());
}
});
}
}
...
...
@@ -577,7 +607,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
//初始化聊天顶部快捷菜单
@SuppressLint
(
"CheckResult"
)
private
void
initMenu
()
{
View
rela_zixun
=
rootView
.
findViewById
(
R
.
id
.
rela_zixun
);
rela_zixun
.
setOnClickListener
(
view
->
{
if
(
sessionId
!=
null
&&
ActionHandlerStorage
.
getL
(
sessionId
)
!=
null
&&
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
()
!=
null
)
{
...
...
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceApi.kt
View file @
9f397a9e
...
...
@@ -61,7 +61,7 @@ interface ServiceApi{
fun
serviceList
(
@Query
(
"doctorId"
)
doctorId
:
String
):
Observable
<
BaseAPIResponse
<
List
<
ServiceItemBean
>>>
//获取输入框的hint内容
@GET
(
"systemconfig/get-chat-
remind
-config"
)
@GET
(
"systemconfig/get-chat-
view
-config"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
get
HintMessage
():
Observable
<
BaseAPIResponse
<
SystemInfoBean
>>
fun
get
ChatViewConfig
():
Observable
<
BaseAPIResponse
<
SystemInfoBean
>>
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
View file @
9f397a9e
...
...
@@ -91,7 +91,7 @@ class ServiceImpl private constructor() {
/**
* 获取输入框的hint内容
*/
fun
get
HintMessage
():
Observable
<
BaseAPIResponse
<
SystemInfoBean
>>
{
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
get
HintMessage
()
fun
get
ChatViewConfig
():
Observable
<
BaseAPIResponse
<
SystemInfoBean
>>
{
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
get
ChatViewConfig
()
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/response/SystemInfoBean.kt
View file @
9f397a9e
package
com.yidianling.uikit.custom.http.response
class
SystemInfoBean
(
var
value1
:
String
=
""
val
inputBoxReminder
:
String
,
val
status
:
Int
)
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceView.kt
View file @
9f397a9e
...
...
@@ -18,6 +18,15 @@ class ExpertConsultServiceView : LinearLayout {
private
var
mListener
:
ConsultServiceViewCallback
?
=
null
val
mCompare
:
Comparator
<
ServiceItemBean
.
ProductsBean
>
=
Comparator
{
o1
,
o2
->
val
res
=
o1
.
productDto
.
sortOrder
.
compareTo
(
o2
.
productDto
.
sortOrder
)
when
{
res
==
0
->
0
res
>
0
->
-
1
else
->
1
}
}
constructor
(
context
:
Context
)
:
super
(
context
)
{
mContext
=
context
initView
()
...
...
@@ -107,18 +116,22 @@ class ExpertConsultServiceView : LinearLayout {
private
fun
selectTypeServiceList
()
{
expert_consult_service_service_list
.
removeAllViews
()
if
(
mServiceList
.
size
!=
0
)
{
val
lastList
:
ArrayList
<
ServiceItemBean
.
ProductsBean
>
=
ArrayList
()
mServiceList
.
forEachIndexed
{
index
,
itemBean
->
//当选中String相同的时候,添加view,或者选中typeSelectedIndex==0的时候,展示全部
if
(
itemBean
.
cateName
==
mTypeList
[
typeSelectedIndex
]
||
typeSelectedIndex
==
0
)
{
itemBean
.
products
.
forEach
{
lastList
.
add
(
it
)
}
}
}
lastList
.
sortedWith
(
mCompare
).
forEach
{
val
item
=
ExpertConsultServiceItemView
(
mContext
!!
,
mListener
)
item
.
setData
(
it
)
expert_consult_service_service_list
.
addView
(
item
)
}
}
}
}
}
/**
* 刷新类型列表数据
...
...
m-user/src/main/java/com/yidianling/user/ui/login/SecretActivity.kt
View file @
9f397a9e
package
com.yidianling.user.ui.login
import
android.annotation.SuppressLint
import
android.graphics.Color
import
android.os.Build
import
android.os.Handler
import
android.support.design.widget.CollapsingToolbarLayout
import
android.view.KeyEvent
import
android.view.View
import
android.view.WindowManager
import
android.widget.RelativeLayout
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.utils.ActivityManager
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.R
import
com.yidianling.user.UserHelper
import
com.yidianling.user.http.UserHttpImpl
import
com.yidianling.user.widget.SecretDialog
import
io.reactivex.android.schedulers.AndroidSchedulers
...
...
@@ -31,7 +23,7 @@ import kotlin.system.exitProcess
* e-mail : zhangwch@yidianling.com
* time : 2018/01/10
*/
class
SecretActivity
:
BaseActivity
()
{
class
SecretActivity
:
BaseActivity
()
{
private
var
secretDialog
:
SecretDialog
?
=
null
...
...
@@ -51,7 +43,7 @@ class SecretActivity: BaseActivity() {
user_secret_no_agree
.
setOnClickListener
{
if
(
null
==
secretDialog
)
{
secretDialog
=
SecretDialog
(
this
,
object
:
SecretDialog
.
OnSecretDialogListener
{
secretDialog
=
SecretDialog
(
this
,
object
:
SecretDialog
.
OnSecretDialogListener
{
override
fun
onCancel
()
{
Handler
().
postDelayed
({
ActivityManager
.
finishAll
()
...
...
@@ -65,7 +57,7 @@ class SecretActivity: BaseActivity() {
}
})
secretDialog
?.
show
()
}
else
{
}
else
{
secretDialog
?.
show
()
}
}
...
...
@@ -73,6 +65,14 @@ class SecretActivity: BaseActivity() {
user_secret_agree
.
setOnClickListener
{
agreeAction
()
}
user_use_btn
.
setOnClickListener
{
H5Activity
.
start
(
this
@SecretActivity
,
false
)
}
user_secret_protect_btn
.
setOnClickListener
{
H5Activity
.
start
(
this
@SecretActivity
,
true
)
}
}
@SuppressLint
(
"CheckResult"
)
...
...
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
9f397a9e
...
...
@@ -177,9 +177,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
showTestQuestionPageReturnDialog
();
});
tb_title
.
setOnLeftTextClick
((
view
,
isActive
)
->
{
if
(
isActive
)
{
showTestQuestionPageReturnDialog
();
}
});
}
}
...
...
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