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
b9161ef7
Commit
b9161ef7
authored
Jul 24, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 支付流程改版,问题修复
parent
ed3f8644
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
17 deletions
+38
-17
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+2
-2
WVClickAbstractListener.java
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
+11
-8
WebJavascriptHandler.kt
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
+8
-0
WebViewClientClickListener.java
app/src/main/java/com/ydl/component/service/web/WebViewClientClickListener.java
+4
-0
config.gradle
config.gradle
+2
-2
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+1
-4
ConsultSubPayDialog.kt
m-consultant/src/main/java/com/yidianling/consultant/dialog/ConsultSubPayDialog.kt
+10
-1
consultant_expert_consult_sub_pay_dialog.xml
m-consultant/src/main/res/layout/consultant_expert_consult_sub_pay_dialog.xml
+0
-0
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
b9161ef7
...
...
@@ -20,8 +20,8 @@ import java.util.List;
*/
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
//
public static String appEnv = YDLConstants.ENV_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_PROD
;
public
static
String
appEnv
=
YDLConstants
.
ENV_TEST
;
//
public static String appEnv = YDLConstants.ENV_PROD;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
@Override
...
...
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
View file @
b9161ef7
package
com
.
ydl
.
component
.
service
.
web
;
import
android.annotation.SuppressLint
;
import
android.app.Activity
;
import
android.graphics.Rect
;
...
...
@@ -11,20 +12,13 @@ import com.ydl.confide.home.event.ChangeAnotherExpertEvent;
import
com.ydl.webview.H5JsBean
;
import
com.ydl.webview.H5Params
;
import
com.ydl.webview.NewH5Activity
;
import
com.ydl.ydl_router.manager.YDLRouterManager
;
import
com.ydl.ydl_router.manager.YDLRouterParams
;
import
com.ydl.ydlcommon.modular.ModularServiceManager
;
import
com.yidianling.common.tools.LogUtil
;
import
com.yidianling.consultant.preview.GPreviewBuilder
;
import
com.yidianling.consultant.preview.UserViewInfo
;
import
com.yidianling.im.api.service.IImService
;
import
com.yidianling.muse.activity.ChooseMusicActivity
;
//import static com.ydl.ydlcommon.router.IYDLRouterConstant.ROUTER_MUSE_PLAY;
import
de.greenrobot.event.EventBus
;
import
com.yidianling.im.event.CloseBottomWebviewEvent
;
import
com.yidianling.muse.activity.ChooseMusicActivity
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -571,6 +565,15 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
}
}
/**
* 打开时间选择器
*/
@SuppressLint
(
"CheckResult"
)
@Override
public
void
openTimePicker
(
String
jsCallBackName
,
String
day
,
String
doctorId
,
String
orderId
)
{
}
@Override
public
void
showCommentArticleDialog
(
H5JsBean
.
H5JsCmd
.
Params
params
)
{
...
...
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
View file @
b9161ef7
...
...
@@ -14,6 +14,7 @@ import com.ydl.ydlcommon.base.BaseActivityMgr
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.user.UserHelper
...
...
@@ -459,6 +460,13 @@ class WebJavascriptHandler(private val webView: WebView?, private val wvEnventPr
"switch_push_status"
->
{
wvEnventPro
?.
switchPushStatus
(
jsData
.
cmd
?.
params
)
}
// 打开时间选择器
"requestSelectTime"
->{
if
(
Utils
.
isFastClick
()){
return
}
wvEnventPro
?.
openTimePicker
(
jsData
.
cmd
?.
params
?.
callBack
,
jsData
.
cmd
?.
params
?.
day
,
jsData
.
cmd
?.
params
?.
doctorId
.
toString
(),
jsData
.
cmd
?.
params
?.
orderId
)
}
"open_article_comment_dialog"
->
{
wvEnventPro
?.
showCommentArticleDialog
(
jsData
.
cmd
?.
params
)
...
...
app/src/main/java/com/ydl/component/service/web/WebViewClientClickListener.java
View file @
b9161ef7
...
...
@@ -211,4 +211,8 @@ public interface WebViewClientClickListener {
void
resourceToPreview
(
H5JsBean
.
H5JsCmd
.
Params
params
);
void
showDocBooking
(
H5JsBean
.
H5JsCmd
.
Params
params
);
// 打开时间选择器
void
openTimePicker
(
String
jsCallBackName
,
String
day
,
String
doctorId
,
String
orderId
);
}
config.gradle
View file @
b9161ef7
ext
{
dev_mode
=
false
//组件发布的时候需要设置为false
ydl2PublishVersion
=
"0.
2.0.17
"
dev_mode
=
false
//组件发布的时候需要设置为false
ydl2PublishVersion
=
"0.
3.0.4-SNAPSHOT
"
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
b9161ef7
...
...
@@ -138,9 +138,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
consultSubPayDialog
?.
show
()
consultSubPayDialog
?.
setOnDismissListener
{
var
timeInterval
=
promptPaymentBean
.
orderToPayTime
!!
*
1000
val
endTime
=
System
.
currentTimeMillis
()
+
1000
*
60
SharedPreferencesEditor
.
putString
(
"orderToPayTime"
,
timeInterval
.
toString
())
consultSubPayDialog
=
null
}
}
...
...
@@ -1497,7 +1494,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
}
if
(
isShow
&&
!(
consultSubPayDialog
!=
null
&&
consultSubPayDialog
!!
.
isShowing
))
{
if
(
isShow
&&
!(
consultSubPayDialog
!=
null
&&
consultSubPayDialog
?.
isShowing
==
true
))
{
if
(
findRouteService
(
IUserService
::
class
.
java
).
isLogin
()
&&
System
.
currentTimeMillis
()
>
timeLimit
)
{
getPresenter
().
fetchPromptPayment
()
}
...
...
m-consultant/src/main/java/com/yidianling/consultant/dialog/ConsultSubPayDialog.kt
View file @
b9161ef7
...
...
@@ -14,6 +14,7 @@ import android.widget.TextView
import
com.bumptech.glide.Glide
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.R
import
com.yidianling.consultant.model.bean.PromptPaymentBean
...
...
@@ -59,7 +60,7 @@ class ConsultSubPayDialog(
findViewById
<
TextView
>(
R
.
id
.
priceTv
).
text
=
"¥$price"
var
format
=
SimpleDateFormat
(
"HH:mm:ss"
);
format
.
timeZone
=
TimeZone
.
getTimeZone
(
"GMT+0"
);
var
millisInFuture
=
promptPaymentBean
.
toPayTime
!!
-
promptPaymentBean
.
currentTime
!!
var
millisInFuture
=
promptPaymentBean
.
currentTime
?:
0
-
(
promptPaymentBean
.
toPayTime
?:
0L
)
mTimer
=
CountDownTimerSupport
(
millisInFuture
,
1000
)
mTimer
?.
setOnCountDownTimerListener
(
object
:
OnCountDownTimerListener
{
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
...
...
@@ -68,6 +69,8 @@ class ConsultSubPayDialog(
}
override
fun
onFinish
()
{
var
nextShowTime
=
System
.
currentTimeMillis
()
+
24
*
60
*
60
*
1000
SharedPreferencesEditor
.
putString
(
"orderToPayTime"
,
nextShowTime
.
toString
())
dismiss
()
}
...
...
@@ -77,8 +80,11 @@ class ConsultSubPayDialog(
})
mTimer
?.
start
()
findViewById
<
TextView
>(
R
.
id
.
tv_close
).
setOnClickListener
{
var
nextShowTime
=
System
.
currentTimeMillis
()
+
24
*
60
*
60
*
1000
SharedPreferencesEditor
.
putString
(
"orderToPayTime"
,
nextShowTime
.
toString
())
mTimer
?.
stop
()
dismiss
()
}
findViewById
<
View
>(
R
.
id
.
pay
).
setOnClickListener
{
...
...
@@ -88,7 +94,10 @@ class ConsultSubPayDialog(
dismiss
()
}
else
{
ToastUtil
.
toastShort
(
"跳转失败"
)
dismiss
()
}
var
nextShowTime
=
System
.
currentTimeMillis
()
+
24
*
60
*
60
*
1000
SharedPreferencesEditor
.
putString
(
"orderToPayTime"
,
nextShowTime
.
toString
())
}
}
...
...
m-consultant/src/main/res/layout/consultant_expert_consult_sub_pay_dialog.xml
View file @
b9161ef7
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