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
3839b0c4
Commit
3839b0c4
authored
Dec 20, 2019
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网络库空指针,首页和消息模块的部分bug
parent
c0d6d99e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
99 additions
and
65 deletions
+99
-65
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+1
-1
WVClickAbstractListener.java
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
+16
-0
WebJavascriptHandler.kt
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
+3
-0
WebViewClientClickListener.java
app/src/main/java/com/ydl/component/service/web/WebViewClientClickListener.java
+2
-0
config.gradle
config.gradle
+7
-7
HomeConfideRecyleSuspendListener.kt
m-home/src/ydl/java/com/yidianling/home/listener/HomeConfideRecyleSuspendListener.kt
+54
-56
IMServiceImpl.kt
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
+5
-0
IImService.kt
m-im/src/main/modular_api/com/yidianling/im/api/service/IImService.kt
+6
-0
H5JsBean.kt
ydl-webview/src/main/java/com/ydl/webview/H5JsBean.kt
+1
-0
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+4
-1
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
3839b0c4
...
@@ -20,7 +20,7 @@ import java.util.List;
...
@@ -20,7 +20,7 @@ import java.util.List;
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
String
APP_DOMAIN
=
"https://api.github.com/"
;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_
PROD
;
public
static
String
appEnv
=
YDLConstants
.
ENV_
TEST
;
// public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_TEST;
@Override
@Override
...
...
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
View file @
3839b0c4
...
@@ -3,6 +3,7 @@ package com.ydl.component.service.web;
...
@@ -3,6 +3,7 @@ package com.ydl.component.service.web;
import
android.app.Activity
;
import
android.app.Activity
;
import
com.ydl.webview.H5JsBean
;
import
com.ydl.webview.H5JsBean
;
import
com.ydl.webview.NewH5Activity
;
/**
/**
* webview 点击事件监听 抽象类
* webview 点击事件监听 抽象类
...
@@ -395,4 +396,19 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
...
@@ -395,4 +396,19 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
public
void
goHome
(
H5JsBean
.
H5JsCmd
.
Params
params
)
{
public
void
goHome
(
H5JsBean
.
H5JsCmd
.
Params
params
)
{
}
}
@Override
public
void
sendUnReadNum
(
String
callbackFuncName
,
String
uid
)
{
final
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
callbackFuncName
);
sb
.
append
(
"('"
);
sb
.
append
(
"333"
);
sb
.
append
(
"')"
);
if
(
mContext
instanceof
NewH5Activity
)
{
((
NewH5Activity
)
mContext
).
callJSFunc
(
sb
.
toString
());
}
}
}
}
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
View file @
3839b0c4
...
@@ -364,6 +364,9 @@ class WebJavascriptHandler : IJavascriptHandler{
...
@@ -364,6 +364,9 @@ class WebJavascriptHandler : IJavascriptHandler{
"goHome"
->
{
"goHome"
->
{
wvEnventPro
?.
goHome
(
jsData
.
cmd
?.
params
)
wvEnventPro
?.
goHome
(
jsData
.
cmd
?.
params
)
}
}
"chatUnread"
->
{
wvEnventPro
?.
sendUnReadNum
(
jsData
.
cmd
!!
.
callBack
,
jsData
.
cmd
!!
.
params
?.
uid
.
toString
())
}
}
}
}
}
}
}
app/src/main/java/com/ydl/component/service/web/WebViewClientClickListener.java
View file @
3839b0c4
...
@@ -173,4 +173,6 @@ public interface WebViewClientClickListener {
...
@@ -173,4 +173,6 @@ public interface WebViewClientClickListener {
void
goHome
(
H5JsBean
.
H5JsCmd
.
Params
params
);
void
goHome
(
H5JsBean
.
H5JsCmd
.
Params
params
);
//保存图片
//保存图片
// void storePic();
// void storePic();
void
sendUnReadNum
(
String
callbackFuncName
,
String
uid
);
}
}
config.gradle
View file @
3839b0c4
...
@@ -5,8 +5,8 @@ ext {
...
@@ -5,8 +5,8 @@ ext {
ydl_app
=
[
ydl_app
=
[
appName
:
"心理咨询壹点灵"
,
appName
:
"心理咨询壹点灵"
,
applicationId:
"com.cxzapp.yidianling"
,
applicationId:
"com.cxzapp.yidianling"
,
versionName
:
"4.0.
00
"
,
versionName
:
"4.0.
31
"
,
versionCode
:
40
00
,
versionCode
:
40
31
,
]
]
xlzx_app
=
[
xlzx_app
=
[
...
@@ -47,7 +47,7 @@ ext {
...
@@ -47,7 +47,7 @@ ext {
"m-consultant"
:
"0.0.51.3"
,
"m-consultant"
:
"0.0.51.3"
,
"m-fm"
:
"0.0.23.3"
,
"m-fm"
:
"0.0.23.3"
,
"m-user"
:
"0.0.40.3"
,
"m-user"
:
"0.0.40.3"
,
"m-home"
:
"0.0.6.1
8
"
,
"m-home"
:
"0.0.6.1
9
"
,
"m-muse"
:
"0.0.20.3"
,
"m-muse"
:
"0.0.20.3"
,
"m-tests"
:
"0.0.15.2"
,
"m-tests"
:
"0.0.15.2"
,
...
@@ -66,7 +66,7 @@ ext {
...
@@ -66,7 +66,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.
3
"
,
"m-im-api"
:
"0.0.
4
"
,
"m-dynamic-api"
:
"0.0.1"
,
"m-dynamic-api"
:
"0.0.1"
,
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
...
@@ -74,7 +74,7 @@ ext {
...
@@ -74,7 +74,7 @@ ext {
"ydl-platform"
:
"0.0.29.1"
,
"ydl-platform"
:
"0.0.29.1"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.28.
4
"
,
"ydl-webview"
:
"0.0.28.
5
"
,
"ydl-media"
:
"0.0.14.3"
,
"ydl-media"
:
"0.0.14.3"
,
"ydl-pay"
:
"0.0.11.4"
,
"ydl-pay"
:
"0.0.11.4"
,
"m-audioim"
:
"0.0.40.3"
,
"m-audioim"
:
"0.0.40.3"
,
...
@@ -111,7 +111,7 @@ ext {
...
@@ -111,7 +111,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.
3
"
,
"m-im-api"
:
"0.0.
4
"
,
"m-dynamic-api"
:
"0.0.1"
,
"m-dynamic-api"
:
"0.0.1"
,
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
...
@@ -119,7 +119,7 @@ ext {
...
@@ -119,7 +119,7 @@ ext {
"ydl-platform"
:
"0.0.29.1"
,
"ydl-platform"
:
"0.0.29.1"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.28.
3
"
,
"ydl-webview"
:
"0.0.28.
5
"
,
"ydl-media"
:
"0.0.14.3"
,
"ydl-media"
:
"0.0.14.3"
,
"ydl-pay"
:
"0.0.11.4"
,
"ydl-pay"
:
"0.0.11.4"
,
"m-audioim"
:
"0.0.40.3"
,
"m-audioim"
:
"0.0.40.3"
,
...
...
m-home/src/ydl/java/com/yidianling/home/listener/HomeConfideRecyleSuspendListener.kt
View file @
3839b0c4
...
@@ -104,73 +104,71 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
...
@@ -104,73 +104,71 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
if
(
mCurrentPosition
!=
manager
.
findFirstVisibleItemPosition
()
&&
manager
.
findFirstVisibleItemPosition
()
!=
-
1
)
{
if
(
mCurrentPosition
!=
manager
.
findFirstVisibleItemPosition
()
&&
manager
.
findFirstVisibleItemPosition
()
!=
-
1
)
{
mCurrentPosition
=
manager
.
findFirstVisibleItemPosition
()
mCurrentPosition
=
manager
.
findFirstVisibleItemPosition
()
}
}
if
(
adapter
!!
.
itemCount
>
mCurrentPosition
&&
mCurrentPosition
!=
0
)
{
if
(
adapter
!!
.
getItemViewType
(
mCurrentPosition
)
==
YdlHomeViewHolderConstract
.
CONFIDE_VIEW
)
{
if
(
adapter
!!
.
getItemViewType
(
mCurrentPosition
)
==
YdlHomeViewHolderConstract
.
CONFIDE_VIEW
)
{
val
view
=
manager
.
findViewByPosition
(
mCurrentPosition
)
val
view
=
manager
.
findViewByPosition
(
mCurrentPosition
)
if
(
view
!=
null
)
{
if
(
view
!=
null
)
{
if
(
view
is
ViewGroup
)
{
if
(
view
is
ViewGroup
)
{
if
(
view
.
childCount
>
1
&&
view
.
getChildAt
(
1
)
is
TabLayout
)
{
if
(
view
.
childCount
>
1
&&
view
.
getChildAt
(
1
)
is
TabLayout
)
{
val
tabLayout
=
view
.
getChildAt
(
1
)
val
tabLayout
=
view
.
getChildAt
(
1
)
val
location
=
IntArray
(
2
)
val
location
=
IntArray
(
2
)
tabLayout
.
getLocationOnScreen
(
location
)
tabLayout
.
getLocationOnScreen
(
location
)
if
(
location
[
1
]
-
RxImageTool
.
dip2px
(
40f
)
<=
mSuspensionHeight
)
{
if
(
location
[
1
]
-
RxImageTool
.
dip2px
(
40f
)
<=
mSuspensionHeight
)
{
confideFilterView
!!
.
visibility
=
View
.
VISIBLE
confideFilterView
!!
.
visibility
=
View
.
VISIBLE
}
else
{
}
else
{
confideFilterView
!!
.
visibility
=
View
.
INVISIBLE
confideFilterView
!!
.
visibility
=
View
.
INVISIBLE
}
}
}
}
}
}
}
}
val
nextView
=
manager
.
findViewByPosition
(
mCurrentPosition
+
1
)
val
nextView
=
manager
.
findViewByPosition
(
mCurrentPosition
+
1
)
if
(
nextView
!=
null
)
{
if
(
nextView
!=
null
)
{
if
(
nextView
.
top
<=
(
mSuspensionHeight
+
RxImageTool
.
dip2px
(
41f
)))
{
if
(
nextView
.
top
<=
(
mSuspensionHeight
+
RxImageTool
.
dip2px
(
41f
)))
{
confideFilterView
!!
.
visibility
=
View
.
INVISIBLE
confideFilterView
!!
.
visibility
=
View
.
INVISIBLE
}
}
}
}
else
if
(
adapter
!!
.
getItemViewType
(
mCurrentPosition
)
==
YdlHomeViewHolderConstract
.
CONSULT_VIEW
)
{
}
val
view
=
manager
.
findViewByPosition
(
mCurrentPosition
)
}
else
if
(
adapter
!!
.
getItemViewType
(
mCurrentPosition
)
==
YdlHomeViewHolderConstract
.
CONSULT_VIEW
)
{
if
(
view
!=
null
)
{
val
view
=
manager
.
findViewByPosition
(
mCurrentPosition
)
if
(
view
is
ViewGroup
)
{
if
(
view
!=
null
)
{
if
(
view
.
getChildAt
(
1
)
is
TabLayout
)
{
if
(
view
is
ViewGroup
)
{
val
tabLayout
=
view
.
getChildAt
(
1
)
if
(
view
.
getChildAt
(
1
)
is
TabLayout
)
{
val
location
=
IntArray
(
2
)
val
tabLayout
=
view
.
getChildAt
(
1
)
tabLayout
.
getLocationOnScreen
(
location
)
val
location
=
IntArray
(
2
)
if
(
location
[
1
]
-
RxImageTool
.
dip2px
(
40f
)
<=
mSuspensionHeight
)
{
tabLayout
.
getLocationOnScreen
(
location
)
consultFilterView
?.
visibility
=
View
.
VISIBLE
if
(
location
[
1
]
-
RxImageTool
.
dip2px
(
40f
)
<=
mSuspensionHeight
)
{
}
else
{
consultFilterView
?.
visibility
=
View
.
VISIBLE
consultFilterView
?.
visibility
=
View
.
INVISIBLE
}
else
{
}
consultFilterView
?.
visibility
=
View
.
INVISIBLE
}
}
}
}
}
}
}
val
nextView
=
manager
.
findViewByPosition
(
mCurrentPosition
+
1
)
val
nextView
=
manager
.
findViewByPosition
(
mCurrentPosition
+
1
)
if
(
nextView
!=
null
)
{
if
(
nextView
!=
null
)
{
if
(
nextView
.
top
<=
(
mSuspensionHeight
+
RxImageTool
.
dip2px
(
41f
)))
{
if
(
nextView
.
top
<=
(
mSuspensionHeight
+
RxImageTool
.
dip2px
(
41f
)))
{
consultFilterView
!!
.
visibility
=
View
.
INVISIBLE
consultFilterView
!!
.
visibility
=
View
.
INVISIBLE
}
}
}
}
else
if
(
adapter
!!
.
getItemViewType
(
mCurrentPosition
)
==
YdlHomeViewHolderConstract
.
BUTTON_BANNER_VIEW
)
{
if
(
excuteStartAnim
)
{
mHomeView
?.
startAnim
()
excuteStartAnim
=
false
excuteEndAnim
=
true
}
confideFilterView
?.
visibility
=
View
.
INVISIBLE
consultFilterView
?.
visibility
=
View
.
INVISIBLE
}
else
if
(
adapter
!!
.
getItemViewType
(
mCurrentPosition
)
==
YdlHomeViewHolderConstract
.
PAGER_BANNER_VIEW
)
{
if
(
excuteEndAnim
)
{
mHomeView
?.
endAnim
()
excuteEndAnim
=
false
excuteStartAnim
=
true
}
confideFilterView
?.
visibility
=
View
.
INVISIBLE
consultFilterView
?.
visibility
=
View
.
INVISIBLE
}
else
{
confideFilterView
?.
visibility
=
View
.
INVISIBLE
consultFilterView
?.
visibility
=
View
.
INVISIBLE
}
}
}
else
if
(
adapter
!!
.
getItemViewType
(
mCurrentPosition
)
==
YdlHomeViewHolderConstract
.
BUTTON_BANNER_VIEW
)
{
if
(
excuteStartAnim
)
{
mHomeView
?.
startAnim
()
excuteStartAnim
=
false
excuteEndAnim
=
true
}
confideFilterView
?.
visibility
=
View
.
INVISIBLE
consultFilterView
?.
visibility
=
View
.
INVISIBLE
}
else
if
(
adapter
!!
.
getItemViewType
(
mCurrentPosition
)
==
YdlHomeViewHolderConstract
.
PAGER_BANNER_VIEW
)
{
if
(
excuteEndAnim
)
{
mHomeView
?.
endAnim
()
excuteEndAnim
=
false
excuteStartAnim
=
true
}
confideFilterView
?.
visibility
=
View
.
INVISIBLE
consultFilterView
?.
visibility
=
View
.
INVISIBLE
}
else
{
confideFilterView
?.
visibility
=
View
.
INVISIBLE
consultFilterView
?.
visibility
=
View
.
INVISIBLE
}
}
}
}
...
...
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
View file @
3839b0c4
...
@@ -197,4 +197,8 @@ class IMServiceImpl : IImService {
...
@@ -197,4 +197,8 @@ class IMServiceImpl : IImService {
//这里虽然是倾述流程进入私聊,但不需要发送自定义消息
//这里虽然是倾述流程进入私聊,但不需要发送自定义消息
IMUtil
.
startChat
(
context
as
AppCompatActivity
,
toUid
,
0
x001
,
canTalk
,
null
,
0
,
false
)
IMUtil
.
startChat
(
context
as
AppCompatActivity
,
toUid
,
0
x001
,
canTalk
,
null
,
0
,
false
)
}
}
override
fun
getUnReadByUid
(
uid
:
String
):
Int
{
return
MsgReceiveHelper
.
getUnNum
(
uid
)
}
}
}
\ No newline at end of file
m-im/src/main/modular_api/com/yidianling/im/api/service/IImService.kt
View file @
3839b0c4
...
@@ -51,4 +51,9 @@ interface IImService : IProvider {
...
@@ -51,4 +51,9 @@ interface IImService : IProvider {
fun
sendTestResultMessage
(
uid
:
String
,
content
:
String
,
title
:
String
?,
head
:
String
?,
url
:
String
?,
id
:
Int
,
share_url
:
String
?,
callback
:
IMRequestCallback
<
Void
>)
fun
sendTestResultMessage
(
uid
:
String
,
content
:
String
,
title
:
String
?,
head
:
String
?,
url
:
String
?,
id
:
Int
,
share_url
:
String
?,
callback
:
IMRequestCallback
<
Void
>)
fun
startChat
(
context
:
Activity
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
)
fun
startChat
(
context
:
Activity
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
)
/**
* 根据uid获取未读数
*/
fun
getUnReadByUid
(
uid
:
String
):
Int
}
}
\ No newline at end of file
ydl-webview/src/main/java/com/ydl/webview/H5JsBean.kt
View file @
3839b0c4
...
@@ -17,6 +17,7 @@ class H5JsBean {
...
@@ -17,6 +17,7 @@ class H5JsBean {
var
params
:
Params
?
=
null
var
params
:
Params
?
=
null
var
action_name
:
String
?
=
null
var
action_name
:
String
?
=
null
var
callBack
:
String
=
""
class
Params
{
class
Params
{
...
...
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
3839b0c4
...
@@ -247,6 +247,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
...
@@ -247,6 +247,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
* 15秒后发送一条消息通知展示无网络页面
* 15秒后发送一条消息通知展示无网络页面
*/
*/
private
void
sendNetLossMessage
()
{
private
void
sendNetLossMessage
()
{
if
(
null
!=
mTimeOutHandler
)
mTimeOutHandler
.
sendEmptyMessageDelayed
(
TIME_OUT_TYPE
,
timeOutLong
);
mTimeOutHandler
.
sendEmptyMessageDelayed
(
TIME_OUT_TYPE
,
timeOutLong
);
}
}
...
@@ -254,7 +255,9 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
...
@@ -254,7 +255,9 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
* 取消预定15秒后发送的消息
* 取消预定15秒后发送的消息
*/
*/
private
void
cancelSendNetLossMessage
()
{
private
void
cancelSendNetLossMessage
()
{
mTimeOutHandler
.
removeMessages
(
TIME_OUT_TYPE
);
if
(
null
!=
mTimeOutHandler
)
{
mTimeOutHandler
.
removeMessages
(
TIME_OUT_TYPE
);
}
}
}
private
void
initLoadingView
()
{
private
void
initLoadingView
()
{
...
...
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