Commit 2b11d9c1 by 刘鹏

feat: 咨询页弹窗时间问题修复,预约加入隐藏标题栏属性

parent b6b30d3c
......@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2'
componentVersion = "0.3.0.12"
componentVersion = "0.3.0.12-SNAPSHOT"
}
repositories {
mavenCentral()
......
......@@ -1485,20 +1485,20 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
needRefresh = true
}
// val orderToPayTime = SharedPreferencesEditor.getString("orderToPayTime")
//
// var timeLimit = if (TextUtils.isEmpty(orderToPayTime)) {
// 0L
// } else {
// orderToPayTime.toLong()
// }
//
//
// if (isShow && !(consultSubPayDialog != null && consultSubPayDialog?.isShowing == true)) {
// if (findRouteService(IUserService::class.java).isLogin() && System.currentTimeMillis() > timeLimit) {
// getPresenter().fetchPromptPayment()
// }
// }
val orderToPayTime = SharedPreferencesEditor.getString("orderToPayTime")
var timeLimit = if (TextUtils.isEmpty(orderToPayTime)) {
0L
} else {
orderToPayTime.toLong()
}
if (isShow && !(consultSubPayDialog != null && consultSubPayDialog?.isShowing == true)) {
if (findRouteService(IUserService::class.java).isLogin() && System.currentTimeMillis() > timeLimit) {
getPresenter().fetchPromptPayment()
}
}
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_PAGE_VISIT)
ActionCountUtils.count("daoyi_advertisement_page|daoyi_advertisement_visit", "6")
......
......@@ -20,7 +20,6 @@ import com.yidianling.consultant.R
import com.yidianling.consultant.model.bean.PromptPaymentBean
import java.text.DecimalFormat
import java.text.SimpleDateFormat
import java.util.*
/**
......@@ -59,8 +58,7 @@ class ConsultSubPayDialog(
val price = decimalFormat.format(promptPaymentBean.price)
findViewById<TextView>(R.id.priceTv).text = "¥$price"
var format = SimpleDateFormat("HH:mm:ss");
format.timeZone = TimeZone.getTimeZone("GMT+0");
var millisInFuture = promptPaymentBean.currentTime?:0 - (promptPaymentBean.toPayTime?:0L)
var millisInFuture = promptPaymentBean.toPayTime?.minus(promptPaymentBean.currentTime?:0)?:0
mTimer = CountDownTimerSupport(millisInFuture, 1000)
mTimer?.setOnCountDownTimerListener(object : OnCountDownTimerListener {
override fun onTick(millisUntilFinished: Long) {
......@@ -69,7 +67,7 @@ class ConsultSubPayDialog(
}
override fun onFinish() {
var nextShowTime = System.currentTimeMillis() + 24 * 60 * 60 * 1000
var nextShowTime = promptPaymentBean.currentTime ?: (0 + ((promptPaymentBean.orderToPayTime ?: 1) * 1000))
SharedPreferencesEditor.putString("orderToPayTime", nextShowTime.toString())
dismiss()
}
......@@ -80,7 +78,7 @@ class ConsultSubPayDialog(
})
mTimer?.start()
findViewById<TextView>(R.id.tv_close).setOnClickListener {
var nextShowTime = System.currentTimeMillis() + 24 * 60 * 60 * 1000
var nextShowTime = promptPaymentBean.currentTime ?: (0 + ((promptPaymentBean.orderToPayTime ?: 1) * 1000))
SharedPreferencesEditor.putString("orderToPayTime", nextShowTime.toString())
mTimer?.stop()
dismiss()
......@@ -96,7 +94,7 @@ class ConsultSubPayDialog(
ToastUtil.toastShort("跳转失败")
dismiss()
}
var nextShowTime = System.currentTimeMillis() + 24 * 60 * 60 * 1000
var nextShowTime = promptPaymentBean.currentTime ?: (0 + ((promptPaymentBean.orderToPayTime ?: 1) * 1000))
SharedPreferencesEditor.putString("orderToPayTime", nextShowTime.toString())
}
}
......
......@@ -168,7 +168,7 @@ class ExpertConsultServiceItemView : LinearLayout {
NewH5Activity.start(
mContext,
H5Params(
HttpConfig.MH5_URL + "consult/#/pages/jieyou/DownOrder?product_id=" + bean.productDto.id,
HttpConfig.MH5_URL + "consult/#/pages/jieyou/DownOrder?product_id=${bean.productDto.id}&hideNavBar=1",
null
)
)
......
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