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
036ec86c
Commit
036ec86c
authored
Dec 29, 2021
by
yang.kai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 无可用时间ui调整,增加埋点
parent
fc1572b5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
67 deletions
+12
-67
config.gradle
config.gradle
+2
-2
ServiceItemBean.java
m-im/src/main/java/com/yidianling/uikit/custom/http/response/ServiceItemBean.java
+3
-0
ExpertConsultServiceDetailView.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceDetailView.kt
+4
-61
ExpertConsultServiceListDialog.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceListDialog.kt
+3
-3
ExpertConsultServiceView.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceView.kt
+0
-1
No files found.
config.gradle
View file @
036ec86c
...
...
@@ -10,7 +10,7 @@ ext {
"m-fm"
:
"0.0.30.04"
,
"m-user"
:
"0.0.61.82"
,
"m-home"
:
"0.0.22.84"
,
"m-im"
:
"0.0.20.8
2
"
,
"m-im"
:
"0.0.20.8
3
"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -93,7 +93,7 @@ ext {
"m-fm"
:
"0.0.30.07"
,
"m-user"
:
"0.0.61.82"
,
"m-home"
:
"0.0.22.83"
,
"m-im"
:
"0.0.20.
77
"
,
"m-im"
:
"0.0.20.
83
"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-article"
:
"0.0.0.8"
,
...
...
m-im/src/main/java/com/yidianling/uikit/custom/http/response/ServiceItemBean.java
View file @
036ec86c
...
...
@@ -157,6 +157,8 @@ public class ServiceItemBean {
public
String
minOrderTime
;
public
String
saleAmount
;
public
int
sortIndex
;
public
String
description
;
public
String
consultWays
;
public
long
getId
()
{
return
id
;
}
...
...
@@ -513,6 +515,7 @@ public class ServiceItemBean {
private
String
spec2
;
private
String
spec2Name
;
private
double
price
;
public
String
attrCombine
;
public
int
getId
()
{
return
id
;
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceDetailView.kt
View file @
036ec86c
package
com.yidianling.uikit.custom.widget.expertConsultService.view
import
android.content.Context
import
android.util.AttributeSet
import
android.view.View
import
android.widget.LinearLayout
import
android.widget.RelativeLayout
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.base.config.GlobalConfig
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.bean.GlobalInfo
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.im.R
...
...
@@ -58,7 +54,6 @@ class ExpertConsultServiceDetailView : RelativeLayout {
* 设置数据
*/
fun
updateData
(
bean
:
ServiceItemBean
.
ProductsBean
)
{
val
mCompare
:
Comparator
<
ServiceItemBean
.
ProductsBean
.
ProductSpecDtosBean
>
=
Comparator
{
o1
,
o2
->
val
res
=
o1
.
price
.
compareTo
(
o2
.
price
)
when
{
...
...
@@ -83,7 +78,7 @@ class ExpertConsultServiceDetailView : RelativeLayout {
}
consult_service_title
.
text
=
bean
.
productDto
.
name
?:
""
consult_service_desc
.
text
=
bean
.
productDto
.
desc
?:
""
consult_service_desc
.
text
=
bean
.
productDto
.
desc
ription
?:
""
//是否是套餐
if
(
bean
.
productDto
.
isPackage
==
2
)
{
...
...
@@ -99,43 +94,12 @@ class ExpertConsultServiceDetailView : RelativeLayout {
consult_service_low_buy_time
.
visibility
=
View
.
GONE
}
//可选时间类型
var
timeStr
=
StringBuffer
(
""
)
var
timeList
:
ArrayList
<
String
>
=
ArrayList
()
bean
.
productSpecDtos
.
forEach
{
timeList
.
add
(
it
.
spec2
)
}
//去重并按规则拼接
timeList
.
distinct
().
forEachIndexed
{
index
,
str
->
if
(
index
==
0
)
{
timeStr
.
append
(
"${str}分钟"
)
}
else
{
timeStr
.
append
(
"/${str}分钟"
)
}
}
consult_service_once_time_type
.
text
=
timeStr
.
toString
()
consult_service_once_time_type
.
text
=
"${bean.productDto.minOrderTime}分钟"
//可选服务类型
var
serviceTypeStr
=
StringBuffer
(
""
)
var
serviceTypeList
:
ArrayList
<
String
>
=
ArrayList
()
bean
.
productSpecDtos
.
forEach
{
serviceTypeList
.
add
(
it
.
spec1
)
}
//去重并按规则拼接
serviceTypeList
.
distinct
().
forEachIndexed
{
index
,
str
->
val
typeStr
=
getServiceType
(
str
)
if
(
typeStr
!=
"未知"
)
{
if
(
index
==
0
)
{
serviceTypeStr
.
append
(
"$typeStr"
)
}
else
{
serviceTypeStr
.
append
(
"/$typeStr"
)
}
}
}
consult_service_service_type
.
text
=
serviceTypeStr
.
toString
()
consult_service_service_type
.
text
=
bean
.
productDto
.
consultWays
if
(
mIsBusy
){
consult_service_btn
.
background
.
alpha
=
2
00
consult_service_btn
.
background
.
alpha
=
1
00
}
consult_service_btn
.
setOnClickListener
{
if
(
mIsBusy
){
...
...
@@ -148,24 +112,4 @@ class ExpertConsultServiceDetailView : RelativeLayout {
}
}
}
private
fun
getServiceType
(
index
:
String
):
String
{
return
when
(
index
)
{
"1"
->
{
"文字"
}
"2"
->
{
"电话"
}
"3"
->
{
"当面"
}
"4"
->
{
"视频"
}
else
->
{
"未知"
}
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceListDialog.kt
View file @
036ec86c
package
com.yidianling.uikit.custom.widget.expertConsultService.view
import
`in`.srain.cube.views.GridViewWithHeaderAndFooter
import
android.app.Dialog
import
android.content.Context
import
android.os.Bundle
...
...
@@ -16,6 +17,7 @@ import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.R
import
com.yidianling.im.session.extension.CustomAttachSubScriptTime
import
com.yidianling.uikit.business.session.helper.MessageListPanelHelper
...
...
@@ -97,9 +99,7 @@ class ExpertConsultServiceListDialog(val mContext: Context, val mList: List<Serv
mViewList
.
add
(
mConsultServiceListView
as
View
)
mConsultServiceDetailView
=
ExpertConsultServiceDetailView
(
mContext
,
object
:
ConsultServiceViewCallback
{
mConsultServiceDetailView
=
ExpertConsultServiceDetailView
(
mContext
,
object
:
ConsultServiceViewCallback
{
override
fun
onBackClick
()
{
dialog_bottom_scroll_view
.
currentItem
=
0
}
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceView.kt
View file @
036ec86c
...
...
@@ -113,7 +113,6 @@ class ExpertConsultServiceView : LinearLayout {
* 刷新服务列表数据
*/
private
fun
selectTypeServiceList
()
{
LogUtil
.
e
(
"isBusy1"
,
"$mIsBusy"
)
expert_consult_service_service_list
.
removeAllViews
()
if
(
mServiceList
.
size
!=
0
)
{
val
lastList
:
ArrayList
<
ServiceItemBean
.
ProductsBean
>
=
ArrayList
()
...
...
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