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
3edfc1a4
Commit
3edfc1a4
authored
Mar 20, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 购药返回逻辑优化
parent
372e14b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
config.gradle
config.gradle
+2
-2
MedicalPayIn.kt
ydl-medical-pay/src/main/java/com/medical/ydl/medical/modular/MedicalPayIn.kt
+2
-1
MedicalPayActivity.kt
ydl-medical-pay/src/main/java/com/medical/ydl/medical/pay/MedicalPayActivity.kt
+17
-4
MedicalPaySuccessActivity.kt
ydl-medical-pay/src/main/java/com/medical/ydl/medical/pay/MedicalPaySuccessActivity.kt
+6
-3
No files found.
config.gradle
View file @
3edfc1a4
...
...
@@ -41,7 +41,7 @@ ext {
"ydl-webview"
:
"0.0.38.57"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-medical-pay"
:
"0.0.01.
29
"
,
"ydl-medical-pay"
:
"0.0.01.
31
"
,
"m-audioim"
:
"0.0.49.29.37"
,
"ydl-flutter-base"
:
"0.0.14.26"
,
...
...
@@ -126,7 +126,7 @@ ext {
"ydl-webview"
:
"0.0.38.57"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-medical-pay"
:
"0.0.01.
29
"
,
"ydl-medical-pay"
:
"0.0.01.
31
"
,
"m-audioim"
:
"0.0.49.29.37"
,
"ydl-flutter-base"
:
"0.0.14.26"
,
...
...
ydl-medical-pay/src/main/java/com/medical/ydl/medical/modular/MedicalPayIn.kt
View file @
3edfc1a4
...
...
@@ -103,9 +103,10 @@ object MedicalPayIn {
.
navigation
()
}
fun
mainIntentToWebView
(
type
:
String
)
{
fun
mainIntentToWebView
(
type
:
String
,
data
:
String
)
{
val
bundle
=
Bundle
();
bundle
.
putString
(
"webView"
,
type
)
bundle
.
putString
(
"data"
,
data
)
ARouter
.
getInstance
().
build
(
"/main/main"
)
.
withBundle
(
"webView"
,
bundle
)
.
navigation
()
...
...
ydl-medical-pay/src/main/java/com/medical/ydl/medical/pay/MedicalPayActivity.kt
View file @
3edfc1a4
...
...
@@ -37,6 +37,7 @@ import java.util.*
class
MedicalPayActivity
:
BaseActivity
()
{
companion
object
{
private
const
val
DRUG_ORDER_DETAIL
=
"medical_drug_order_detail"
//价格
private
const
val
PRICE_KEY
=
"price"
...
...
@@ -198,10 +199,10 @@ class MedicalPayActivity : BaseActivity() {
if
(
response
.
code
==
200
)
{
showCloseDialog
(
response
.
data
)
}
else
{
finish
()
payType
finish
()
}
},
{
e
->
finish
()
payType
finish
()
e
.
printStackTrace
()
})
...
...
@@ -232,7 +233,7 @@ class MedicalPayActivity : BaseActivity() {
)
{
dialog
,
which
->
//关闭页面
timer
?.
cancel
()
finish
()
payType
finish
()
dialog
.
dismiss
()
}
builder
.
setRight_color
(
"#3464EC"
)
...
...
@@ -260,7 +261,7 @@ class MedicalPayActivity : BaseActivity() {
override
fun
onFinish
()
{
builder
.
dismiss
()
finish
()
payType
finish
()
}
...
...
@@ -268,6 +269,18 @@ class MedicalPayActivity : BaseActivity() {
timer
?.
start
()
}
/**
* 不同支付场景的关闭返回路径
* */
private
fun
payTypefinish
()
{
if
(
mPayBizType
==
MEDICAL_ORDER_TYPE
)
{
MedicalPayIn
.
mainIntentToWebView
(
DRUG_ORDER_DETAIL
,
mOrderId
)
finish
()
}
else
if
(
mPayBizType
==
INQUIRY_ORDER_TYPE
)
{
finish
()
}
}
private
fun
toPay
(
response
:
BaseResponse
<
CreatePayRespose
>,
payType
:
Int
)
{
if
(
payType
==
PAY_ALI
&&
response
.
data
.
payParams
.
isNotEmpty
())
{
val
payRunnable
=
Runnable
{
...
...
ydl-medical-pay/src/main/java/com/medical/ydl/medical/pay/MedicalPaySuccessActivity.kt
View file @
3edfc1a4
...
...
@@ -49,9 +49,7 @@ class MedicalPaySuccessActivity : BaseActivity() {
iv_back
.
setOnClickListener
{
MedicalPayIn
.
mainIntentToWebView
(
MEDICAL_ORDER_LIST_KEY
)
finish
()
onBackPressed
()
}
to_order
.
setOnClickListener
{
//查看药品订单
...
...
@@ -66,6 +64,11 @@ class MedicalPaySuccessActivity : BaseActivity() {
}
override
fun
onBackPressed
()
{
MedicalPayIn
.
mainIntentToWebView
(
MEDICAL_ORDER_LIST_KEY
,
""
)
finish
()
}
private
fun
initStatus
()
{
StatusBarUtils
.
setTransparentForImageView
(
this
@MedicalPaySuccessActivity
,
null
)
...
...
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