Commit d3553a5a by 徐健

Merge branch 'dev' into feature/test_home_pager

parents 16db7270 772879aa
...@@ -43,11 +43,11 @@ ext { ...@@ -43,11 +43,11 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.18", "m-confide" : "0.0.18",
"m-consultant" : "0.0.27", "m-consultant" : "0.0.29",
"m-course" : "0.0.16", "m-course" : "0.0.17",
"m-fm" : "0.0.14", "m-fm" : "0.0.15",
"m-muse" : "0.0.11", "m-muse" : "0.0.11",
"m-tests" : "0.0.9", "m-tests" : "0.0.10",
"m-user" : "0.0.30", "m-user" : "0.0.30",
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
...@@ -69,10 +69,9 @@ ext { ...@@ -69,10 +69,9 @@ ext {
"ydl-pay" : "0.0.9", "ydl-pay" : "0.0.9",
"m-audioim" : "0.0.15", "m-audioim" : "0.0.15",
//以下 几乎不会动 //以下 几乎不会动
"router" : "0.0.1", "router" : "0.0.1",
"ydl-net" : "0.0.2", "ydl-net" : "0.0.2",
"ydl-utils" : "0.0.2", "ydl-utils" : "0.0.3",
"ydl-flutter-base": "0.0.3", "ydl-flutter-base": "0.0.3",
] ]
...@@ -81,8 +80,8 @@ ext { ...@@ -81,8 +80,8 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.15", "m-confide" : "0.0.15",
"m-consultant" : "0.0.26", "m-consultant" : "0.0.26",
"m-course" : "0.0.16", "m-course" : "0.0.22",
"m-fm" : "0.0.11", "m-fm" : "0.0.15",
"m-muse" : "0.0.7", "m-muse" : "0.0.7",
"m-tests" : "0.0.4", "m-tests" : "0.0.4",
"m-user" : "0.0.25", "m-user" : "0.0.25",
...@@ -108,7 +107,7 @@ ext { ...@@ -108,7 +107,7 @@ ext {
"router" : "0.0.1", "router" : "0.0.1",
"ydl-net" : "0.0.2", "ydl-net" : "0.0.2",
"ydl-utils" : "0.0.2", "ydl-utils" : "0.0.3",
"ydl-flutter-base": "0.0.3", "ydl-flutter-base": "0.0.3",
] ]
......
...@@ -255,10 +255,29 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -255,10 +255,29 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
// }) // })
image_scroll_top.setOnClickListener(this) image_scroll_top.setOnClickListener(this)
// initStatus() // initStatus()
}
override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser)
if (isVisibleToUser && isResumed) {
showConsultAssistantDialog()
}else {
hideConsultAssistantDialog()
}
if (isVisibleToUser && isResumed) {
onResume()
}
}
private fun showConsultAssistantDialog() {
ConsultAssistantDialogUtils.INSTANCE.fitRequest(activity, "doctor_list") ConsultAssistantDialogUtils.INSTANCE.fitRequest(activity, "doctor_list")
} }
private fun hideConsultAssistantDialog() {
ConsultAssistantDialogUtils.INSTANCE.hide()
}
private fun initNetLossView() { private fun initNetLossView() {
v_loading.setListener(object : LogoLoadingView.LogoLoadingListener { v_loading.setListener(object : LogoLoadingView.LogoLoadingListener {
override fun onDataResetClick() { override fun onDataResetClick() {
...@@ -909,11 +928,11 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -909,11 +928,11 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} else { } else {
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_NORMAL) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_NORMAL)
} }
ConsultAssistantDialogUtils.INSTANCE.fitRequest(activity, "doctor_list") showConsultAssistantDialog()
} }
filterPopupWindow.isClippingEnabled = false filterPopupWindow.isClippingEnabled = false
filterPopupWindow.showAtLocation(viewSep2.rootView, Gravity.TOP + Gravity.RIGHT, 0, 0) filterPopupWindow.showAtLocation(viewSep2.rootView, Gravity.TOP + Gravity.RIGHT, 0, 0)
ConsultAssistantDialogUtils.INSTANCE.hide() hideConsultAssistantDialog()
filterPopupWindow.onFilterConfirmListener = this filterPopupWindow.onFilterConfirmListener = this
updateFilterTextViewStatus(tvFilter, FILTER_STATUS_OPEN) updateFilterTextViewStatus(tvFilter, FILTER_STATUS_OPEN)
// viewDim.visibility = View.VISIBLE // viewDim.visibility = View.VISIBLE
......
...@@ -36,5 +36,12 @@ public class CourseHomeBodyBean { ...@@ -36,5 +36,12 @@ public class CourseHomeBodyBean {
public String originalApplyFee; public String originalApplyFee;
public boolean isBuy; public boolean isBuy;
public String demoFile; public String demoFile;
/**
* 活动图标
*/
public String activityImg;
/**
* 是否参加活动
*/
public String joinActivity;
} }
...@@ -28,4 +28,12 @@ public class CourseHostInfoBean { ...@@ -28,4 +28,12 @@ public class CourseHostInfoBean {
public String askTotalTime; public String askTotalTime;
public String helpLong; public String helpLong;
public ShareData shareData; public ShareData shareData;
/**
* 活动图标
*/
public String activityImg;
/**
* 是否参加活动
*/
public String joinActivity;
} }
...@@ -129,7 +129,6 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler ...@@ -129,7 +129,6 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler
search_view.setTextTitle("搜索") search_view.setTextTitle("搜索")
init() init()
loadData()
initCouponHintView() initCouponHintView()
setClick() setClick()
...@@ -195,7 +194,8 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler ...@@ -195,7 +194,8 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler
NewH5Activity.start(this@CourseListContainerActivity, h5Params) NewH5Activity.start(this@CourseListContainerActivity, h5Params)
} }
} }
getData(false)
loadData()
} }
/** /**
...@@ -225,6 +225,9 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler ...@@ -225,6 +225,9 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler
} }
} }
} }
getData(false)
if (selectedCourseList.size > 0) { if (selectedCourseList.size > 0) {
classify_layout.typeface = Typeface.defaultFromStyle(Typeface.BOLD) classify_layout.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
classify_layout.setTextColor( classify_layout.setTextColor(
...@@ -536,6 +539,10 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler ...@@ -536,6 +539,10 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler
iv_course_list_empty_view.visibility = View.GONE iv_course_list_empty_view.visibility = View.GONE
v_loading.visibility = View.GONE v_loading.visibility = View.GONE
} else { } else {
if (adapter!!.count > 0) {
// hasMore = false
load_more_list_view_container.loadMoreFinish(false, false)
} else {
lv_content.visibility = View.GONE lv_content.visibility = View.GONE
tv_course_list_empty_prompt.visibility = View.VISIBLE tv_course_list_empty_prompt.visibility = View.VISIBLE
iv_course_list_empty_view.visibility = View.VISIBLE iv_course_list_empty_view.visibility = View.VISIBLE
...@@ -543,6 +550,7 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler ...@@ -543,6 +550,7 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler
tv_course_list_empty_prompt.text = "还没有相应的课程哦~" tv_course_list_empty_prompt.text = "还没有相应的课程哦~"
v_loading.visibility = View.GONE v_loading.visibility = View.GONE
} }
}
}, { throwable -> }, { throwable ->
v_loading.visibility = View.GONE v_loading.visibility = View.GONE
if (adapter!!.mDataList == null || adapter!!.mDataList.size <= 0) { if (adapter!!.mDataList == null || adapter!!.mDataList.size <= 0) {
......
...@@ -497,7 +497,6 @@ class CoursePlayActivity : BaseActivity() { ...@@ -497,7 +497,6 @@ class CoursePlayActivity : BaseActivity() {
} }
fun showLoadingDialog() { fun showLoadingDialog() {
showProgressDialog(null) showProgressDialog(null)
} }
...@@ -636,14 +635,11 @@ class CoursePlayActivity : BaseActivity() { ...@@ -636,14 +635,11 @@ class CoursePlayActivity : BaseActivity() {
AudioPlayer.get().playMusic?.coverPath = courPlayBean?.courseExtra?.pic AudioPlayer.get().playMusic?.coverPath = courPlayBean?.courseExtra?.pic
AudioPlayer.get().playMusic?.artist = courPlayBean?.courseExtra?.doctorName AudioPlayer.get().playMusic?.artist = courPlayBean?.courseExtra?.doctorName
PlayerFloatHelper.playTempData.clear()
val hashMap = HashMap<String, String>() val hashMap = HashMap<String, String>()
hashMap["course_id"] = course_id.toString() hashMap["course_id"] = course_id.toString()
PlayerFloatHelper.playTempData.putAll(hashMap) PlayerFloatHelper.playTempData.putAll(hashMap)
// PlayerFloatHelper.show(
// this,
// playTypeEnum = PlayTypeEnum.PLAY_TYPE_COURSE,
// playData = hashMap
// )
} }
...@@ -655,14 +651,6 @@ class CoursePlayActivity : BaseActivity() { ...@@ -655,14 +651,6 @@ class CoursePlayActivity : BaseActivity() {
var status = Utils.getValue(videoView, "status") var status = Utils.getValue(videoView, "status")
//视频课程正在播放中 //视频课程正在播放中
if (status == PlayStateParams.STATE_PLAYING) { if (status == PlayStateParams.STATE_PLAYING) {
//todo 视屏播放
// YDLMusicHelper.title = courPlayBean?.courseExtra?.title
// YDLMusicHelper.cover = courPlayBean?.courseExtra?.pic
// YDLMusicHelper.name = courPlayBean?.courseExtra?.doctorName
// YDLMusicHelper.isVideoPlaying = true
// YDLMusicHelper.playType = 1
// YDLMusicHelper.courseVideoUlr = (play_view as CoursePlayItemViewVideo).videoUrl
// YDLMusicHelper.course_id = courPlayBean?.courseExtra?.id!!.toInt()
VideoFloatHelper.setVideoInfo( VideoFloatHelper.setVideoInfo(
course_id.toString(), course_id.toString(),
...@@ -702,9 +690,9 @@ class CoursePlayActivity : BaseActivity() { ...@@ -702,9 +690,9 @@ class CoursePlayActivity : BaseActivity() {
} }
override fun onDestroy() { override fun onDestroy() {
super.onDestroy()
videoView?.onDestroy() videoView?.onDestroy()
play_view?.onDestroy() play_view?.onDestroy()
play_view = null play_view = null
super.onDestroy()
} }
} }
...@@ -187,14 +187,7 @@ class CoursePlayItemViewAudio : RelativeLayout, PlayViewInterface { ...@@ -187,14 +187,7 @@ class CoursePlayItemViewAudio : RelativeLayout, PlayViewInterface {
} }
override fun onDestroy() { override fun onDestroy() {
//释放播放器
if (AudioPlayer.get().isPlaying) {
playView?.onDestroy() playView?.onDestroy()
playView = null playView = null
AudioPlayer.get().stopPlayer()
} else {
playView?.onDestroy()
playView = null
}
} }
} }
\ No newline at end of file
...@@ -12,6 +12,7 @@ import com.ydl.media.audio.utils.PlayProgressUtil ...@@ -12,6 +12,7 @@ import com.ydl.media.audio.utils.PlayProgressUtil
import com.ydl.media.view.PlayTypeEnum import com.ydl.media.view.PlayTypeEnum
import com.ydl.media.view.PlayerFloatHelper import com.ydl.media.view.PlayerFloatHelper
import com.ydl.ydl_image.module.GlideApp import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.view.dialog.CommonDialog import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.course.R import com.yidianling.course.R
import com.yidianling.course.bean.CourseExtraBean import com.yidianling.course.bean.CourseExtraBean
...@@ -173,7 +174,7 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface { ...@@ -173,7 +174,7 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
.forbidTouch(false) .forbidTouch(false)
.setOnInfoListener(object : IMediaPlayer.OnInfoListener { .setOnInfoListener(object : IMediaPlayer.OnInfoListener {
override fun onInfo(mp: IMediaPlayer, what: Int, extra: Int): Boolean { override fun onInfo(mp: IMediaPlayer, what: Int, extra: Int): Boolean {
LogUtil.e("课程播放--状态-$what")
if (what == PlayStateParams.STATE_PAUSED) { if (what == PlayStateParams.STATE_PAUSED) {
this@CoursePlayItemViewVideo.findViewById<View>(R.id.rl_play_pause_layout).visibility = View.VISIBLE this@CoursePlayItemViewVideo.findViewById<View>(R.id.rl_play_pause_layout).visibility = View.VISIBLE
} else { } else {
...@@ -187,13 +188,12 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface { ...@@ -187,13 +188,12 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
|| what == PlayStateParams.MEDIA_INFO_AUDIO_RENDERING_START || what == PlayStateParams.MEDIA_INFO_AUDIO_RENDERING_START
|| what == PlayStateParams.MEDIA_INFO_VIDEO_RENDERING_START || what == PlayStateParams.MEDIA_INFO_VIDEO_RENDERING_START
|| what == PlayStateParams.STATE_PLAYING || what == PlayStateParams.STATE_PLAYING
|| what == IMediaPlayer.MEDIA_INFO_VIDEO_SEEK_RENDERING_START
) { ) {
activity?.isVideoPlay = true activity?.isVideoPlay = true
this@CoursePlayItemViewVideo.findViewById<View>(R.id.ll_bg).visibility = View.GONE this@CoursePlayItemViewVideo.findViewById<View>(R.id.ll_bg).visibility = View.GONE
} else { this@CoursePlayItemViewVideo.findViewById<View>(R.id.ll_loading).visibility = View.GONE
mHandler.postDelayed({ this@CoursePlayItemViewVideo.findViewById<View>(R.id.app_video_loading).visibility = View.GONE
this@CoursePlayItemViewVideo.findViewById<View>(R.id.ll_bg).visibility = View.VISIBLE
}, 550)
} }
if (what == PlayStateParams.STATE_COMPLETED) { if (what == PlayStateParams.STATE_COMPLETED) {
......
...@@ -17,6 +17,7 @@ import com.ydl.ydlcommon.base.BaseActivity ...@@ -17,6 +17,7 @@ import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.bean.ShareData import com.ydl.ydlcommon.bean.ShareData
import com.ydl.ydlcommon.data.http.ThrowableConsumer import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.router.IYDLRouterConstant import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.common.tools.RxKeyboardTool
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.course.CourseConstants import com.yidianling.course.CourseConstants
import com.yidianling.course.R import com.yidianling.course.R
...@@ -96,7 +97,9 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC ...@@ -96,7 +97,9 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
private fun initSearchBar() { private fun initSearchBar() {
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE) window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE)
activity_course_search_search_bar_view.initBarType(SearchBarView.ENABLE_INPUT, object : SearchBarView.SearchCallBack { activity_course_search_search_bar_view.initBarType(
SearchBarView.ENABLE_INPUT,
object : SearchBarView.SearchCallBack {
override fun cloase() { override fun cloase() {
finish() finish()
} }
...@@ -110,7 +113,11 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC ...@@ -110,7 +113,11 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
} }
loadCourseList(true) loadCourseList(true)
} }
}) })
activity_course_search_search_bar_view.postDelayed({
RxKeyboardTool.showSoftInput(this, activity_course_search_search_bar_view.getEditText())
},500)
} }
/** /**
...@@ -127,7 +134,8 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC ...@@ -127,7 +134,8 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
*/ */
private fun initRecyclerView() { private fun initRecyclerView() {
if (null == courseSearchAdapterWrapper) { if (null == courseSearchAdapterWrapper) {
courseSearchAdapter = CourseSearchAdapter(this, CourseSearchActicity@ this, courseList!!) courseSearchAdapter =
CourseSearchAdapter(this, CourseSearchActicity@ this, courseList!!)
courseSearchAdapter!!.setOnItemClickListener(this) courseSearchAdapter!!.setOnItemClickListener(this)
activity_course_search_recycler.layoutManager = LinearLayoutManager(this) activity_course_search_recycler.layoutManager = LinearLayoutManager(this)
...@@ -135,7 +143,8 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC ...@@ -135,7 +143,8 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
this, this,
courseSearchAdapter!!, courseSearchAdapter!!,
20, 20,
activity_course_search_recycler) activity_course_search_recycler
)
.setOnLoadMoreListener(object : CourseSearchAdapterWrapper.OnLoadMoreListener { .setOnLoadMoreListener(object : CourseSearchAdapterWrapper.OnLoadMoreListener {
override fun onLoadMore() { override fun onLoadMore() {
loadCourseList(false) loadCourseList(false)
...@@ -143,7 +152,11 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC ...@@ -143,7 +152,11 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
}) })
activity_course_search_recycler.adapter = courseSearchAdapterWrapper activity_course_search_recycler.adapter = courseSearchAdapterWrapper
//滑动监听 图片是否加载 //滑动监听 图片是否加载
activity_course_search_recycler.addOnScrollListener(YDLImageRecyclerOnScrollListener(CourseSearchActicity@ this)) activity_course_search_recycler.addOnScrollListener(
YDLImageRecyclerOnScrollListener(
CourseSearchActicity@ this
)
)
loadCourseList(true) loadCourseList(true)
} }
} }
...@@ -156,7 +169,12 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC ...@@ -156,7 +169,12 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
if (null != courseItem) { if (null != courseItem) {
val h5Params = H5Params(CourseConstants.COURSE_DETAIL_H5 + courseItem.id, "课程详情") val h5Params = H5Params(CourseConstants.COURSE_DETAIL_H5 + courseItem.id, "课程详情")
if (null != courseItem.share && !TextUtils.isEmpty(courseItem.share.share_url)) { if (null != courseItem.share && !TextUtils.isEmpty(courseItem.share.share_url)) {
val shareData = ShareData(courseItem.share.share_url, courseItem.share.title, courseItem.share.cover, courseItem.share.desc) val shareData = ShareData(
courseItem.share.share_url,
courseItem.share.title,
courseItem.share.cover,
courseItem.share.desc
)
h5Params.shareData = shareData h5Params.shareData = shareData
} }
......
...@@ -190,6 +190,7 @@ class CoursePlugin : MethodChannel.MethodCallHandler { ...@@ -190,6 +190,7 @@ class CoursePlugin : MethodChannel.MethodCallHandler {
if (demoType == 1) { if (demoType == 1) {
music.path = url music.path = url
PlayerFloatHelper.playTempData.clear()
val hashMap = HashMap<String, String>() val hashMap = HashMap<String, String>()
hashMap["course_id"] = fileInfo["courseId"].toString() hashMap["course_id"] = fileInfo["courseId"].toString()
AudioPlayer.get().singlePlay(music) AudioPlayer.get().singlePlay(music)
......
...@@ -3,6 +3,7 @@ package com.yidianling.course.lifeCallback ...@@ -3,6 +3,7 @@ package com.yidianling.course.lifeCallback
import android.app.Activity import android.app.Activity
import android.app.Application import android.app.Application
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils
import com.ydl.media.audio.AudioPlayer import com.ydl.media.audio.AudioPlayer
import com.ydl.media.view.PlayTypeEnum import com.ydl.media.view.PlayTypeEnum
import com.ydl.media.view.PlayerFloatHelper import com.ydl.media.view.PlayerFloatHelper
...@@ -26,8 +27,13 @@ class CoursePlayLifecycle : Application.ActivityLifecycleCallbacks { ...@@ -26,8 +27,13 @@ class CoursePlayLifecycle : Application.ActivityLifecycleCallbacks {
AudioPlayer.get().stopPlayer() AudioPlayer.get().stopPlayer()
} else { } else {
PlayerFloatHelper.showIfPlaying(activity!!) PlayerFloatHelper.showIfPlaying(activity!!)
if (!TextUtils.isEmpty(PlayerFloatHelper.playTempData["course_id"])) {
PlayerFloatHelper.playingType = PlayTypeEnum.PLAY_TYPE_COURSE PlayerFloatHelper.playingType = PlayTypeEnum.PLAY_TYPE_COURSE
} }
if (!TextUtils.isEmpty(PlayerFloatHelper.playTempData["fmId"])) {
PlayerFloatHelper.playingType = PlayTypeEnum.PLAY_TYPE_FM
}
}
} }
override fun onActivityStarted(activity: Activity?) { override fun onActivityStarted(activity: Activity?) {
......
...@@ -20,7 +20,6 @@ import com.ydl.webview.H5Params ...@@ -20,7 +20,6 @@ import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.module.GlideApp import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.actionutil.BIConstants
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.course.CourseConstants import com.yidianling.course.CourseConstants
...@@ -76,7 +75,16 @@ class CourseItemNewView : ConstraintLayout { ...@@ -76,7 +75,16 @@ class CourseItemNewView : ConstraintLayout {
.load(headUrl) .load(headUrl)
.into(iv_head) .into(iv_head)
//活动标签
if(!TextUtils.isEmpty(course.courseHostInfo?.activityImg)){
img_activity.visibility = View.VISIBLE
GlideApp.with(context).load(course.courseHostInfo?.activityImg).into(img_activity)
tv_title.text = "\u3000\u3000\u3000\u0020"+course.title
}else{
img_activity.visibility = View.GONE
tv_title.text = course.title tv_title.text = course.title
}
if (!TextUtils.isEmpty(course.doctorName)) { if (!TextUtils.isEmpty(course.doctorName)) {
doctorName = course.doctorName doctorName = course.doctorName
} else { } else {
...@@ -136,11 +144,18 @@ class CourseItemNewView : ConstraintLayout { ...@@ -136,11 +144,18 @@ class CourseItemNewView : ConstraintLayout {
iv_play.setOnClickListener { iv_play.setOnClickListener {
playMedia() playMedia()
ActionCountUtils.count(CourseBIConstants.CourseListEvent.POSITION_COURSE_LIST_AUDITION_CLICK, course.id) ActionCountUtils.count(
CourseBIConstants.CourseListEvent.POSITION_COURSE_LIST_AUDITION_CLICK,
course.id
)
} }
tv_view_course.setOnClickListener { tv_view_course.setOnClickListener {
if (TextUtils.equals(course.courseType, "1") || TextUtils.equals(course.courseType, "7") || TextUtils.equals(course.courseType, "6")) { if (TextUtils.equals(course.courseType, "1") || TextUtils.equals(
course.courseType,
"7"
) || TextUtils.equals(course.courseType, "6")
) {
ARouter.getInstance() ARouter.getInstance()
.build("/course/play") .build("/course/play")
.withInt("course_id", course.id.toInt()) .withInt("course_id", course.id.toInt())
...@@ -164,7 +179,11 @@ class CourseItemNewView : ConstraintLayout { ...@@ -164,7 +179,11 @@ class CourseItemNewView : ConstraintLayout {
} }
} }
if (TextUtils.equals("1", course.isPromotion) || TextUtils.equals("3", course.isPromotion)) { if (TextUtils.equals("1", course.isPromotion) || TextUtils.equals(
"3",
course.isPromotion
)
) {
tv_cu_xiao.visibility = View.VISIBLE tv_cu_xiao.visibility = View.VISIBLE
if (TextUtils.equals("1", course.isPromotion)) { if (TextUtils.equals("1", course.isPromotion)) {
if (course.promotionApplyFee.contains(".")) { if (course.promotionApplyFee.contains(".")) {
...@@ -181,7 +200,11 @@ class CourseItemNewView : ConstraintLayout { ...@@ -181,7 +200,11 @@ class CourseItemNewView : ConstraintLayout {
if (course.isBuy) { if (course.isBuy) {
tv_view_course.visibility = View.VISIBLE tv_view_course.visibility = View.VISIBLE
if (TextUtils.equals(course.courseType, "1") || TextUtils.equals(course.courseType, "7") || TextUtils.equals(course.courseType, "6")) { if (TextUtils.equals(course.courseType, "1") || TextUtils.equals(
course.courseType,
"7"
) || TextUtils.equals(course.courseType, "6")
) {
tv_view_course.text = "立即听课" tv_view_course.text = "立即听课"
} else { } else {
tv_view_course.text = "查看课程" tv_view_course.text = "查看课程"
...@@ -201,7 +224,14 @@ class CourseItemNewView : ConstraintLayout { ...@@ -201,7 +224,14 @@ class CourseItemNewView : ConstraintLayout {
tv_price_decimal.visibility = View.VISIBLE tv_price_decimal.visibility = View.VISIBLE
if (TextUtils.isEmpty(course.originalApplyFee) || TextUtils.equals(course.originalApplyFee, "0") || TextUtils.equals(course.originalApplyFee, "0.0") || TextUtils.equals(course.originalApplyFee, "0.00")) { if (TextUtils.isEmpty(course.originalApplyFee) || TextUtils.equals(
course.originalApplyFee,
"0"
) || TextUtils.equals(
course.originalApplyFee,
"0.0"
) || TextUtils.equals(course.originalApplyFee, "0.00")
) {
tv_original_price.visibility = View.GONE tv_original_price.visibility = View.GONE
} else { } else {
tv_original_price.visibility = View.VISIBLE tv_original_price.visibility = View.VISIBLE
...@@ -221,20 +251,19 @@ class CourseItemNewView : ConstraintLayout { ...@@ -221,20 +251,19 @@ class CourseItemNewView : ConstraintLayout {
PlayerFloatHelper.removeView(mContext) PlayerFloatHelper.removeView(mContext)
} }
val music=Music() val music = Music()
music.title=course.title music.title = course.title
music.artist=doctorName music.artist = doctorName
music.coverPath=if (!TextUtils.isEmpty(course.image)) course.image else course.pic music.coverPath = if (!TextUtils.isEmpty(course.image)) course.image else course.pic
PlayerFloatHelper.isCanClick = false PlayerFloatHelper.isCanClick = false
if (course.demoType == 1) { if (course.demoType == 1) {
PlayerFloatHelper.playingType=PlayTypeEnum.PLAY_TYPE_COURSE music.path = course.demoFile
music.path=course.demoFile
val hashMap = HashMap<String, String>() val hashMap = HashMap<String, String>()
hashMap["course_id"] =course.id.toString() PlayerFloatHelper.playTempData.clear()
hashMap["course_id"] = course.id.toString()
AudioPlayer.get().singlePlay(music) AudioPlayer.get().singlePlay(music)
PlayerFloatHelper.show( PlayerFloatHelper.show(
mContext, mContext,
......
...@@ -249,8 +249,8 @@ class HPlayView : RelativeLayout, OnPlayerEventListener { ...@@ -249,8 +249,8 @@ class HPlayView : RelativeLayout, OnPlayerEventListener {
} }
fun onDestroy() { fun onDestroy() {
AudioPlayer.get().removeOnPlayEventListener(this)
mContext = null mContext = null
mHandler = null mHandler = null
AudioPlayer.get().removeOnPlayEventListener(this)
} }
} }
\ No newline at end of file
...@@ -9,6 +9,7 @@ import android.util.AttributeSet ...@@ -9,6 +9,7 @@ import android.util.AttributeSet
import android.view.Gravity import android.view.Gravity
import android.view.View import android.view.View
import android.view.inputmethod.InputMethodManager import android.view.inputmethod.InputMethodManager
import android.widget.EditText
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import com.ydl.ydl_router.manager.YDLRouterManager import com.ydl.ydl_router.manager.YDLRouterManager
...@@ -157,6 +158,11 @@ class SearchBarView : LinearLayout { ...@@ -157,6 +158,11 @@ class SearchBarView : LinearLayout {
searchCallBack = mSearchCallback searchCallBack = mSearchCallback
} }
fun getEditText():EditText{
return common_search_bar_edit_text
}
interface SearchCallBack { interface SearchCallBack {
fun clickSearchBtn(str: String) //设置监听(跳转逻辑已在组件内部实现,该方法主要用于回调点击键盘搜索按钮事件) fun clickSearchBtn(str: String) //设置监听(跳转逻辑已在组件内部实现,该方法主要用于回调点击键盘搜索按钮事件)
......
...@@ -5,38 +5,37 @@ ...@@ -5,38 +5,37 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:background="@color/white"
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:orientation="vertical" android:orientation="vertical">
>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="44dp" android:layout_height="44dp"
android:background="@color/course_color_FFFFFF" android:background="@color/course_color_FFFFFF"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal">
android:paddingLeft="16dp">
<ImageView <ImageView
android:id="@+id/iv_back" android:id="@+id/iv_back"
android:layout_width="13dp" android:layout_width="30dp"
android:layout_height="22dp" android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:padding="15dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/course_icon_back_black" /> android:src="@drawable/course_icon_back_black" />
<com.yidianling.course.widget.SearchBarView <com.yidianling.course.widget.SearchBarView
android:id="@+id/search_view" android:id="@+id/search_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>
<View <View
android:id="@+id/divider_line" android:id="@+id/divider_line"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="#f0f0f0"/> android:background="#f0f0f0" />
<LinearLayout <LinearLayout
...@@ -54,7 +53,7 @@ ...@@ -54,7 +53,7 @@
android:text="综合排序" android:text="综合排序"
android:textColor="@color/main_theme" android:textColor="@color/main_theme"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold"/> android:textStyle="bold" />
<com.ydl.ydlcommon.view.DrawableRightTextView <com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/classify_layout" android:id="@+id/classify_layout"
...@@ -65,7 +64,7 @@ ...@@ -65,7 +64,7 @@
android:gravity="center" android:gravity="center"
android:text="分类" android:text="分类"
android:textColor="@color/course_color_242424" android:textColor="@color/course_color_242424"
android:textSize="14sp"/> android:textSize="14sp" />
<com.ydl.ydlcommon.view.DrawableRightTextView <com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/filter_layout" android:id="@+id/filter_layout"
...@@ -76,7 +75,7 @@ ...@@ -76,7 +75,7 @@
android:gravity="center" android:gravity="center"
android:text="筛选" android:text="筛选"
android:textColor="@color/course_color_242424" android:textColor="@color/course_color_242424"
android:textSize="14sp"/> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -86,20 +85,20 @@ ...@@ -86,20 +85,20 @@
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="15dp" android:paddingLeft="15dp"
android:paddingRight="15dp" android:paddingRight="15dp"
android:paddingBottom="10dp"/> android:paddingBottom="10dp" />
<View <View
android:id="@+id/view_line" android:id="@+id/view_line"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="#f0f0f0"/> android:background="#f0f0f0" />
<com.yidianling.course.widget.CouponHintView <com.yidianling.course.widget.CouponHintView
android:id="@+id/hint_view" android:id="@+id/hint_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"/> android:visibility="gone" />
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -121,7 +120,7 @@ ...@@ -121,7 +120,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:divider="@color/course_color_EDEDED" android:divider="@color/course_color_EDEDED"
android:dividerHeight="0dp"/> android:dividerHeight="0dp" />
<ImageView <ImageView
android:id="@+id/iv_course_list_empty_view" android:id="@+id/iv_course_list_empty_view"
...@@ -130,7 +129,7 @@ ...@@ -130,7 +129,7 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="50dp" android:layout_marginTop="50dp"
android:src="@drawable/course_blank" android:src="@drawable/course_blank"
android:visibility="gone"/> android:visibility="gone" />
<TextView <TextView
android:id="@+id/tv_course_list_empty_prompt" android:id="@+id/tv_course_list_empty_prompt"
...@@ -140,14 +139,14 @@ ...@@ -140,14 +139,14 @@
android:layout_marginTop="14dp" android:layout_marginTop="14dp"
android:text="暂无相应记录" android:text="暂无相应记录"
android:textColor="#b2b2b2" android:textColor="#b2b2b2"
android:visibility="gone"/> android:visibility="gone" />
<com.ydl.ydlcommon.ui.LogoLoadingView <com.ydl.ydlcommon.ui.LogoLoadingView
android:id="@+id/v_loading" android:id="@+id/v_loading"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:visibility="gone"/> android:visibility="gone" />
</in.srain.cube.views.loadmore.LoadMoreListViewContainer> </in.srain.cube.views.loadmore.LoadMoreListViewContainer>
...@@ -160,7 +159,7 @@ ...@@ -160,7 +159,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:alpha="0.4" android:alpha="0.4"
android:background="@android:color/black" android:background="@android:color/black"
android:visibility="gone"/> android:visibility="gone" />
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
android:background="@drawable/course_filter_select_nor" android:background="@drawable/course_filter_select_nor"
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
android:text="免费" android:text="10元体验"
android:textColor="@color/course_color_242424" android:textColor="@color/course_color_242424"
android:textSize="14dp" /> android:textSize="14dp" />
......
...@@ -85,6 +85,12 @@ ...@@ -85,6 +85,12 @@
<!--加载中--> <!--加载中-->
<LinearLayout <LinearLayout
android:id="@+id/ll_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible">
<LinearLayout
android:id="@+id/app_video_loading" android:id="@+id/app_video_loading"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
...@@ -108,6 +114,8 @@ ...@@ -108,6 +114,8 @@
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
</LinearLayout>
<!-- 中间触摸提示--> <!-- 中间触摸提示-->
<include <include
......
...@@ -82,6 +82,14 @@ ...@@ -82,6 +82,14 @@
app:layout_constraintTop_toTopOf="@+id/iv_head" app:layout_constraintTop_toTopOf="@+id/iv_head"
tools:text="走出余光恐惧,一位余光恐惧者的亲诉一位余光恐惧者的亲诉一位余光恐惧者的亲诉一位余光恐惧者的亲诉"/> tools:text="走出余光恐惧,一位余光恐惧者的亲诉一位余光恐惧者的亲诉一位余光恐惧者的亲诉一位余光恐惧者的亲诉"/>
<ImageView
android:id="@+id/img_activity"
android:layout_width="47dp"
android:layout_height="15dp"
android:layout_marginTop="3.3dp"
app:layout_constraintTop_toTopOf="@+id/tv_title"
app:layout_constraintLeft_toLeftOf="@+id/tv_title"
android:visibility="gone"/>
<TextView <TextView
android:id="@+id/tv_doctor_info" android:id="@+id/tv_doctor_info"
android:layout_width="0dp" android:layout_width="0dp"
......
...@@ -416,6 +416,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -416,6 +416,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
} }
LogUtil.d("fmDetail.id not equal " + fmDetail.getId()); LogUtil.d("fmDetail.id not equal " + fmDetail.getId());
HashMap<String,String> map = new HashMap(); HashMap<String,String> map = new HashMap();
PlayerFloatHelper.Companion.getPlayTempData().clear();
map.put("fmId", String.valueOf(fmDetail.getId())); map.put("fmId", String.valueOf(fmDetail.getId()));
map.put("fmTitle", String.valueOf(fmDetail.getTitle())); map.put("fmTitle", String.valueOf(fmDetail.getTitle()));
map.put("fmAuthor", String.valueOf(fmDetail.getAuthor())); map.put("fmAuthor", String.valueOf(fmDetail.getAuthor()));
......
...@@ -2,22 +2,22 @@ package com.yidianling.tests.router ...@@ -2,22 +2,22 @@ package com.yidianling.tests.router
import android.app.Activity import android.app.Activity
import android.content.Intent import android.content.Intent
import com.ydl.ydl_router.manager.YDLRouterManager import com.ydl.webview.H5Params
import com.ydl.ydl_router.manager.YDLRouterParams import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.router.tests.ITestsRouter import com.yidianling.router.tests.ITestsRouter
class TestsRouterImp : ITestsRouter { class TestsRouterImp : ITestsRouter {
override fun testH5Result(testResultId: String) { override fun testH5Result(testResultId: String) {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_H5_H5, val h5Params = H5Params(HttpConfig.MH5_URL+"ceshi/result/"+testResultId, null)
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, HttpConfig.MH5_URL+"ceshi/result/"+testResultId),"") NewH5Activity.start(BaseApp.getApp(),h5Params)
} }
override fun testDetailH5(testId: String) { override fun testDetailH5(testId: String) {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_H5_H5, val h5Params = H5Params(HttpConfig.MH5_URL+"ceshi/"+testId, null)
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, HttpConfig.MH5_URL+"ceshi/"+testId),"") NewH5Activity.start(BaseApp.getApp(),h5Params)
} }
override fun testDetailIntent(activity: Activity, testId: Int): Intent { override fun testDetailIntent(activity: Activity, testId: Int): Intent {
......
...@@ -25,6 +25,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions ...@@ -25,6 +25,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions
import com.umeng.socialize.UMShareAPI import com.umeng.socialize.UMShareAPI
import com.umeng.socialize.UMShareConfig import com.umeng.socialize.UMShareConfig
import com.umeng.socialize.bean.SHARE_MEDIA import com.umeng.socialize.bean.SHARE_MEDIA
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.BaseMvpActivity import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.StatusBarUtils import com.ydl.ydlcommon.utils.StatusBarUtils
...@@ -34,10 +35,9 @@ import com.ydl.ydlcommon.view.dialog.CommonDialog ...@@ -34,10 +35,9 @@ import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxKeyboardTool import com.yidianling.common.tools.RxKeyboardTool
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.BuildConfig
import com.yidianling.user.R import com.yidianling.user.R
import com.yidianling.user.UserHelper import com.yidianling.user.UserHelper
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.AliAuthBean import com.yidianling.user.bean.AliAuthBean
import com.yidianling.user.constants.UserBIConstants import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.http.request.BindPhoneJavaParam import com.yidianling.user.http.request.BindPhoneJavaParam
...@@ -225,7 +225,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -225,7 +225,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
/* /*
* 3.set debugMode when app is in debug mode, sdk will print log in debug mode * 3.set debugMode when app is in debug mode, sdk will print log in debug mode
*/ */
mAlicomAuthHelper?.setDebugMode(BuildConfig.DEBUG) mAlicomAuthHelper?.setDebugMode(BaseApp.instance.getGlobalConfig().appDebug)
requestPermission() requestPermission()
/* /*
......
...@@ -7,7 +7,9 @@ import com.lzy.imagepicker.ImagePicker ...@@ -7,7 +7,9 @@ import com.lzy.imagepicker.ImagePicker
import com.lzy.imagepicker.view.CropImageView import com.lzy.imagepicker.view.CropImageView
import com.ydl.devicesidlib.DeviceIDHelper import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.ydlcommon.actions.imagepicker.YdlImageLoader import com.ydl.ydlcommon.actions.imagepicker.YdlImageLoader
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.yidianling.common.tools.RxTool import com.yidianling.common.tools.RxTool
...@@ -25,6 +27,8 @@ object YdlRepository { ...@@ -25,6 +27,8 @@ object YdlRepository {
fun initApp(app: Application,isDebug:Boolean) { fun initApp(app: Application,isDebug:Boolean) {
DeviceIDHelper.getInstance().init(app.applicationContext) DeviceIDHelper.getInstance().init(app.applicationContext)
LogHelper.getInstance().deleteExpireLogSync() LogHelper.getInstance().deleteExpireLogSync()
LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
com.yidianling.common.tools.LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
//初始化工具类 //初始化工具类
RxTool.init(app) RxTool.init(app)
BuryPointUtils.init() BuryPointUtils.init()
......
...@@ -3,7 +3,6 @@ package com.ydl.ydlcommon.base.config ...@@ -3,7 +3,6 @@ package com.ydl.ydlcommon.base.config
import android.content.Context import android.content.Context
import android.text.TextUtils import android.text.TextUtils
import com.facebook.stetho.okhttp3.StethoInterceptor import com.facebook.stetho.okhttp3.StethoInterceptor
import com.ydl.ydlcommon.BuildConfig
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.data.http.EncryptUtils import com.ydl.ydlcommon.data.http.EncryptUtils
...@@ -72,7 +71,7 @@ class HttpConfig { ...@@ -72,7 +71,7 @@ class HttpConfig {
//获取证书 //获取证书
val cerInputStream = context.resources.openRawResource(com.ydl.ydlcommon.R.raw.ydl_trust); val cerInputStream = context.resources.openRawResource(com.ydl.ydlcommon.R.raw.ydl_trust);
val builder = OkHttpConfig.Builder(context); val builder = OkHttpConfig.Builder(context);
if (BuildConfig.DEBUG) { if (appDebug) {
builder.setNetInterceptor(StethoInterceptor()) builder.setNetInterceptor(StethoInterceptor())
}else{ }else{
//使用预埋证书,校验服务端证书 //使用预埋证书,校验服务端证书
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
package com.ydl.ydlcommon.utils; package com.ydl.ydlcommon.utils;
import android.util.Log; import android.util.Log;
import com.ydl.ydlcommon.BuildConfig;
/** /**
...@@ -18,7 +17,8 @@ public class LogUtil { ...@@ -18,7 +17,8 @@ public class LogUtil {
private static String lastMethodName; private static String lastMethodName;
private static boolean debug = BuildConfig.DEBUG; public static boolean debug = false;
public static String TAG = "hzs"; public static String TAG = "hzs";
private LogUtil() { private LogUtil() {
......
...@@ -3,8 +3,6 @@ package com.yidianling.common.tools; ...@@ -3,8 +3,6 @@ package com.yidianling.common.tools;
import android.util.Log; import android.util.Log;
import com.yidianling.common.BuildConfig;
/** /**
* LogUtil * LogUtil
...@@ -19,12 +17,17 @@ public class LogUtil { ...@@ -19,12 +17,17 @@ public class LogUtil {
private static String lastMethodName; private static String lastMethodName;
private static boolean debug = BuildConfig.DEBUG; public static boolean debug = false;
public static String TAG = "hzs"; public static String TAG = "hzs";
private LogUtil() { private LogUtil() {
} }
public static void setPrint(boolean isPrint){
debug = isPrint;
}
private static String printLog(String log) { private static String printLog(String log) {
//记录本地日志系统 //记录本地日志系统
......
...@@ -21,12 +21,18 @@ import android.webkit.ValueCallback; ...@@ -21,12 +21,18 @@ import android.webkit.ValueCallback;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.PopupWindow; import android.widget.PopupWindow;
import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.android.arouter.launcher.ARouter;
import com.tencent.smtt.export.external.interfaces.JsResult; import com.tencent.smtt.export.external.interfaces.JsResult;
import com.tencent.smtt.export.external.interfaces.SslError; import com.tencent.smtt.export.external.interfaces.SslError;
import com.tencent.smtt.export.external.interfaces.SslErrorHandler; import com.tencent.smtt.export.external.interfaces.SslErrorHandler;
import com.tencent.smtt.sdk.*; import com.tencent.smtt.sdk.CookieManager;
import com.tencent.smtt.sdk.CookieSyncManager;
import com.tencent.smtt.sdk.WebChromeClient;
import com.tencent.smtt.sdk.WebSettings;
import com.tencent.smtt.sdk.WebView;
import com.tencent.smtt.sdk.WebViewClient;
import com.umeng.socialize.UMShareAPI; import com.umeng.socialize.UMShareAPI;
import com.umeng.socialize.bean.SHARE_MEDIA; import com.umeng.socialize.bean.SHARE_MEDIA;
import com.ydl.ydl_router.manager.YDLRouterManager; import com.ydl.ydl_router.manager.YDLRouterManager;
...@@ -36,7 +42,13 @@ import com.ydl.ydlcommon.base.config.YDLConstants; ...@@ -36,7 +42,13 @@ import com.ydl.ydlcommon.base.config.YDLConstants;
import com.ydl.ydlcommon.bean.StatusBarOptions; import com.ydl.ydlcommon.bean.StatusBarOptions;
import com.ydl.ydlcommon.router.YdlCommonRouterManager; import com.ydl.ydlcommon.router.YdlCommonRouterManager;
import com.ydl.ydlcommon.ui.LogoLoadingView; import com.ydl.ydlcommon.ui.LogoLoadingView;
import com.ydl.ydlcommon.utils.*; import com.ydl.ydlcommon.utils.BuryPointUtils;
import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.NetWorkSpeedUtils;
import com.ydl.ydlcommon.utils.PopUtils;
import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.ydl.ydlcommon.utils.TemporaryUtils;
import com.ydl.ydlcommon.utils.URLUtils;
import com.ydl.ydlcommon.view.TitleBar; import com.ydl.ydlcommon.view.TitleBar;
import com.ydl.ydlcommon.view.dialog.YDLShareDialog; import com.ydl.ydlcommon.view.dialog.YDLShareDialog;
import com.yidianling.common.tools.RxDeviceTool; import com.yidianling.common.tools.RxDeviceTool;
...@@ -44,13 +56,7 @@ import com.yidianling.common.tools.RxImageTool; ...@@ -44,13 +56,7 @@ import com.yidianling.common.tools.RxImageTool;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.user.api.event.UserBindPhoneEvent; import com.yidianling.user.api.event.UserBindPhoneEvent;
import com.yidianling.user.api.event.UserLoginEvent; import com.yidianling.user.api.event.UserLoginEvent;
import de.greenrobot.event.EventBus;
import in.srain.cube.views.ptr.PtrDefaultHandler;
import in.srain.cube.views.ptr.PtrFrameLayout;
import in.srain.cube.views.ptr.PtrHandler;
import in.srain.cube.views.ptr.header.MaterialHeader;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.json.JSONException; import org.json.JSONException;
...@@ -60,6 +66,14 @@ import java.net.URI; ...@@ -60,6 +66,14 @@ import java.net.URI;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import de.greenrobot.event.EventBus;
import in.srain.cube.views.ptr.PtrDefaultHandler;
import in.srain.cube.views.ptr.PtrFrameLayout;
import in.srain.cube.views.ptr.PtrHandler;
import in.srain.cube.views.ptr.header.MaterialHeader;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import static android.view.View.GONE; import static android.view.View.GONE;
import static android.view.View.VISIBLE; import static android.view.View.VISIBLE;
...@@ -870,7 +884,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -870,7 +884,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
} }
private void onReceivedSslErrorHandle(SslErrorHandler handler) { private void onReceivedSslErrorHandle(SslErrorHandler handler) {
if (BuildConfig.DEBUG) { if (BaseApp.instance.getGlobalConfig().getAppDebug()) {
handler.proceed(); handler.proceed();
return; return;
} }
......
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