Commit 93af8718 by 杨凯

Merge branch 'feature/yk_release' into 'd/v4.4.06'

Feature/yk release

See merge request app_android_lib/YDL-Component!286
parents c5b52439 fba5d5de
......@@ -58,7 +58,11 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override
public void contactYi() {
try {
ModularServiceManager.INSTANCE.provide(IImService.class)
.startP2PSession(mContext, -1, "14", "14", "客服小壹", "14");
} catch (Exception e) {
}
}
@Override
......@@ -108,7 +112,17 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override
public void chat(int id, int toUid, int canTalk, String accessToken, int isFromQingShu) {
if ((toUid + "").equals("14")) {
//找客服私聊不需要积分
contactYi();
} else {
try {
ModularServiceManager.INSTANCE.provide(IImService.class)
.startChatCloseReplaceChat(mContext, String.valueOf(toUid));
} catch (Exception e) {
e.printStackTrace();
}
}
}
@Override
......
......@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2'
componentVersion = "0.3.0.11"
componentVersion = "0.3.0.13"
}
repositories {
mavenCentral()
......
......@@ -72,7 +72,6 @@ import kotlinx.android.synthetic.main.consultant_layout_search_toolbar.*
import org.json.JSONObject
import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit
import kotlin.collections.ArrayList
@Route(path = "/consultant/consultant")
class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPresenter>(),
......@@ -1485,20 +1484,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")
val 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")
......
......@@ -60,7 +60,8 @@ class ConsultSubPayDialog(
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 +70,8 @@ class ConsultSubPayDialog(
}
override fun onFinish() {
var nextShowTime = System.currentTimeMillis() + 24 * 60 * 60 * 1000
var nextShowTime =
System.currentTimeMillis() + ((promptPaymentBean.orderToPayTime ?: 1) * 1000)
SharedPreferencesEditor.putString("orderToPayTime", nextShowTime.toString())
dismiss()
}
......@@ -80,7 +82,8 @@ class ConsultSubPayDialog(
})
mTimer?.start()
findViewById<TextView>(R.id.tv_close).setOnClickListener {
var nextShowTime = System.currentTimeMillis() + 24 * 60 * 60 * 1000
var nextShowTime =
System.currentTimeMillis() + ((promptPaymentBean.orderToPayTime ?: 1) * 1000)
SharedPreferencesEditor.putString("orderToPayTime", nextShowTime.toString())
mTimer?.stop()
dismiss()
......@@ -96,7 +99,8 @@ class ConsultSubPayDialog(
ToastUtil.toastShort("跳转失败")
dismiss()
}
var nextShowTime = System.currentTimeMillis() + 24 * 60 * 60 * 1000
var nextShowTime =
System.currentTimeMillis() + ((promptPaymentBean.orderToPayTime ?: 1) * 1000)
SharedPreferencesEditor.putString("orderToPayTime", nextShowTime.toString())
}
}
......
......@@ -71,7 +71,7 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
if (ActionHandlerStorage.getL(contactId) != null) {
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
} else if (contactId.equals(ImConstants.KEFUXIAOYI)) {
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}
ActionHandlerStorage.setL(contactId, l);
......
......@@ -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
)
)
......
......@@ -212,28 +212,34 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
val orderNum = response.data?.consultOrderNum ?: 0
if (orderNum > 0) {
iv_order_tip.visibility = View.VISIBLE
if (orderNum > 99) {
iv_order_tip.text = "99+"
val numberStr = if (orderNum > 99) {
"99+"
} else {
iv_order_tip.text = "$orderNum"
"$orderNum"
}
iv_order_tip.text = numberStr
getLocal().setConsult(true)
getLocal().setConsultNum(orderNum)
} else {
iv_order_tip.visibility = View.GONE
getLocal().setConsult(false)
getLocal().setConsultNum(0)
}
}else{
}else {
getLocal().setConfide(false)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
}
}else{
}else {
getLocal().setConfide(false)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
}
},{
getLocal().setConfide(false)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
})
}
......@@ -246,6 +252,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
getLocal().setCoupon(false)
getLocal().setConfide(false)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
val userInfo = getUserInfo()
......
......@@ -18,15 +18,19 @@ interface AppLocal {
fun putUpdate(update: Boolean)
fun getCoupon():Boolean
fun getCoupon(): Boolean
fun setCoupon(have:Boolean)
fun setCoupon(have: Boolean)
fun getConsult():Boolean
fun getConsult(): Boolean
fun setConsult(have: Boolean)
fun getConfide():Boolean
fun getConsultNum(): Int
fun setConsultNum(num: Int)
fun getConfide(): Boolean
fun setConfide(have: Boolean)
......
......@@ -22,6 +22,7 @@ internal class AppLocalImpl private constructor(): AppLocal {
private const val CONFIDE = "confide"
private const val CONSULT = "consult"
private const val CONSULT_NUM = "consult_num"
private const val COUPON = "coupon"
}
......@@ -58,6 +59,14 @@ internal class AppLocalImpl private constructor(): AppLocal {
getAppSP().edit().putBoolean(CONSULT, have).apply()
}
override fun getConsultNum(): Int {
return getAppSP().getInt(CONSULT_NUM, 0)
}
override fun setConsultNum(num: Int) {
getAppSP().edit().putInt(CONSULT_NUM, num).apply()
}
override fun getConfide(): Boolean {
return getAppSP().getBoolean(CONFIDE, false)
}
......
......@@ -417,18 +417,18 @@
app:layout_constraintTop_toTopOf="parent" />
<TextView
tools:text="11"
android:id="@+id/iv_order_tip"
android:layout_width="12dp"
android:layout_height="12dp"
android:background="@drawable/user_mine_background_red_point_new_coupon"
android:gravity="center"
android:textSize="8dp"
android:textColor="@color/white"
android:background="@drawable/user_mine_background_red_point_new_coupon"
android:textSize="6sp"
android:visibility="gone"
app:layout_constraintCircle="@id/iv_trade_order"
app:layout_constraintCircleAngle="45"
app:layout_constraintCircleRadius="10dp"
tools:text="9"
tools:visibility="visible" />
<TextView
......
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