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
e742fa88
Commit
e742fa88
authored
Aug 16, 2022
by
王佳洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,修改昵称新增需求完成
2,手机号校验完成
parent
09a07c54
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
19 deletions
+73
-19
ExpertSearchAdapter.kt
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
+16
-0
HomeConsultItemView.kt
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeConsultItemView.kt
+15
-1
home_consult_item_view.xml
m-home/src/ydl/res/layout/home_consult_item_view.xml
+1
-1
NewH5_JavascriptHandler.kt
m-js/src/main/java/com/ydl/js/NewH5_JavascriptHandler.kt
+41
-17
ModifyAvatarActivity.kt
m-user/src/main/java/com/yidianling/user/mine/ModifyAvatarActivity.kt
+0
-0
ModifyInfoActivity.kt
m-user/src/main/java/com/yidianling/user/mine/ModifyInfoActivity.kt
+0
-0
No files found.
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
View file @
e742fa88
package
com.yidianling.consultant.adapter
package
com.yidianling.consultant.adapter
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.content.Context
import
android.content.Context
import
android.graphics.Typeface
import
android.graphics.Typeface
import
android.text.SpannableStringBuilder
import
android.text.SpannableStringBuilder
...
@@ -19,10 +20,12 @@ import com.ydl.webview.NewH5Activity
...
@@ -19,10 +20,12 @@ import com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.module.GlideApp
import
com.ydl.ydl_image.module.GlideApp
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.URLUtils
import
com.ydl.ydlcommon.utils.URLUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.yidianling.consultant.IExpertSearchView
import
com.yidianling.consultant.IExpertSearchView
import
com.yidianling.consultant.R
import
com.yidianling.consultant.R
import
com.yidianling.consultant.constants.ConsultBIConstants
import
com.yidianling.consultant.constants.ConsultBIConstants
...
@@ -30,6 +33,7 @@ import com.yidianling.consultant.listener.OnExpertClickListener
...
@@ -30,6 +33,7 @@ import com.yidianling.consultant.listener.OnExpertClickListener
import
com.yidianling.consultant.model.bean.ExpertServiceItem
import
com.yidianling.consultant.model.bean.ExpertServiceItem
import
com.yidianling.consultant.modular.utils.TempH5RouteUtils
import
com.yidianling.consultant.modular.utils.TempH5RouteUtils
import
com.yidianling.consultant.router.ConsultantIn
import
com.yidianling.consultant.router.ConsultantIn
import
com.yidianling.user.api.service.IUserService
import
kotlinx.android.synthetic.main.consultant_activity_hot_search.*
import
kotlinx.android.synthetic.main.consultant_activity_hot_search.*
import
kotlinx.android.synthetic.main.consultant_expert_search_feedbackrate.view.*
import
kotlinx.android.synthetic.main.consultant_expert_search_feedbackrate.view.*
import
kotlinx.android.synthetic.main.consultant_expert_search_header_view.view.*
import
kotlinx.android.synthetic.main.consultant_expert_search_header_view.view.*
...
@@ -583,6 +587,18 @@ class ExpertSearchAdapter(
...
@@ -583,6 +587,18 @@ class ExpertSearchAdapter(
if
(!
TextUtils
.
isEmpty
(
doctor
.
uid
))
{
if
(!
TextUtils
.
isEmpty
(
doctor
.
uid
))
{
val
userService
=
findRouteService
(
IUserService
::
class
.
java
)
if
(!
userService
.
isBindPhone
()
&&
context
is
Activity
)
{
CommonDialog
(
context
)
.
setMessage
(
"为了及时接收消息通知,请立即绑定收集"
)
.
setLeftOnclick
(
"忍痛放弃"
)
{}
.
setRightClick
(
"果断绑定"
)
{
userService
.
wxBindToInputhonePage
(
context
)
// 跳转绑定手机号页面
}
.
setCancelAble
(
false
)
.
show
()
return
@setOnClickListener
}
//跳转私聊
//跳转私聊
ConsultantIn
.
startP2PSession
(
context
as
AppCompatActivity
,
doctor
.
uid
!!
)
ConsultantIn
.
startP2PSession
(
context
as
AppCompatActivity
,
doctor
.
uid
!!
)
ActionCountUtils
.
count
(
ConsultBIConstants
.
UserMainEvent
.
YDL_PRIVATE_CHAT_CLICK
)
ActionCountUtils
.
count
(
ConsultBIConstants
.
UserMainEvent
.
YDL_PRIVATE_CHAT_CLICK
)
...
...
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeConsultItemView.kt
View file @
e742fa88
...
@@ -9,15 +9,18 @@ import android.widget.FrameLayout
...
@@ -9,15 +9,18 @@ import android.widget.FrameLayout
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.utils.StringUtils
import
com.ydl.ydlcommon.utils.StringUtils
import
com.ydl.ydlcommon.utils.URLUtils
import
com.ydl.ydlcommon.utils.URLUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.home.R
import
com.yidianling.home.R
import
com.yidianling.home.constants.HomeBIConstants
import
com.yidianling.home.constants.HomeBIConstants
import
com.yidianling.home.event.IHomeBaseEvent
import
com.yidianling.home.event.IHomeBaseEvent
import
com.yidianling.home.model.bean.HomeConsultBean
import
com.yidianling.home.model.bean.HomeConsultBean
import
com.yidianling.user.api.service.IUserService
import
kotlinx.android.synthetic.ydl.home_consult_item_view.view.*
import
kotlinx.android.synthetic.ydl.home_consult_item_view.view.*
/**
/**
...
@@ -72,7 +75,6 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
...
@@ -72,7 +75,6 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
)*/
)*/
//补充点击事件埋点
//补充点击事件埋点
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_EXPERT_INTRODUCTION_CLICK
,
bean
.
uid
.
toString
())
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_EXPERT_INTRODUCTION_CLICK
,
bean
.
uid
.
toString
())
val
url
=
URLUtils
.
appendParmas
(
bean
.
linkUrl
,
"cateId"
,
cateId
)
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
dueToTypeJumpAutoOrGuide
(
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
dueToTypeJumpAutoOrGuide
(
mContext
as
Activity
,
mContext
as
Activity
,
11
,
11
,
...
@@ -134,6 +136,18 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
...
@@ -134,6 +136,18 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
*/
*/
private
fun
setConfideButton
(
bodyBean
:
HomeConsultBean
.
ListBean
)
{
private
fun
setConfideButton
(
bodyBean
:
HomeConsultBean
.
ListBean
)
{
tv_consult_chat
.
setOnClickListener
{
tv_consult_chat
.
setOnClickListener
{
val
userService
=
findRouteService
(
IUserService
::
class
.
java
)
if
(!
userService
.
isBindPhone
()
&&
context
is
Activity
)
{
CommonDialog
(
context
)
.
setMessage
(
"为了及时接收消息通知,请立即绑定收集"
)
.
setLeftOnclick
(
"忍痛放弃"
)
{}
.
setRightClick
(
"果断绑定"
)
{
userService
.
wxBindToInputhonePage
(
context
as
Activity
)
// 跳转绑定手机号页面
}
.
setCancelAble
(
false
)
.
show
()
return
@setOnClickListener
}
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
dueToTypeJumpAutoOrGuide
(
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
dueToTypeJumpAutoOrGuide
(
mContext
as
Activity
,
mContext
as
Activity
,
11
,
11
,
...
...
m-home/src/ydl/res/layout/home_consult_item_view.xml
View file @
e742fa88
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
android:id=
"@+id/tv_consult_chat"
android:id=
"@+id/tv_consult_chat"
android:layout_width=
"44dp"
android:layout_width=
"44dp"
android:layout_height=
"44dp"
android:layout_height=
"44dp"
android:layout_alignParentEnd=
"true"
android:layout_alignTop=
"@+id/img_consult_head"
android:layout_alignTop=
"@+id/img_consult_head"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"@dimen/platform_dp_13"
android:layout_marginTop=
"@dimen/platform_dp_13"
android:layout_marginEnd=
"@dimen/platform_dp_15"
android:layout_marginEnd=
"@dimen/platform_dp_15"
android:background=
"@drawable/home_consult_chat_bg"
android:background=
"@drawable/home_consult_chat_bg"
...
...
m-js/src/main/java/com/ydl/js/NewH5_JavascriptHandler.kt
View file @
e742fa88
package
com.ydl.js
package
com.ydl.js
import
android.app.Activity
import
android.content.Context
import
android.webkit.JavascriptInterface
import
android.webkit.JavascriptInterface
import
androidx.fragment.app.FragmentActivity
import
androidx.fragment.app.FragmentActivity
import
com.google.gson.Gson
import
com.google.gson.Gson
...
@@ -18,6 +20,7 @@ import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
...
@@ -18,6 +20,7 @@ import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.log.AliYunLogConfig
import
com.ydl.ydlcommon.utils.log.AliYunLogConfig
import
com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import
com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.user.api.service.IUserService
import
com.yidianling.user.api.service.IUserService
...
@@ -56,14 +59,16 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
...
@@ -56,14 +59,16 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
wvEnventPro
?.
jumpLogin
(
jsData
.
cmd
?.
params
)
wvEnventPro
?.
jumpLogin
(
jsData
.
cmd
?.
params
)
return
return
}
}
val
userService
=
findRouteService
(
IUserService
::
class
.
java
)
if
(
jsData
.
url
.
equals
(
"http"
))
{
if
(
jsData
.
url
.
equals
(
"http"
))
{
if
(
jsData
.
cmd
?.
params
?.
toUid
!=
0
)
{
if
(
jsData
.
cmd
?.
params
?.
toUid
!=
0
)
{
if
(
checkBindPhone
(
webView
?.
context
,
userService
))
return
wvEnventPro
?.
chat
(
wvEnventPro
?.
chat
(
findRouteService
(
IUserService
::
class
.
java
)
.
getUserInfo
()
?.
uid
?.
toInt
()
?:
0
,
userService
.
getUserInfo
()
?.
uid
?.
toInt
()
?:
0
,
jsData
.
cmd
?.
params
?.
toUid
?:
0
,
jsData
.
cmd
?.
params
?.
toUid
?:
0
,
0
,
0
,
findRouteService
(
IUserService
::
class
.
java
)
.
getUserInfo
()
?.
accessToken
,
userService
.
getUserInfo
()
?.
accessToken
,
jsData
.
cmd
?.
params
?.
isFromQingShu
?:
0
,
jsData
.
cmd
?.
params
?.
isFromQingShu
?:
0
,
jsData
.
cmd
?.
params
?.
closeReplaceChat
?:
false
jsData
.
cmd
?.
params
?.
closeReplaceChat
?:
false
)
)
...
@@ -72,11 +77,11 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
...
@@ -72,11 +77,11 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
}
}
}
else
if
(
jsData
.
url
.
equals
(
"ydl_app"
))
{
}
else
if
(
jsData
.
url
.
equals
(
"ydl_app"
))
{
wvEnventPro
?.
ydlNative
(
jsData
.
cmd
)
wvEnventPro
?.
ydlNative
(
jsData
.
cmd
)
jumpAction
(
jsData
)
jumpAction
(
jsData
,
userService
)
}
}
}
}
fun
jumpAction
(
jsData
:
H5JsBean
)
{
private
fun
jumpAction
(
jsData
:
H5JsBean
,
userService
:
IUserService
)
{
LogUtil
.
d
(
"jumpAction"
)
LogUtil
.
d
(
"jumpAction"
)
when
(
jsData
.
cmd
!!
.
action_name
)
{
when
(
jsData
.
cmd
!!
.
action_name
)
{
"fm"
->
if
(
jsData
.
cmd
!!
.
params
!!
.
id
>
0
)
{
"fm"
->
if
(
jsData
.
cmd
!!
.
params
!!
.
id
>
0
)
{
...
@@ -126,23 +131,26 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
...
@@ -126,23 +131,26 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
"chat"
->
"chat"
->
//私聊
//私聊
if
(
wvEnventPro
!=
null
)
{
if
(
wvEnventPro
!=
null
)
{
wvEnventPro
?.
chat
(
findRouteService
(
IUserService
::
class
.
java
).
getUserResponse
()
?.
uid
?.
toInt
()
?:
0
,
if
(
checkBindPhone
(
webView
?.
context
,
userService
))
return
jsData
.
cmd
!!
.
params
!!
.
toUid
,
0
,
wvEnventPro
.
chat
(
userService
.
getUserResponse
()
?.
uid
?.
toInt
()
?:
0
,
JsModularService
.
getIUserService
().
getUserInfo
()
?.
accessToken
,
jsData
.
cmd
!!
.
params
!!
.
toUid
,
0
,
jsData
.
cmd
!!
.
params
!!
.
isFromQingShu
,
JsModularService
.
getIUserService
().
getUserInfo
()
?.
accessToken
,
jsData
.
cmd
!!
.
params
!!
.
closeReplaceChat
jsData
.
cmd
!!
.
params
!!
.
isFromQingShu
,
jsData
.
cmd
!!
.
params
!!
.
closeReplaceChat
)
)
// 埋点
// 埋点
ActionCountUtils
.
count
(
"ydl_user_main_page|private_chat_click"
)
ActionCountUtils
.
count
(
"ydl_user_main_page|private_chat_click"
)
}
}
"chat_send_message"
->
"chat_send_message"
->
{
//跳转私聊:并发送消息
//跳转私聊:并发送消息
if
(
wvEnventPro
!=
null
)
{
if
(
checkBindPhone
(
webView
?.
context
,
userService
))
return
wvEnventPro
!!
.
chatSendMessage
(
findRouteService
(
IUserService
::
class
.
java
).
getUserResponse
()
?.
uid
?.
toInt
()
?:
0
,
wvEnventPro
?.
chatSendMessage
(
jsData
.
cmd
!!
.
params
!!
.
toUid
,
userService
.
getUserResponse
()
?.
uid
?.
toInt
()
?:
0
,
0
,
JsModularService
.
getIUserService
().
getUserInfo
()
?.
accessToken
,
jsData
.
cmd
!!
.
params
!!
.
toUid
,
jsData
.
cmd
!!
.
params
!!
.
isFromQingShu
)
0
,
JsModularService
.
getIUserService
().
getUserInfo
()
?.
accessToken
,
}
jsData
.
cmd
!!
.
params
!!
.
isFromQingShu
)
}
"chat_team"
->
"chat_team"
->
//群聊
//群聊
if
(
wvEnventPro
!=
null
)
{
if
(
wvEnventPro
!=
null
)
{
...
@@ -169,7 +177,8 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
...
@@ -169,7 +177,8 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
"set_time_warn"
->
"set_time_warn"
->
//提醒专家设置时间
//提醒专家设置时间
if
(
wvEnventPro
!=
null
)
{
if
(
wvEnventPro
!=
null
)
{
wvEnventPro
!!
.
sendSubscriptionTimeMessage
(
""
+
jsData
.
cmd
?.
params
?.
toUid
)
if
(
checkBindPhone
(
webView
?.
context
,
userService
))
return
wvEnventPro
.
sendSubscriptionTimeMessage
(
""
+
jsData
.
cmd
?.
params
?.
toUid
)
}
}
"user_home"
->
if
(
wvEnventPro
!=
null
)
{
"user_home"
->
if
(
wvEnventPro
!=
null
)
{
wvEnventPro
!!
.
openMember
(
""
+
jsData
.
cmd
?.
params
?.
uid
)
wvEnventPro
!!
.
openMember
(
""
+
jsData
.
cmd
?.
params
?.
uid
)
...
@@ -507,4 +516,19 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
...
@@ -507,4 +516,19 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
}
}
}
}
private
fun
checkBindPhone
(
context
:
Context
?,
userService
:
IUserService
):
Boolean
{
if
(!
userService
.
isBindPhone
()
&&
context
is
Activity
)
{
CommonDialog
(
context
)
.
setMessage
(
"为了及时接收消息通知,请立即绑定收集"
)
.
setLeftOnclick
(
"忍痛放弃"
)
{}
.
setRightClick
(
"果断绑定"
)
{
userService
.
wxBindToInputhonePage
(
context
)
// 跳转绑定手机号页面
}
.
setCancelAble
(
false
)
.
show
()
return
true
}
return
false
}
}
}
m-user/src/main/java/com/yidianling/user/mine/ModifyAvatarActivity.kt
View file @
e742fa88
This diff is collapsed.
Click to expand it.
m-user/src/main/java/com/yidianling/user/mine/ModifyInfoActivity.kt
View file @
e742fa88
This diff is collapsed.
Click to expand it.
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