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
10959779
Commit
10959779
authored
May 21, 2021
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:消息查看订单标题栏显示问题修复
parent
7fb1dfd9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
67 deletions
+7
-67
OrderAction.java
m-im/src/main/java/com/yidianling/im/session/action/OrderAction.java
+2
-58
im_ui_message_custom_order_alreadydone.xml
m-im/src/main/res/layout/im_ui_message_custom_order_alreadydone.xml
+5
-9
No files found.
m-im/src/main/java/com/yidianling/im/session/action/OrderAction.java
View file @
10959779
package
com
.
yidianling
.
im
.
session
.
action
;
import
android.text.TextUtils
;
import
com.ydl.webview.H5Params
;
import
com.ydl.webview.NewH5Activity
;
import
com.ydl.ydlcommon.base.config.HttpConfig
;
import
com.ydl.ydlcommon.base.lifecycle.ILifecycleable
;
import
com.ydl.ydlcommon.data.http.BaseResponse
;
import
com.ydl.ydlcommon.data.http.RxUtils
;
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
;
import
com.ydl.ydlcommon.utils.remind.ToastHelper
;
import
com.yidianling.im.R
;
import
com.yidianling.im.http.ImHttpImpl
;
import
com.yidianling.im.http.ImRetrofitApi
;
import
com.yidianling.im.http.param.ExpertParam
;
import
com.yidianling.nimbase.business.session.actions.BaseAction
;
import
com.yidianling.im.api.bean.IMExpertBuild
;
import
org.jetbrains.annotations.NotNull
;
import
io.reactivex.Observable
;
import
io.reactivex.disposables.Disposable
;
/**
* author : Zhangwenchao
...
...
@@ -37,47 +21,7 @@ public class OrderAction extends BaseAction {
@Override
public
void
onClick
()
{
ILifecycleable
lifecycleable
=
null
;
if
(
getActivity
()
instanceof
ILifecycleable
)
{
lifecycleable
=
(
ILifecycleable
)(
getActivity
());
}
//先根据uid判断用户类型:专家调一个接口,非专家调另外的接口
Disposable
dis
=
ImRetrofitApi
.
Companion
.
getImJavaApi
().
getUserType
(
getAccount
())
.
compose
(
RxUtils
.
applySchedulers
(
lifecycleable
))
.
subscribe
(
res
->
{
if
(
res
.
code
==
200
)
{
Observable
<
BaseResponse
<
IMExpertBuild
>>
observable
;
if
(
TextUtils
.
equals
(
res
.
data
.
getUserType
(),
"2"
))
{
//专家
observable
=
ImRetrofitApi
.
Companion
.
getImJavaApi
().
getPersonalChat
(
getAccount
());
}
else
{
observable
=
ImHttpImpl
.
Companion
.
getInstance
().
getExpert
(
new
ExpertParam
(
Integer
.
valueOf
(
getAccount
()),
0
));
}
Disposable
disposable
=
observable
.
compose
(
RxUtils
.
applySchedulers
())
.
subscribe
(
resp
->
{
if
(
resp
!=
null
&&
resp
.
data
!=
null
&&
resp
.
data
.
shareData
!=
null
&&
!
TextUtils
.
isEmpty
(
resp
.
data
.
shareData
.
order_url
))
{
// NewH5Activity.start(getActivity(), new H5Params(resp.data.shareData.order_url + "?search=" + resp.data.shareData.doctorName, "订单"));
H5Params
h5Params3
=
new
H5Params
(
HttpConfig
.
Companion
.
getMH5_URL
()
+
"wb/user/order/list?needOrderHelperAlert=1"
,
"订单"
);
NewH5Activity
.
start
(
getActivity
(),
h5Params3
);
}
else
{
if
(
resp
!=
null
)
{
ToastHelper
.
Companion
.
show
(
resp
.
msg
);
}
}
},
new
ThrowableConsumer
()
{
@Override
public
void
accept
(
@NotNull
String
msg
)
{
ToastHelper
.
Companion
.
show
(
msg
);
}
});
}
else
{
ToastHelper
.
Companion
.
show
(
res
.
msg
);
}
},
throwable
->
{
ToastHelper
.
Companion
.
show
(
throwable
.
getMessage
());
});
H5Params
h5Params3
=
new
H5Params
(
HttpConfig
.
Companion
.
getMH5_URL
()
+
"wb/user/order/list?needOrderHelperAlert=1"
,
null
);
NewH5Activity
.
start
(
getActivity
(),
h5Params3
);
}
}
m-im/src/main/res/layout/im_ui_message_custom_order_alreadydone.xml
View file @
10959779
...
...
@@ -34,22 +34,18 @@
android:id=
"@+id/rl_center"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_title"
android:layout_marginTop=
"8dp"
android:background=
"@drawable/im_bg_radius_f7_2"
android:paddingLeft=
"12dp"
android:paddingTop=
"8dp"
android:paddingRight=
"12dp"
android:paddingBottom=
"8dp"
>
android:paddingTop=
"8dp"
android:paddingBottom=
"8dp"
android:layout_below=
"@+id/tv_title"
android:layout_marginTop=
"8dp"
android:background=
"@drawable/im_bg_radius_f7_2"
>
<TextView
android:id=
"@+id/tv_package"
android:layout_width=
"24dp"
android:layout_height=
"14dp"
android:layout_marginTop=
"3dp"
android:layout_marginRight=
"3dp"
android:background=
"@drawable/im_bg_radius_yellow_1"
android:gravity=
"center"
android:text=
"套餐"
android:textColor=
"@color/platform_color_FFFFFF"
android:textSize=
"10dp"
...
...
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