Commit b9161ef7 by 刘鹏

feat: 支付流程改版,问题修复

parent ed3f8644
......@@ -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
......
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) {
......
......@@ -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)
......
......@@ -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);
}
ext {
dev_mode = false//组件发布的时候需要设置为false
ydl2PublishVersion = "0.2.0.17"
dev_mode = false //组件发布的时候需要设置为false
ydl2PublishVersion = "0.3.0.4-SNAPSHOT"
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
......
......@@ -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()
}
......
......@@ -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())
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment