Commit ec0f006f by 万齐军

merge release

parents 9de31709 801171a4
......@@ -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.16"
}
repositories {
mavenCentral()
......
......@@ -54,7 +54,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import java.io.UnsupportedEncodingException
import java.net.URLDecoder
import java.util.*
import kotlin.math.roundToInt
class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
......@@ -97,6 +96,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
var shouldShow: Boolean? = false
var uid: String? = null
var listen_free: Boolean = false
private var hasOnResume = false
fun showBottomSheetDialog(
activity: FragmentActivity,
jumpUrl: String,
......@@ -367,6 +367,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
fun onEventMainThread(event: ConfideDialogEvent) {
if(!hasOnResume) return
// 第一位表示拨打按钮,第二位代表再换一位按钮
val show = event.show
// if (show == 0) {
......@@ -568,8 +569,14 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
return false
}
override fun onPause() {
super.onPause()
hasOnResume = false
}
override fun onResume() {
super.onResume()
hasOnResume = true
if (doctorId.isNotBlank() && layoutCall.visibility == View.VISIBLE) {
onLoadDialStatus(doctorId)
}
......
......@@ -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())
}
}
......
package com.yidianling.home
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.yidianling.home.test", appContext.packageName)
}
}
......@@ -1048,6 +1048,9 @@
"type": 10004
},
{
"type": 10005
},
{
"courseBean": {
"pageNum": 1,
"pageSize": 3,
......@@ -1303,7 +1306,7 @@
}
]
},
"type": 10005
"type": 10006
},
{
"askBean": {
......@@ -5568,8 +5571,9 @@
}
]
},
"type": 10006
"type": 10007
},
{ "type": 1000101},
{
"articleBean": {
"list": [
......@@ -5740,9 +5744,9 @@
}
]
},
"type": 10007
"type": 10008
},
{
"type": 10008
"type": 10009
}
]
\ No newline at end of file
......@@ -21,7 +21,6 @@ import com.yidianling.home.R
import com.yidianling.home.constants.HomeBIConstants
import com.yidianling.home.model.bean.MeditationModuleBean
import com.yidianling.user.api.service.IUserService
import kotlinx.android.synthetic.ydl.home_fragment.*
class MeditationTypeAdapter(
private val context: Context,
......
......@@ -102,4 +102,7 @@ class HomeBaseHttp {
return RxUtils.mapObservable(cmd).flatMap { getHomePagerApi().askFocus(it) }
}
fun getMeditationInfo(): Observable<BaseAPIResponse<MeditationModuleBean>> {
return getHomePagerApi().getMeditation()
}
}
\ No newline at end of file
......@@ -111,5 +111,8 @@ interface HomeBasePagerApi {
@POST("sq-active/focus")
fun askFocus(@FieldMap params: Map<String, String>): Observable<BaseResponse<AskResultBean>>
@GET("cms/meditation/index")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getMeditation(): Observable<BaseAPIResponse<MeditationModuleBean>>
}
\ No newline at end of file
package com.yidianling.home.ui.view
package com.yidianling.home.view
import android.content.Context
import android.util.AttributeSet
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.yidianling.home.R
import kotlinx.android.synthetic.ydl.home_common_title_view.view.*
import kotlinx.android.synthetic.main.home_common_title_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......
package com.yidianling.home.ui.view
package com.yidianling.home.view
import android.annotation.SuppressLint
import android.content.Context
......@@ -21,10 +21,8 @@ import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.home.adapter.MeditationViewPagerAdapter
import com.yidianling.home.R
import com.yidianling.home.constants.HomeBIConstants
import com.yidianling.home.constract.HomeViewConfig
import com.yidianling.home.event.IHomeEvent
import com.yidianling.home.model.bean.MeditationModuleBean
import kotlinx.android.synthetic.ydl.home_muse_view.view.*
import kotlinx.android.synthetic.main.home_muse_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -33,7 +31,7 @@ import kotlinx.android.synthetic.ydl.home_muse_view.view.*
* @Company 壹点灵
* @date 2019/09/10
*/
class HomeMuseView(private val mContext: Context, private var homeEvent: IHomeEvent?) :
class HomeMuseView(private val mContext: Context) :
LinearLayout(mContext) {
private val meditationTitles = mutableListOf<String>()
......@@ -51,7 +49,7 @@ class HomeMuseView(private val mContext: Context, private var homeEvent: IHomeEv
)
layoutParams = params
View.inflate(mContext, R.layout.home_muse_view, this)
homeModuleMuseViewHomeCommonTitleView.setTitle(HomeViewConfig.getOrder().museTitle)
homeModuleMuseViewHomeCommonTitleView.setTitle("助眠·冥想")
}
fun initData(bean: MeditationModuleBean?) {
......
......@@ -7,7 +7,7 @@
android:orientation="vertical"
tools:parentTag="android.widget.LinearLayout">
<com.yidianling.home.ui.view.HomeCommonTitleView
<com.yidianling.home.view.HomeCommonTitleView
android:id="@+id/homeModuleMuseViewHomeCommonTitleView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="white_60">#99FFFFFF</color>
</resources>
......@@ -10,7 +10,14 @@
<item name="colorPrimaryDark">@color/platform_main_theme</item>
<item name="colorAccent">@color/platform_main_theme</item>
</style>
<style name="MeditationTabLayoutStyle" parent="Widget.Design.TabLayout">
<item name="tabIndicatorColor">@color/white</item>
<item name="tabIndicatorHeight">2dp</item>
<item name="tabIndicatorFullWidth">false</item>
<item name="tabSelectedTextColor">@color/white</item>
<item name="android:textSize">16sp</item>
<item name="android:textColor">@color/white_60</item>
</style>
</resources>
\ No newline at end of file
package com.yidianling.home
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
package com.yidianling.home.adapter
import android.content.Context
import android.graphics.Color
import android.media.MediaPlayer
import androidx.recyclerview.widget.RecyclerView
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.home.R
import com.yidianling.home.constract.YdlHomeViewHolderConstract
import com.yidianling.home.event.HomeImpl
......@@ -17,6 +17,8 @@ import com.yidianling.home.model.bean.HomeConfideBean
import com.yidianling.home.model.bean.HomeConsultBean
import com.yidianling.home.model.bean.HomePagerDataBean
import com.yidianling.home.ui.view.*
import com.yidianling.home.view.HomeMuseView
import kotlinx.android.synthetic.main.home_muse_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -126,6 +128,11 @@ class YdlHomeAdapter(
YdlHomeViewHolderConstract.ASSUAGE_GRIEF_VIEW -> {
return HomeAssuageGriefViewHolder(HomeAssuageGriefView(mContext, homeEvent))
}
//壹点*冥想模块
YdlHomeViewHolderConstract.MUSE_VIEW -> {
return HomeMuseViewHolder(HomeMuseView(mContext))
}
//文章*阅读模块
YdlHomeViewHolderConstract.ARTICLE_VIEW -> {
return HomeArticleViewHolder(HomeArticleView(mContext, homeEvent))
......@@ -157,21 +164,6 @@ class YdlHomeAdapter(
list[position].headerBean?.askCategoryData
)
}
//倾诉*排解模块
// is HomeConfideViewHolder -> {
// if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
// val parm = holder.itemView.layoutParams
// parm.height = 0
// holder.itemView.layoutParams = parm
// } else {
// holder.confideViewView.setTitle(
// list[position].headerBean?.listenCategoryDate,
// confideSelectPosition
// )
// holder.confideViewView.setConfideExpertInfoView(list[position].confideBean?.body)
// confidePosition = position
// }
// }
//课程*成长模块
is HomeCourseViewHolder -> {
holder.courseViewView.initData(list[position].courseBean?.list)
......@@ -202,6 +194,17 @@ class YdlHomeAdapter(
is HomeTestViewHolder -> {
holder.testView.initData(list[position].testListBean)
}
is HomeMuseViewHolder -> {
holder.museViewView.video_view?.setOnInfoListener { mp, what, extra ->
if (what == MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START) {
holder.museViewView.video_view?.setBackgroundColor(Color.TRANSPARENT)
}
true
}
holder.museViewView.video_view?.start()
holder.museViewView.initData(list[position].meditationBean)
}
}
}
......@@ -255,6 +258,10 @@ class YdlHomeAdapter(
*/
inner class HomeArticleViewHolder(val articleViewView: HomeArticleView) :
RecyclerView.ViewHolder(articleViewView)
/**
* 解忧*问答模块 ViewHolder
*/
inner class HomeMuseViewHolder(val museViewView: HomeMuseView) : RecyclerView.ViewHolder(museViewView)
/**
* 底部提示语模块 ViewHolder
......
......@@ -62,6 +62,6 @@ class IHomeContract {
*/
fun getCoupons(uid: String): Observable<BaseResponse<List<CouponBean>>>
fun getMeditation(): Observable<MeditationModuleBean>
}
}
\ No newline at end of file
......@@ -29,26 +29,32 @@ class YdlHomeViewHolderConstract {
* 测试模块
*/
val TEST_VIEW = 10004
/**
* 冥想模块
*/
val MUSE_VIEW = 10005
/**
* 课程*成长模块
*/
val COURSE_VIEW = 10005
val COURSE_VIEW = 10006
/**
* 解忧*问答模块
*/
val ASSUAGE_GRIEF_VIEW = 10006
val ASSUAGE_GRIEF_VIEW = 10007
/**
* 文章*阅读模块
*/
val ARTICLE_VIEW = 10007
val ARTICLE_VIEW = 10008
/**
* 底部提示语模块
*/
val FOOTER_VIEW = 10008
val FOOTER_VIEW = 10009
/**
* 倾诉*排解模块
*/
val CONFIDE_VIEW = 1000100
}
}
\ No newline at end of file
......@@ -2,9 +2,13 @@ package com.yidianling.home.model
import com.yidianling.home.http.HomeHttp
import com.ydl.ydlcommon.data.http.BaseResponse
import com.ydl.ydlcommon.data.http.RxUtils
import com.yidianling.home.constract.IHomeContract
import com.yidianling.home.http.HomeBaseHttp
import com.yidianling.home.model.bean.*
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -26,5 +30,9 @@ class HomeModelImpl: BaseHomeModelImpl(), IHomeContract.Model {
return HomeHttp.getInstance().getCoupons(uid)
}
override fun getMeditation(): Observable<MeditationModuleBean> {
return HomeBaseHttp.getInstance().getMeditationInfo().compose(RxUtils.resultJavaData())
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
.onErrorReturn { MeditationModuleBean(true) }
}
}
\ No newline at end of file
......@@ -145,10 +145,15 @@ class HomePresenterImpl : BaseHomePresenterImpl<IHomeContract.View, IHomeContrac
if (dataBean.isRealEmpty || dataBean !is HomeAskBean) homeTempData.askBean else dataBean
mHomeAskBean = item.askBean
}
YdlHomeViewHolderConstract.MUSE_VIEW -> {
item.meditationBean =
if (dataBean.isRealEmpty || dataBean !is MeditationModuleBean) homeTempData.meditationBean else dataBean
}
YdlHomeViewHolderConstract.ARTICLE_VIEW -> {
item.articleBean =
if (dataBean.isRealEmpty || dataBean !is HomeArticleBean) homeTempData.articleBean else dataBean
}
}
return item
}
......@@ -220,6 +225,11 @@ class HomePresenterImpl : BaseHomePresenterImpl<IHomeContract.View, IHomeContrac
)
)
},
mModel.getMeditation()
.compose(RxUtils.applySchedulers(mView)).map {
//首页问答数据
homeList.add(getHomeItemFromTempData(it, YdlHomeViewHolderConstract.MUSE_VIEW))
},
mModel.askRequest()
.compose(RxUtils.applySchedulers(mView)).map {
//首页问答数据
......@@ -243,7 +253,7 @@ class HomePresenterImpl : BaseHomePresenterImpl<IHomeContract.View, IHomeContrac
mView.homeDataFail(msg)
}
}, Action {
if (homeList.size != 9){
if (homeList.size != 10){
mView.homeDataFail("")
return@Action
}
......
......@@ -346,23 +346,10 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser)
if (isVisibleToUser && isResumed) {
showConsultAssistantDialog()
} else {
hideConsultAssistantDialog()
}
if (isVisibleToUser && isResumed) {
onResume()
}
}
private fun showConsultAssistantDialog() {
ModularServiceManager.provide(IConsultantService::class.java)
.showConsultAssistantDialog(mActivity!!)
}
private fun hideConsultAssistantDialog() {
ModularServiceManager.provide(IConsultantService::class.java).hideConsultAssistantDialog()
}
override fun onStop() {
super.onStop()
endTime = System.currentTimeMillis()
......@@ -381,10 +368,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
mPresenter?.getConfideData(confideLastSelectType, confideLastSelectPosition)
}
mPresenter?.prepareCoupon(mActivity!!)
mPresenter?.prepareCoupon(mActivity)
//走咨询助理浮层展示逻辑,是否展示由内部条件与接口判断
showConsultAssistantDialog()
}
}
......
......@@ -14,7 +14,8 @@ import com.yidianling.home.constract.HomeViewConfig
import com.yidianling.home.event.HomeImpl
import com.yidianling.home.model.bean.*
import com.yidianling.home.ui.view.*
import kotlinx.android.synthetic.ydl.home_muse_view.view.*
import com.yidianling.home.view.HomeMuseView
import kotlinx.android.synthetic.main.home_muse_view.view.*
/**
......@@ -178,7 +179,7 @@ class YdlHomeAdapter(private val mContext: Context,
}
//壹点*冥想模块
HomeViewConfig.getOrder().museIndex -> {
return HomeMuseViewHolder(HomeMuseView(mContext, homeEvent),viewType)
return HomeMuseViewHolder(HomeMuseView(mContext), viewType)
}
//底部提示语模块
else -> {
......@@ -301,7 +302,7 @@ class YdlHomeAdapter(private val mContext: Context,
/**
* 文章*阅读模块 ViewHolder
*/
inner class HomeMuseViewHolder(val museViewView: HomeMuseView,val viewType:Int) : RecyclerView.ViewHolder(museViewView)
inner class HomeMuseViewHolder(val museViewView: HomeMuseView, val viewType:Int) : RecyclerView.ViewHolder(museViewView)
/**
* 文章*阅读模块 ViewHolder
......
......@@ -22,6 +22,6 @@ class IHomeContract {
*/
fun museRequest(): Observable<MuseModuleBean>
fun getMeditation():Observable<MeditationModuleBean>
fun getMeditation(): Observable<MeditationModuleBean>
}
}
\ No newline at end of file
......@@ -39,8 +39,5 @@ class HomeHttp {
return getHomePagerApi().getMuseData()
}
fun getMeditationInfo():Observable<BaseAPIResponse<MeditationModuleBean>>{
return getHomePagerApi().getMeditation()
}
}
\ No newline at end of file
......@@ -23,8 +23,5 @@ interface HomePagerApi {
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getMuseData(): Observable<BaseAPIResponse<MuseModuleBean>>
@GET("cms/meditation/index")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getMeditation(): Observable<BaseAPIResponse<MeditationModuleBean>>
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.yidianling.home.model
import com.ydl.ydlcommon.data.http.RxUtils
import com.yidianling.home.constract.IHomeContract
import com.yidianling.home.http.HomeBaseHttp
import com.yidianling.home.http.HomeHttp
import com.yidianling.home.model.bean.MeditationModuleBean
import com.yidianling.home.model.bean.MuseModuleBean
......@@ -28,7 +29,7 @@ class HomeModelImpl : BaseHomeModelImpl(), IHomeContract.Model {
}
override fun getMeditation(): Observable<MeditationModuleBean> {
return HomeHttp.getInstance().getMeditationInfo().compose(RxUtils.resultJavaData())
return HomeBaseHttp.getInstance().getMeditationInfo().compose(RxUtils.resultJavaData())
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
.onErrorReturn { MeditationModuleBean(true) }
}
......
......@@ -47,10 +47,9 @@ import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.home_muse_view.*
import kotlinx.android.synthetic.ydl.home_fragment.*
import kotlinx.android.synthetic.ydl.home_fragment.tab_layout
import kotlinx.android.synthetic.ydl.home_muse_view.*
import kotlinx.android.synthetic.ydl.home_muse_view.view.*
import java.util.concurrent.TimeUnit
......
......@@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.yidianling.home.ui.view.HomeCommonTitleView
<com.yidianling.home.view.HomeCommonTitleView
android:id="@+id/homeModuleArticleViewHomeCommonTitleView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
......
......@@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.yidianling.home.ui.view.HomeCommonTitleView
<com.yidianling.home.view.HomeCommonTitleView
android:id="@+id/homeModuleAssuageGriefViewHomeCommonTitleView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
......
......@@ -5,7 +5,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<com.yidianling.home.ui.view.HomeCommonTitleView
<com.yidianling.home.view.HomeCommonTitleView
android:id="@+id/homeModuleConfideViewHomeCommonTitleView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
......
......@@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.yidianling.home.ui.view.HomeCommonTitleView
<com.yidianling.home.view.HomeCommonTitleView
android:id="@+id/homeModuleCourseViewHomeCommonTitleView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
......
......@@ -4,7 +4,7 @@
android:layout_height="wrap_content"
>
<com.yidianling.home.ui.view.HomeCommonTitleView
<com.yidianling.home.view.HomeCommonTitleView
android:id="@+id/homeModuleIntelligentViewHomeCommonTitleView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
......
......@@ -4,7 +4,7 @@
android:layout_height="wrap_content"
>
<com.yidianling.home.ui.view.HomeCommonTitleView
<com.yidianling.home.view.HomeCommonTitleView
android:id="@+id/homeModuleIntelligentViewHomeCommonTitleView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="white_60">#99FFFFFF</color>
<color name="white">#FFFFFF</color>
<color name="home_confide_61CEAC">#61CEAC</color>
......
......@@ -11,13 +11,5 @@
<item name="android:windowIsTranslucent">true</item>
</style>
<style name="MeditationTabLayoutStyle" parent="Widget.Design.TabLayout">
<item name="tabIndicatorColor">@color/white</item>
<item name="tabIndicatorHeight">2dp</item>
<item name="tabIndicatorFullWidth">false</item>
<item name="tabSelectedTextColor">@color/white</item>
<item name="android:textSize">16sp</item>
<item name="android:textColor">@color/white_60</item>
</style>
</resources>
\ No newline at end of file
......@@ -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
)
)
......
......@@ -14,6 +14,7 @@ import com.ydl.webview.ProgressWebView
import com.ydl.webview.TellData
import com.ydl.webview.WebModularServiceUtils
import com.ydl.ydlcommon.base.config.HttpConfig
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
......@@ -54,6 +55,7 @@ class ExpertConsultWebview : RelativeLayout {
val jtoJHandle = WebModularServiceUtils.getWebService()
.getJavascripHandler(mContext as Activity, wv_content, tellData = TellData())
val url = WebUrlParamsUtils.getSuffix(jumpUrl, jtoJHandle.getUriAppendSuffix())
LogUtil.e(url)
wv_content.loadUrl(url)
}
......
......@@ -117,6 +117,7 @@
<RelativeLayout
android:layout_width="74dp"
android:layout_height="@dimen/platform_dp_32">
<TextView
android:id="@+id/im_expert_service_list_btn"
android:layout_width="74dp"
......@@ -172,32 +173,32 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="1dp"
android:text="¥"
android:textFontWeight="800"
android:textColor="#EB892C"
android:textSize="12sp"
android:layout_marginBottom="1dp"/>
android:textFontWeight="800"
android:textSize="12sp" />
<TextView
android:id="@+id/service_item_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:textStyle="normal"
android:textFontWeight="1500"
android:text="0"
android:textColor="#EB892C"
android:textSize="@dimen/im_text_size_18" />
android:textFontWeight="1500"
android:textSize="@dimen/im_text_size_18"
android:textStyle="normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginLeft="@dimen/platform_dp_3"
android:layout_marginBottom="@dimen/platform_dp_1"
android:gravity="bottom"
android:layout_gravity="bottom"
android:text="起"
android:textColor="#9D9EA7"
android:layout_marginBottom="@dimen/platform_dp_1"
android:textSize="12sp" />
......@@ -205,12 +206,12 @@
android:id="@+id/service_item_low_buy_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#9D9EA7"
android:textSize="@dimen/sp_12"
android:visibility="gone"
android:layout_gravity="bottom"
android:layout_marginBottom="@dimen/platform_dp_1"
android:text="(8次起售)" />
android:text="(8次起售)"
android:textColor="#9D9EA7"
android:textSize="@dimen/sp_12"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
......
......@@ -43,6 +43,7 @@ import com.yidianling.user.api.event.RefreshRecentContactListEvent
import com.yidianling.user.api.service.IAppService
import com.yidianling.user.constants.UserBIConstants.UserMyPageEvent
import com.yidianling.user.mine.bean.CouponNumBean
import com.yidianling.user.mine.bean.UpdateTabMeNumBean
import com.yidianling.user.mine.data.AppDataManager.getHttp
import com.yidianling.user.mine.data.AppDataManager.getLocal
import com.yidianling.user.mine.http.MineHttpImpl
......@@ -146,6 +147,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
override fun onResume() {
super.onResume()
updateUI()
refreshCouponData()
}
override fun setUserVisibleHint(isVisibleToUser: Boolean) {
......@@ -212,28 +214,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)
}
EventBus.getDefault().post(UpdateTabMeNumBean())
},{
getLocal().setConfide(false)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
})
}
......@@ -246,6 +254,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
getLocal().setCoupon(false)
getLocal().setConfide(false)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
val userInfo = getUserInfo()
......
package com.yidianling.user.mine.bean;
/**
* @author jiucheng
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2019/5/7
*/
public class UpdateTabMeNumBean {
}
......@@ -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