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
df5a43dd
Commit
df5a43dd
authored
Mar 08, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 支付相关组件适配
parent
fe2aab27
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
32 deletions
+68
-32
config.gradle
config.gradle
+6
-6
GraphicConsulttionFlow2Activity.kt
m-im/src/main/java/com/yidianling/medical/GraphicConsulttionFlow2Activity.kt
+2
-1
build.gradle
ydl-medical-pay/build.gradle
+2
-1
MedicalPayActivity.kt
ydl-medical-pay/src/main/java/com/medical/ydl/medical/pay/MedicalPayActivity.kt
+27
-16
MedicalPaySuccessActivity.kt
ydl-medical-pay/src/main/java/com/medical/ydl/medical/pay/MedicalPaySuccessActivity.kt
+11
-2
H5JsBean.kt
ydl-webview/src/main/java/com/ydl/webview/H5JsBean.kt
+20
-6
No files found.
config.gradle
View file @
df5a43dd
...
@@ -11,7 +11,7 @@ ext {
...
@@ -11,7 +11,7 @@ ext {
"m-user"
:
"0.0.61.90"
,
"m-user"
:
"0.0.61.90"
,
"m-user-medical"
:
"0.0.61.99"
,
"m-user-medical"
:
"0.0.61.99"
,
"m-home"
:
"0.0.22.70"
,
"m-home"
:
"0.0.22.70"
,
"m-im-medical"
:
"0.0.20.9
2
"
,
"m-im-medical"
:
"0.0.20.9
4
"
,
"m-im"
:
"0.0.20.76"
,
"m-im"
:
"0.0.20.76"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.10"
,
"m-article"
:
"0.0.0.10"
,
...
@@ -38,10 +38,10 @@ ext {
...
@@ -38,10 +38,10 @@ ext {
"ydl-platform"
:
"0.0.40.73"
,
"ydl-platform"
:
"0.0.40.73"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.38.5
6
"
,
"ydl-webview"
:
"0.0.38.5
7
"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-medical-pay"
:
"0.0.01.2
0
"
,
"ydl-medical-pay"
:
"0.0.01.2
2
"
,
"m-audioim"
:
"0.0.49.29.37"
,
"m-audioim"
:
"0.0.49.29.37"
,
"ydl-flutter-base"
:
"0.0.14.26"
,
"ydl-flutter-base"
:
"0.0.14.26"
,
...
@@ -97,7 +97,7 @@ ext {
...
@@ -97,7 +97,7 @@ ext {
"m-user"
:
"0.0.61.90"
,
"m-user"
:
"0.0.61.90"
,
"m-user-medical"
:
"0.0.61.99"
,
"m-user-medical"
:
"0.0.61.99"
,
"m-home"
:
"0.0.22.70"
,
"m-home"
:
"0.0.22.70"
,
"m-im-medical"
:
"0.0.20.9
2
"
,
"m-im-medical"
:
"0.0.20.9
4
"
,
"m-im"
:
"0.0.20.76"
,
"m-im"
:
"0.0.20.76"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.8"
,
"m-article"
:
"0.0.0.8"
,
...
@@ -123,10 +123,10 @@ ext {
...
@@ -123,10 +123,10 @@ ext {
"ydl-platform"
:
"0.0.40.73"
,
"ydl-platform"
:
"0.0.40.73"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.38.5
6
"
,
"ydl-webview"
:
"0.0.38.5
7
"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-medical-pay"
:
"0.0.01.
19
"
,
"ydl-medical-pay"
:
"0.0.01.
22
"
,
"m-audioim"
:
"0.0.49.29.37"
,
"m-audioim"
:
"0.0.49.29.37"
,
"ydl-flutter-base"
:
"0.0.14.26"
,
"ydl-flutter-base"
:
"0.0.14.26"
,
...
...
m-im/src/main/java/com/yidianling/medical/GraphicConsulttionFlow2Activity.kt
View file @
df5a43dd
...
@@ -214,7 +214,8 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
...
@@ -214,7 +214,8 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
this
@GraphicConsulttionFlow2Activity
,
this
@GraphicConsulttionFlow2Activity
,
response
.
data
.
payAmountStr
,
response
.
data
.
payAmountStr
,
response
.
data
.
inquiryOrderId
,
response
.
data
.
inquiryOrderId
,
doctorUidStrExtra
doctorUidStrExtra
,
1
)
)
scope
.
cancel
()
scope
.
cancel
()
mFlow1Activity
?.
finish
()
mFlow1Activity
?.
finish
()
...
...
ydl-medical-pay/build.gradle
View file @
df5a43dd
...
@@ -46,13 +46,14 @@ dependencies {
...
@@ -46,13 +46,14 @@ dependencies {
if
(
rootProject
.
ext
.
dev_mode
){
if
(
rootProject
.
ext
.
dev_mode
){
//开发时使用
//开发时使用
api
project
(
':ydl-platform'
)
api
project
(
':ydl-platform'
)
compileOnly
project
(
':ydl-webview'
)
implementation
modularPublication
(
'com.ydl:m-im-api'
)
implementation
modularPublication
(
'com.ydl:m-im-api'
)
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
}
else
{
}
else
{
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-im-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-im-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-webview"
]
//发布时使用
//发布时使用
api
(
rootProject
.
ext
.
dependencies
[
"ydl-platform"
])
{
api
(
rootProject
.
ext
.
dependencies
[
"ydl-platform"
])
{
transitive
=
true
transitive
=
true
...
...
ydl-medical-pay/src/main/java/com/medical/ydl/medical/pay/MedicalPayActivity.kt
View file @
df5a43dd
...
@@ -37,15 +37,27 @@ import java.util.*
...
@@ -37,15 +37,27 @@ import java.util.*
class
MedicalPayActivity
:
BaseActivity
()
{
class
MedicalPayActivity
:
BaseActivity
()
{
companion
object
{
companion
object
{
//价格
private
const
val
PRICE_KEY
=
"price"
private
const
val
PRICE_KEY
=
"price"
//订单id
private
const
val
ORDER_KEY
=
"orderId"
private
const
val
ORDER_KEY
=
"orderId"
//医生uid
private
const
val
DOCTORUID_KEY
=
"doctorUid"
private
const
val
DOCTORUID_KEY
=
"doctorUid"
private
const
val
Medical_KEY
=
"isMedical"
// 0账户充值(充值记录表)、1问诊订单(inquiry_order表)、2药品订单
private
const
val
PAYBIZTYPE_KEY
=
"payBizType"
private
lateinit
var
mPrice
:
String
private
lateinit
var
mPrice
:
String
private
lateinit
var
mOrderId
:
String
private
lateinit
var
mOrderId
:
String
private
lateinit
var
mDoctorUid
:
String
private
lateinit
var
mDoctorUid
:
String
private
var
mIsMedical
:
Boolean
=
false
private
var
mPayBizType
:
Int
=
1
//问诊订单
private
val
INQUIRY_ORDER_TYPE
=
1
;
//药品订单
private
val
MEDICAL_ORDER_TYPE
=
2
;
private
var
timer
:
CountDownTimer
?
=
null
private
var
timer
:
CountDownTimer
?
=
null
//阿里支付
//阿里支付
...
@@ -65,20 +77,18 @@ class MedicalPayActivity : BaseActivity() {
...
@@ -65,20 +77,18 @@ class MedicalPayActivity : BaseActivity() {
* @param orderId 订单id
* @param orderId 订单id
* */
* */
@JvmStatic
@JvmStatic
fun
start
(
context
:
Context
,
price
:
String
,
orderId
:
String
,
doctorUid
:
String
)
{
fun
start
(
val
starter
=
Intent
(
context
,
MedicalPayActivity
::
class
.
java
)
context
:
Context
,
.
putExtra
(
PRICE_KEY
,
price
)
price
:
String
,
.
putExtra
(
ORDER_KEY
,
orderId
)
orderId
:
String
,
.
putExtra
(
DOCTORUID_KEY
,
doctorUid
)
doctorUid
:
String
,
context
.
startActivity
(
starter
)
payBizType
:
Int
}
)
{
@JvmStatic
fun
start
(
context
:
Context
,
price
:
String
,
orderId
:
String
,
doctorUid
:
String
,
isMedical
:
Boolean
)
{
val
starter
=
Intent
(
context
,
MedicalPayActivity
::
class
.
java
)
val
starter
=
Intent
(
context
,
MedicalPayActivity
::
class
.
java
)
.
putExtra
(
PRICE_KEY
,
price
)
.
putExtra
(
PRICE_KEY
,
price
)
.
putExtra
(
ORDER_KEY
,
orderId
)
.
putExtra
(
ORDER_KEY
,
orderId
)
.
putExtra
(
DOCTORUID_KEY
,
doctorUid
)
.
putExtra
(
DOCTORUID_KEY
,
doctorUid
)
.
putExtra
(
Medical_KEY
,
isMedical
)
.
putExtra
(
PAYBIZTYPE_KEY
,
payBizType
)
context
.
startActivity
(
starter
)
context
.
startActivity
(
starter
)
}
}
...
@@ -124,7 +134,7 @@ class MedicalPayActivity : BaseActivity() {
...
@@ -124,7 +134,7 @@ class MedicalPayActivity : BaseActivity() {
mPrice
=
intent
.
getStringExtra
(
PRICE_KEY
)
mPrice
=
intent
.
getStringExtra
(
PRICE_KEY
)
mOrderId
=
intent
.
getStringExtra
(
ORDER_KEY
)
mOrderId
=
intent
.
getStringExtra
(
ORDER_KEY
)
mDoctorUid
=
intent
.
getStringExtra
(
DOCTORUID_KEY
)
mDoctorUid
=
intent
.
getStringExtra
(
DOCTORUID_KEY
)
m
IsMedical
=
intent
.
getBooleanExtra
(
Medical_KEY
,
false
)
m
PayBizType
=
intent
.
getIntExtra
(
PAYBIZTYPE_KEY
,
INQUIRY_ORDER_TYPE
)
payType
=
PAY_WECHAT
payType
=
PAY_WECHAT
price
.
text
=
mPrice
price
.
text
=
mPrice
...
@@ -156,7 +166,8 @@ class MedicalPayActivity : BaseActivity() {
...
@@ -156,7 +166,8 @@ class MedicalPayActivity : BaseActivity() {
CreatePayReqDtoBody
(
CreatePayReqDtoBody
(
mPrice
,
mPrice
,
mOrderId
,
mOrderId
,
payChannel
=
payType
payType
,
mPayBizType
)
)
)
)
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
...
@@ -292,9 +303,9 @@ class MedicalPayActivity : BaseActivity() {
...
@@ -292,9 +303,9 @@ class MedicalPayActivity : BaseActivity() {
fun
onEvent
(
event
:
MedicalWXPayEvent
)
{
fun
onEvent
(
event
:
MedicalWXPayEvent
)
{
if
(
event
.
status
.
success
)
{
if
(
event
.
status
.
success
)
{
if
(
m
IsMedical
)
{
if
(
m
PayBizType
==
MEDICAL_ORDER_TYPE
)
{
MedicalPaySuccessActivity
.
start
(
this
@MedicalPayActivity
,
mPrice
,
mOrderId
)
MedicalPaySuccessActivity
.
start
(
this
@MedicalPayActivity
,
mPrice
,
mOrderId
)
}
else
{
}
else
if
(
mPayBizType
==
INQUIRY_ORDER_TYPE
)
{
MedicalPayIn
.
mainIntentMessage
(
this
@MedicalPayActivity
,
mDoctorUid
)
MedicalPayIn
.
mainIntentMessage
(
this
@MedicalPayActivity
,
mDoctorUid
)
ToastUtil
.
toastShort
(
"支付成功"
)
ToastUtil
.
toastShort
(
"支付成功"
)
}
}
...
...
ydl-medical-pay/src/main/java/com/medical/ydl/medical/pay/MedicalPaySuccessActivity.kt
View file @
df5a43dd
...
@@ -2,7 +2,10 @@ package com.medical.ydl.medical.pay
...
@@ -2,7 +2,10 @@ package com.medical.ydl.medical.pay
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
kotlinx.android.synthetic.main.medical_pay_success_activity.*
import
kotlinx.android.synthetic.main.medical_pay_success_activity.*
import
java.util.*
import
java.util.*
...
@@ -46,13 +49,19 @@ class MedicalPaySuccessActivity : BaseActivity() {
...
@@ -46,13 +49,19 @@ class MedicalPaySuccessActivity : BaseActivity() {
finish
()
finish
()
}
}
to_order
.
setOnClickListener
{
to_order
.
setOnClickListener
{
//查看订单
//查看药品订单
NewH5Activity
.
start
(
this
@MedicalPaySuccessActivity
,
H5Params
(
HttpConfig
.
MEDICAL_H5URL
+
"ct/drug/order/details"
+
"?drugOrderId="
+
mOrderId
+
"&hideNavBar=1"
,
"订单详情"
)
)
}
}
}
}
private
fun
initStatus
()
{
private
fun
initStatus
()
{
StatusBarUtils
.
setTransparentForImageView
(
this
@MedicalPaySuccessActivity
,
null
)
StatusBarUtils
.
setTransparentForImageView
(
this
@MedicalPaySuccessActivity
,
null
)
StatusBarUtils
.
statusBarLightMode
(
this
@MedicalPaySuccessActivity
)
StatusBarUtils
.
statusBarLightMode
(
this
@MedicalPaySuccessActivity
)
...
...
ydl-webview/src/main/java/com/ydl/webview/H5JsBean.kt
View file @
df5a43dd
...
@@ -65,7 +65,7 @@ class H5JsBean {
...
@@ -65,7 +65,7 @@ class H5JsBean {
var
succ
:
String
?
=
null
var
succ
:
String
?
=
null
var
course_id
:
String
?
=
null
var
course_id
:
String
?
=
null
var
courseType
:
String
?
=
null
//课程类型:0 音频 1 视屏
var
courseType
:
String
?
=
null
//课程类型:0 音频 1 视屏
var
mediaType
:
String
?
=
null
//资料类型 1.音频 2.视频
var
mediaType
:
String
?
=
null
//资料类型 1.音频 2.视频
var
coursePlayUrl
:
String
?
=
null
//课程播放地址
var
coursePlayUrl
:
String
?
=
null
//课程播放地址
var
testResultId
:
Int
?
=
0
var
testResultId
:
Int
?
=
0
...
@@ -73,6 +73,7 @@ class H5JsBean {
...
@@ -73,6 +73,7 @@ class H5JsBean {
//群聊id
//群聊id
var
tid
:
Int
=
0
var
tid
:
Int
=
0
//专家id
//专家id
var
doctor_id
:
Int
=
0
var
doctor_id
:
Int
=
0
...
@@ -113,38 +114,51 @@ class H5JsBean {
...
@@ -113,38 +114,51 @@ class H5JsBean {
}
}
var
test_items_id
=
0
var
test_items_id
=
0
//倾诉线路类型
//倾诉线路类型
var
confideType
=
1
//1 axb 2双呼 3声网
var
confideType
=
1
//1 axb 2双呼 3声网
//倾诉支付参数
//倾诉支付参数
var
payTitle
:
String
?
=
null
var
payTitle
:
String
?
=
null
//订单金额
//订单金额
var
orderPrice
:
Double
?
=
null
var
orderPrice
:
Double
?
=
null
//优惠金额
//优惠金额
var
coupnPrice
:
Double
?
=
null
var
coupnPrice
:
Double
?
=
null
//测评题 优惠券金额
//测评题 优惠券金额
var
couponMoney
:
String
?
=
""
var
couponMoney
:
String
?
=
""
//可用余额
//可用余额
var
avliableMoney
:
Double
?
=
null
var
avliableMoney
:
Double
?
=
null
//倾诉支付成功跳转地址
//倾诉支付成功跳转地址
var
confideUrl
:
String
?
=
null
var
confideUrl
:
String
?
=
null
//打开与关闭右上角菜单
//打开与关闭右上角菜单
var
toggleRightTopMenu
:
Int
=
0
//0 关闭,1 打开
var
toggleRightTopMenu
:
Int
=
0
//0 关闭,1 打开
//打开与关闭分享菜单
//打开与关闭分享菜单
var
toggleShareMenu
:
Int
=
0
//0 关闭,1 打开
var
toggleShareMenu
:
Int
=
0
//0 关闭,1 打开
//标识首页第几个tab
//标识首页第几个tab
var
selectTab
:
Int
=
0
var
selectTab
:
Int
=
0
//倾诉拨打电话使用参数
//倾诉拨打电话使用参数
var
callType
:
String
?=
null
var
callType
:
String
?
=
null
var
switchStatus
=
1
var
switchStatus
=
1
var
closeReplaceChat
=
false
var
closeReplaceChat
=
false
var
merchantType
:
String
=
""
var
day
:
String
=
""
// 预约日期
var
merchantType
:
String
=
""
var
payBizType
:
Int
=
1
// 0账户充值(充值记录表)、1问诊订单(inquiry_order表)、2药品订单
var
d
ay
:
String
=
""
// 预约日期
var
d
rugOrderId
:
String
=
""
// 药品订单id
}
}
}
}
}
}
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