Commit 3f39fc79 by 徐健
parents 92cf271e 045e6811
...@@ -168,7 +168,9 @@ dependencies { ...@@ -168,7 +168,9 @@ dependencies {
if (rootProject.ext.dev_mode) { if (rootProject.ext.dev_mode) {
//开发模式 //开发模式
api project(':m-user') api project(':m-user')
api project(':m-fm') //api project(':m-fm')
api project(':m-tests')
api project(':m-consultant')
api (project(':ydl-platform')){ api (project(':ydl-platform')){
transitive = true transitive = true
} }
...@@ -189,7 +191,6 @@ dependencies { ...@@ -189,7 +191,6 @@ dependencies {
implementation rootProject.ext.dependencies["retrofit-url-manager"] implementation rootProject.ext.dependencies["retrofit-url-manager"]
kapt 'com.alibaba:arouter-compiler:1.2.2' kapt 'com.alibaba:arouter-compiler:1.2.2'
} }
//noTracePoint { //noTracePoint {
// outputModifyFile = false // outputModifyFile = false
// targetPackages = ['com.cxzapp.yidianling', // targetPackages = ['com.cxzapp.yidianling',
......
...@@ -22,6 +22,7 @@ import com.ydl.ydl_router.manager.YDLRouterParams ...@@ -22,6 +22,7 @@ import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.mvp.lce.BaseLceActivity import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import com.ydl.ydlcommon.router.IYDLRouterConstant import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.tests.home.TestHomeActivity
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
/** /**
...@@ -75,6 +76,9 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -75,6 +76,9 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bt_to_music.setOnClickListener { bt_to_music.setOnClickListener {
startActivity(Intent(this, MusicPlayActivity::class.java)) startActivity(Intent(this, MusicPlayActivity::class.java))
} }
bt_to_tests.setOnClickListener {
startActivity(Intent(this, TestHomeActivity::class.java))
}
bt_to_muse.setOnClickListener { bt_to_muse.setOnClickListener {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_MUSE, YDLRouterManager.router(IYDLRouterConstant.ROUTER_MUSE,
YDLRouterParams().putExtra(IYDLRouterConstant.MUSIC_URL, "http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3") YDLRouterParams().putExtra(IYDLRouterConstant.MUSIC_URL, "http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3")
......
...@@ -123,6 +123,20 @@ ...@@ -123,6 +123,20 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<Button
android:id="@+id/bt_to_tests"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:text="Jump to Tests" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<com.ydl.ydlcommon.mvp.lce.view.YDLStateView <com.ydl.ydlcommon.mvp.lce.view.YDLStateView
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
<item name="colorPrimary">@color/consultant_main_theme</item> <item name="colorPrimary">@color/consultant_main_theme</item>
<item name="colorPrimaryDark">@color/consultant_main_theme</item> <item name="colorPrimaryDark">@color/consultant_main_theme</item>
<item name="colorAccent">@color/consultant_main_theme</item> <item name="colorAccent">@color/consultant_main_theme</item>
</style> </style>
<style name="consultant_expert_service_popupwindow_filter_anim_style"> <style name="consultant_expert_service_popupwindow_filter_anim_style">
......
...@@ -371,9 +371,6 @@ public class CourseListFragment extends BaseLazyFragment implements PtrHandler, ...@@ -371,9 +371,6 @@ public class CourseListFragment extends BaseLazyFragment implements PtrHandler,
h5Params.setShareData(shareData); h5Params.setShareData(shareData);
} }
UMEventUtils.umEvent("列表页分类点击", "分类id", course.id + "");
UMEventUtils.umEvent("列表页分类点击", "分类名称", course.title);
NewH5Activity.start(getActivity(), h5Params); NewH5Activity.start(getActivity(), h5Params);
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.put("curriculum_name", course.title == null ? "" : course.title) .put("curriculum_name", course.title == null ? "" : course.title)
......
...@@ -335,8 +335,7 @@ public class MyCourseListFragment extends BaseLazyFragment implements PtrHandler ...@@ -335,8 +335,7 @@ public class MyCourseListFragment extends BaseLazyFragment implements PtrHandler
h5Params.setShareData(shareData); h5Params.setShareData(shareData);
} }
UMEventUtils.umEvent("列表页分类点击", "分类id", course.id + "");
UMEventUtils.umEvent("列表页分类点击", "分类名称", course.title);
NewH5Activity.start(getActivity(), h5Params); NewH5Activity.start(getActivity(), h5Params);
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
......
...@@ -101,8 +101,6 @@ public class CourseHeadPagerAdapter extends PagerAdapter { ...@@ -101,8 +101,6 @@ public class CourseHeadPagerAdapter extends PagerAdapter {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
UMEventUtils.umEvent("banner点击", "banner链接", banners.get(position).linkUrl);
ActionCountUtils.Companion.count(BIConstants.CourseHomeEvent.POSITION_COURSE_HOME_BANNER_CLICK, position + ""); ActionCountUtils.Companion.count(BIConstants.CourseHomeEvent.POSITION_COURSE_HOME_BANNER_CLICK, position + "");
LinkUrlRouterProtocol.jump(container.getContext(), banners.get(position).linkUrl); LinkUrlRouterProtocol.jump(container.getContext(), banners.get(position).linkUrl);
......
...@@ -67,7 +67,6 @@ class CourseTopicActivity : BaseActivity(), View.OnClickListener, SwipeRefreshLa ...@@ -67,7 +67,6 @@ class CourseTopicActivity : BaseActivity(), View.OnClickListener, SwipeRefreshLa
swl.setColorSchemeResources(R.color.google_green) swl.setColorSchemeResources(R.color.google_green)
swl.setOnRefreshListener(this) swl.setOnRefreshListener(this)
tv_left_menu.setOnClickListener { tv_left_menu.setOnClickListener {
UMEventUtils.umEvent("专题详情", "分享", "分享")
//分享 //分享
share() share()
......
...@@ -77,9 +77,6 @@ class CourseTopicAdapter(val context: Context, var mDatas: List<Course>) : Recyc ...@@ -77,9 +77,6 @@ class CourseTopicAdapter(val context: Context, var mDatas: List<Course>) : Recyc
(holder.getItemView() as CourseItemNewView).setBottomLineGone() (holder.getItemView() as CourseItemNewView).setBottomLineGone()
} }
holder.itemView.setOnClickListener { view -> holder.itemView.setOnClickListener { view ->
UMEventUtils.umEvent("列表点击", "专题id", course.id.toString())
UMEventUtils.umEvent("列表点击", "专题名称", course.title)
NewH5Activity.start(context, H5Params(CourseConstants.COURSE_DETAIL_H5 + course.id, null)) NewH5Activity.start(context, H5Params(CourseConstants.COURSE_DETAIL_H5 + course.id, null))
} }
} }
......
...@@ -161,8 +161,6 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler ...@@ -161,8 +161,6 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler
h5Params.shareData = shareData h5Params.shareData = shareData
} }
UMEventUtils.umEvent("列表页分类点击", "分类id", course.id.toString() + "")
UMEventUtils.umEvent("列表页分类点击", "分类名称", course.title)
NewH5Activity.start(this@CourseListContainerActivity, h5Params) NewH5Activity.start(this@CourseListContainerActivity, h5Params)
} }
......
...@@ -114,7 +114,6 @@ class CourseHomeFragment : BaseFragment(), ICourseHomeView, SwipeRefreshLayout.O ...@@ -114,7 +114,6 @@ class CourseHomeFragment : BaseFragment(), ICourseHomeView, SwipeRefreshLayout.O
tv_left_menu.setOnClickListener { tv_left_menu.setOnClickListener {
ActionCountUtils.count(BIConstants.CourseHomeEvent.POSITION_COURSE_HOME_MY_COUSE_CLICK) ActionCountUtils.count(BIConstants.CourseHomeEvent.POSITION_COURSE_HOME_MY_COUSE_CLICK)
UMEventUtils.umEvent("我的课程点击", "我的课程", "我的课程")
if (CourseIn.isLogin()) { if (CourseIn.isLogin()) {
MyCourseActivity.start(activity) MyCourseActivity.start(activity)
......
...@@ -134,9 +134,7 @@ public class MyCourseActivity extends BaseActivity { ...@@ -134,9 +134,7 @@ public class MyCourseActivity extends BaseActivity {
@Override @Override
public Fragment getItem(int position) { public Fragment getItem(int position) {
if (position == 0) { if (position == 0) {
UMEventUtils.umEvent("我的课程", "收藏", "收藏");
} else { } else {
UMEventUtils.umEvent("我的课程", "已购", "已购");
} }
return mFragments[position]; return mFragments[position];
......
...@@ -95,9 +95,6 @@ public class CategorySection extends Section { ...@@ -95,9 +95,6 @@ public class CategorySection extends Section {
ciView.setImage(category.image); ciView.setImage(category.image);
ciView.setOnClickListener(view -> { ciView.setOnClickListener(view -> {
UMEventUtils.umEvent("课程分类点击", "分类id", category.linkUrl);
UMEventUtils.umEvent("课程分类点击", "分类名称", category.title);
ActionCountUtils.Companion.count(BIConstants.CourseHomeEvent.POSITION_COURSE_HOME_CLASSIFICATION_CLICK, category.title); ActionCountUtils.Companion.count(BIConstants.CourseHomeEvent.POSITION_COURSE_HOME_CLASSIFICATION_CLICK, category.title);
if (!TextUtils.isEmpty(category.linkUrl)) { if (!TextUtils.isEmpty(category.linkUrl)) {
LinkUrlRouterProtocol.jump(itemView.getContext(), category.linkUrl); LinkUrlRouterProtocol.jump(itemView.getContext(), category.linkUrl);
......
...@@ -45,7 +45,6 @@ public class ClassifiedCourseSection extends Section { ...@@ -45,7 +45,6 @@ public class ClassifiedCourseSection extends Section {
if (holder instanceof FooterMoreViewHolder) { if (holder instanceof FooterMoreViewHolder) {
((FooterMoreViewHolder) holder).titleView.setText(data.footer.title); ((FooterMoreViewHolder) holder).titleView.setText(data.footer.title);
((FooterMoreViewHolder) holder).linearLayout.setOnClickListener(view -> { ((FooterMoreViewHolder) holder).linearLayout.setOnClickListener(view -> {
UMEventUtils.umEvent(data.head.title, "更多课程", "更多课程");
LinkUrlRouterProtocol.jump(context, data.footer.linkUrl); LinkUrlRouterProtocol.jump(context, data.footer.linkUrl);
if (!TextUtils.isEmpty(data.head.title)) { if (!TextUtils.isEmpty(data.head.title)) {
...@@ -71,7 +70,6 @@ public class ClassifiedCourseSection extends Section { ...@@ -71,7 +70,6 @@ public class ClassifiedCourseSection extends Section {
realHolder.courseItemNewView.setData(courseBean); realHolder.courseItemNewView.setData(courseBean);
holder.itemView.setOnClickListener(view -> { holder.itemView.setOnClickListener(view -> {
UMEventUtils.umEvent(data.head.title, data.head.title + "链接", course.linkUrl);
LinkUrlRouterProtocol.jump(context, courseBean.linkUrl); LinkUrlRouterProtocol.jump(context, courseBean.linkUrl);
......
...@@ -61,7 +61,6 @@ public class QulityCourseSection extends Section { ...@@ -61,7 +61,6 @@ public class QulityCourseSection extends Section {
if (holder instanceof FooterMoreViewHolder) { if (holder instanceof FooterMoreViewHolder) {
((FooterMoreViewHolder) holder).titleView.setText(data.footer.title); ((FooterMoreViewHolder) holder).titleView.setText(data.footer.title);
((FooterMoreViewHolder) holder).linearLayout.setOnClickListener(v -> { ((FooterMoreViewHolder) holder).linearLayout.setOnClickListener(v -> {
UMEventUtils.umEvent("更多课程", "更多课程", "更多课程");
LinkUrlRouterProtocol.jump(context, data.footer.linkUrl + "?childId=" + (type + 1)); LinkUrlRouterProtocol.jump(context, data.footer.linkUrl + "?childId=" + (type + 1));
...@@ -94,7 +93,6 @@ public class QulityCourseSection extends Section { ...@@ -94,7 +93,6 @@ public class QulityCourseSection extends Section {
realHolder.courseItemNewView.setData(courseBean); realHolder.courseItemNewView.setData(courseBean);
holder.itemView.setOnClickListener(view -> { holder.itemView.setOnClickListener(view -> {
UMEventUtils.umEvent("精品课程", "精品课程链接", courseBean.linkUrl);
LinkUrlRouterProtocol.jump(context, courseBean.linkUrl); LinkUrlRouterProtocol.jump(context, courseBean.linkUrl);
...@@ -216,7 +214,6 @@ public class QulityCourseSection extends Section { ...@@ -216,7 +214,6 @@ public class QulityCourseSection extends Section {
tv_tab2 = itemView.findViewById(R.id.tv_tab2); tv_tab2 = itemView.findViewById(R.id.tv_tab2);
iv_tab2 = itemView.findViewById(R.id.iv_tab2); iv_tab2 = itemView.findViewById(R.id.iv_tab2);
itemView.findViewById(R.id.ll_tab1).setOnClickListener(v -> { itemView.findViewById(R.id.ll_tab1).setOnClickListener(v -> {
UMEventUtils.umEvent("精品课程", "免费课程", "免费课程");
tv_tab1.setTextColor(ContextCompat.getColor(itemView.getContext(), R.color.green_34cd65)); tv_tab1.setTextColor(ContextCompat.getColor(itemView.getContext(), R.color.green_34cd65));
iv_tab1.setVisibility(View.VISIBLE); iv_tab1.setVisibility(View.VISIBLE);
...@@ -225,7 +222,6 @@ public class QulityCourseSection extends Section { ...@@ -225,7 +222,6 @@ public class QulityCourseSection extends Section {
section.setType(FREE); section.setType(FREE);
}); });
itemView.findViewById(R.id.ll_tab2).setOnClickListener(v -> { itemView.findViewById(R.id.ll_tab2).setOnClickListener(v -> {
UMEventUtils.umEvent("精品课程", "付费课程", "付费课程");
tv_tab2.setTextColor(ContextCompat.getColor(itemView.getContext(), R.color.green_34cd65)); tv_tab2.setTextColor(ContextCompat.getColor(itemView.getContext(), R.color.green_34cd65));
iv_tab2.setVisibility(View.VISIBLE); iv_tab2.setVisibility(View.VISIBLE);
......
...@@ -49,7 +49,6 @@ public class TopicsCoursesSection extends Section { ...@@ -49,7 +49,6 @@ public class TopicsCoursesSection extends Section {
((SingleTitleHeaderViewHolder) holder).subTitleView.setVisibility(View.VISIBLE); ((SingleTitleHeaderViewHolder) holder).subTitleView.setVisibility(View.VISIBLE);
((SingleTitleHeaderViewHolder) holder).subTitleView.setText(data.head.subTitle); ((SingleTitleHeaderViewHolder) holder).subTitleView.setText(data.head.subTitle);
((SingleTitleHeaderViewHolder) holder).subTitleView.setOnClickListener(v -> { ((SingleTitleHeaderViewHolder) holder).subTitleView.setOnClickListener(v -> {
UMEventUtils.umEvent("专题课程", "更多点击", "更多点击");
if (null != mContext) { if (null != mContext) {
CourseLinkUrl.Companion.jump(mContext, data.head.subLinkUrl); CourseLinkUrl.Companion.jump(mContext, data.head.subLinkUrl);
} }
...@@ -155,7 +154,6 @@ public class TopicsCoursesSection extends Section { ...@@ -155,7 +154,6 @@ public class TopicsCoursesSection extends Section {
public void onBindViewHolder(BaseViewHolder holder, int position) { public void onBindViewHolder(BaseViewHolder holder, int position) {
holder.setImageWithUrl(R.id.img, data.get(position).image); holder.setImageWithUrl(R.id.img, data.get(position).image);
holder.setOnClickListener(R.id.img, view -> { holder.setOnClickListener(R.id.img, view -> {
UMEventUtils.umEvent("专题课程", "专题链接", data.get(position).linkUrl);
LinkUrlRouterProtocol.jump(mContext, data.get(position).linkUrl); LinkUrlRouterProtocol.jump(mContext, data.get(position).linkUrl);
......
...@@ -125,11 +125,9 @@ class CoursePlayActivity : BaseActivity() { ...@@ -125,11 +125,9 @@ class CoursePlayActivity : BaseActivity() {
fun initView() { fun initView() {
iv_back.setOnClickListener { iv_back.setOnClickListener {
UMEventUtils.umEvent("返回点击", "返回", "返回")
onBackPressed() onBackPressed()
} }
iv_share.setOnClickListener { iv_share.setOnClickListener {
UMEventUtils.umEvent("分享点击", "分享", "分享")
//分享 //分享
share(courPlayBean?.courseExtra?.shareData) share(courPlayBean?.courseExtra?.shareData)
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<activity <activity
android:name=".list.view.TestCategoryListActivity" android:name=".list.view.TestCategoryListActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/tests_NoTitleTheme"
/> />
<activity <activity
android:name=".SelectConversationActivity" android:name=".SelectConversationActivity"
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<activity <activity
android:name=".search.TestSearchActivity" android:name=".search.TestSearchActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/tests_NoTitleTheme"
/> />
<!--测评首页--> <!--测评首页-->
<activity <activity
......
...@@ -10,10 +10,12 @@ import com.alibaba.android.arouter.facade.annotation.Route ...@@ -10,10 +10,12 @@ import com.alibaba.android.arouter.facade.annotation.Route
import com.google.gson.Gson import com.google.gson.Gson
import com.google.gson.reflect.TypeToken import com.google.gson.reflect.TypeToken
import com.ydl.ydlcommon.base.BaseMvpActivity import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.* import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.YDLAsyncUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.tests.R import com.yidianling.tests.R
import com.yidianling.tests.TestsBIConstants
import com.yidianling.tests.home.adapter.AdapterWrapper import com.yidianling.tests.home.adapter.AdapterWrapper
import com.yidianling.tests.home.adapter.TestHomeAdapter import com.yidianling.tests.home.adapter.TestHomeAdapter
import com.yidianling.tests.home.bean.TestHomeDataBean import com.yidianling.tests.home.bean.TestHomeDataBean
...@@ -223,7 +225,6 @@ class TestHomeActivity : BaseMvpActivity<ITestHomeContract.View,ITestHomeContrac ...@@ -223,7 +225,6 @@ class TestHomeActivity : BaseMvpActivity<ITestHomeContract.View,ITestHomeContrac
} }
override fun dailyChange() { override fun dailyChange() {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_DAILY_CHANGE_CLICK, "", "")
//埋点 //埋点
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.burryPoint("ceping_change") .burryPoint("ceping_change")
......
...@@ -10,9 +10,7 @@ import com.ydl.ydl_router.manager.YDLRouterParams ...@@ -10,9 +10,7 @@ import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.router.IYDLRouterConstant import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.UMEventUtils
import com.yidianling.router.RouterManager import com.yidianling.router.RouterManager
import com.yidianling.tests.TestsBIConstants
import com.yidianling.tests.list.view.TestCategoryListActivity import com.yidianling.tests.list.view.TestCategoryListActivity
import com.yidianling.tests.router.TestsIn import com.yidianling.tests.router.TestsIn
import com.yidianling.tests.search.TestSearchActivity import com.yidianling.tests.search.TestSearchActivity
...@@ -36,7 +34,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent { ...@@ -36,7 +34,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent {
* 跳转我的界面 * 跳转我的界面
*/ */
override fun jumpMine() { override fun jumpMine() {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_MINE_CLICK, "", "")
// TestHomeUtils.buildJumpMine(context!!) // TestHomeUtils.buildJumpMine(context!!)
if (!TestsIn.isLogin()) { if (!TestsIn.isLogin()) {
...@@ -53,8 +50,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent { ...@@ -53,8 +50,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent {
* 跳转搜索界面 * 跳转搜索界面
*/ */
override fun jumpSearch() { override fun jumpSearch() {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_SEARCH_CLICK, "", "")
TestSearchActivity.start(context!!) TestSearchActivity.start(context!!)
} }
...@@ -62,9 +57,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent { ...@@ -62,9 +57,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent {
* banner点击事件 * banner点击事件
*/ */
override fun bannerClick(linkUrl: String?, position: Int, title: String?) { override fun bannerClick(linkUrl: String?, position: Int, title: String?) {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_BANNER_CLICK, TestsBIConstants.PROPERTY_TEST_HOME_BANNER_URL, linkUrl)
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_BANNER_CLICK, TestsBIConstants.PROPERTY_TEST_HOME_BANNER_NAME, title)
//埋点 //埋点
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.put("position", position) .put("position", position)
...@@ -77,9 +69,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent { ...@@ -77,9 +69,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent {
* 测评分类点击事件 * 测评分类点击事件
*/ */
override fun categoryClick(tabName: String?, position: Int, title: String?, id: String?) { override fun categoryClick(tabName: String?, position: Int, title: String?, id: String?) {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_CATEGORY_CLICK, TestsBIConstants.PROPERTY_TEST_HOME_CATEGORY_NAME, title)
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_CATEGORY_CLICK, TestsBIConstants.PROPERTY_TEST_HOME_CATEGORY_ID, id)
//埋点 //埋点
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.put("position", position) .put("position", position)
...@@ -93,7 +82,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent { ...@@ -93,7 +82,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent {
* 实时测试状态点击事件 * 实时测试状态点击事件
*/ */
override fun realTestClick(linkUrl: String?, title: String?) { override fun realTestClick(linkUrl: String?, title: String?) {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_LOOP_CLICK, TestsBIConstants.PROPERTY_TEST_HOME_LOOP_NAME, title)
//埋点 //埋点
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.put("title", title) .put("title", title)
...@@ -105,9 +93,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent { ...@@ -105,9 +93,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent {
* 每日精选点击事件 * 每日精选点击事件
*/ */
override fun dailyClick(linkUrl: String?, position: Int, title: String?) { override fun dailyClick(linkUrl: String?, position: Int, title: String?) {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_DAILY_CLICK, TestsBIConstants.PROPERTY_TEST_HOME_DAILY_NAME, title)
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_DAILY_CLICK, TestsBIConstants.PROPERTY_TEST_HOME_DAILY_URL, title)
//埋点 //埋点
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.put("position", position) .put("position", position)
...@@ -120,9 +105,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent { ...@@ -120,9 +105,6 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent {
* 热门推荐点击事件 * 热门推荐点击事件
*/ */
override fun recommendedClick(linkUrl: String?, position: Int, title: String?) { override fun recommendedClick(linkUrl: String?, position: Int, title: String?) {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_HOT_CLICK, TestsBIConstants.PROPERTY_TEST_HOME_HOT_URL, linkUrl)
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_HOME_HOT_CLICK, TestsBIConstants.PROPERTY_TEST_HOME_HOT_NAME, title)
//埋点 //埋点
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.put("position", position) .put("position", position)
......
...@@ -10,7 +10,7 @@ import android.view.View ...@@ -10,7 +10,7 @@ import android.view.View
import android.widget.TextView import android.widget.TextView
import com.ydl.ydlcommon.data.http.RxUtils import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.router.YdlCommonRouterManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.MainUtils import com.ydl.ydlcommon.utils.MainUtils
import com.ydl.ydlcommon.utils.SharedPreferencesEditor import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
...@@ -256,8 +256,7 @@ class TestHomeUtils { ...@@ -256,8 +256,7 @@ class TestHomeUtils {
* 只有当和上一次优惠券金额不一致时才会发事件通知更新 * 只有当和上一次优惠券金额不一致时才会发事件通知更新
*/ */
fun updateCouponMoney(){ fun updateCouponMoney(){
val loginBean = YdlCommonRouterManager.getYdlCommonRoute().getUserInfo() var userId = ModularServiceManager.getPlatformUserService()?.getUser()?.userId?: "";
var userId = loginBean?.userId ?: "";
TestRetrofitApi.getTestRetrofitApi() TestRetrofitApi.getTestRetrofitApi()
.fetchMaxCoupon(userId) .fetchMaxCoupon(userId)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
......
...@@ -108,7 +108,6 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA ...@@ -108,7 +108,6 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
tabName = intent.getStringExtra(EXTRA_TABNAME) tabName = intent.getStringExtra(EXTRA_TABNAME)
} }
tv_test_search.setOnClickListener { tv_test_search.setOnClickListener {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_LIST_SEARCH_CLICK, "", "")
TestSearchActivity.start(this) TestSearchActivity.start(this)
} }
iv_test_list_back.setOnClickListener { iv_test_list_back.setOnClickListener {
...@@ -132,7 +131,6 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA ...@@ -132,7 +131,6 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
override fun onPageSelected(position: Int) { override fun onPageSelected(position: Int) {
currentPageIndex = position currentPageIndex = position
setConditionContent(); setConditionContent();
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_LIST_CATEGORY_CLICK, TestsBIConstants.PROPERTY_TEST_LIST_CATEGORY_NAME, testCategory?.get(position)?.name)
click_category() click_category()
......
...@@ -10,13 +10,11 @@ import com.alibaba.android.arouter.facade.annotation.Route ...@@ -10,13 +10,11 @@ import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.ydlcommon.base.BaseMvpActivity import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.PopUtils import com.ydl.ydlcommon.utils.PopUtils
import com.ydl.ydlcommon.utils.UMEventUtils
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils import com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.tests.R import com.yidianling.tests.R
import com.yidianling.tests.TestsBIConstants
import com.yidianling.tests.list.model.bean.TestCategory import com.yidianling.tests.list.model.bean.TestCategory
import com.yidianling.tests.list.model.bean.TestsRedPacketBean import com.yidianling.tests.list.model.bean.TestsRedPacketBean
import com.yidianling.tests.list.presenter.TestListActivityPresenter import com.yidianling.tests.list.presenter.TestListActivityPresenter
...@@ -40,11 +38,9 @@ class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityP ...@@ -40,11 +38,9 @@ class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityP
tabName = intent.getStringExtra(EXTRA_TABNAME) tabName = intent.getStringExtra(EXTRA_TABNAME)
} }
titleBar.setOnRightTextClick { _, _ -> titleBar.setOnRightTextClick { _, _ ->
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_LIST_SEARCH_CLICK, "", "")
TestSearchActivity.start(this) TestSearchActivity.start(this)
} }
titleBar.setRightImageListener { titleBar.setRightImageListener {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_LIST_MORE_CLICK, "", "")
popupWindow = PopUtils.showMoreItem(mContext, popupWindow = PopUtils.showMoreItem(mContext,
titleBar.rootView, titleBar.rootView,
0, 0,
...@@ -57,8 +53,6 @@ class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityP ...@@ -57,8 +53,6 @@ class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityP
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {} override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
override fun onPageSelected(position: Int) { override fun onPageSelected(position: Int) {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_LIST_CATEGORY_CLICK, TestsBIConstants.PROPERTY_TEST_LIST_CATEGORY_NAME, testCategorys?.get(position)?.name)
click_category() click_category()
LogUtil.d("page selected: " + testCategorys?.get(position)?.name) LogUtil.d("page selected: " + testCategorys?.get(position)?.name)
......
...@@ -144,7 +144,6 @@ class TestListFragment : BaseFragment(), MyBaseAdapter.OnItemClickListener<Test> ...@@ -144,7 +144,6 @@ class TestListFragment : BaseFragment(), MyBaseAdapter.OnItemClickListener<Test>
} }
override fun onItemClickListener(v: View?, position: Int, data: Test?) { override fun onItemClickListener(v: View?, position: Int, data: Test?) {
UMEventUtils.umEvent(TestsBIConstants.EVENT_TEST_LIST_TEST_TITLE_CLICK, TestsBIConstants.PROPERTY_TEST_LIST_TEST_NAME, data?.name)
BuryPointUtils.getInstance().createMap() BuryPointUtils.getInstance().createMap()
.put("test_id", data?.id.toString()) .put("test_id", data?.id.toString())
......
...@@ -6,14 +6,14 @@ import com.ydl.ydl_router.manager.YDLRouterManager ...@@ -6,14 +6,14 @@ import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.router.IYDLRouterConstant import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.tests.api.service.ITestsApiSerivice import com.yidianling.tests.api.service.ITestsApiService
/** /**
* Created by haorui on 2019-10-31 . * Created by haorui on 2019-10-31 .
* Des: * Des:
*/ */
@Route(path = "/tests/TestsApiService") @Route(path = "/tests/TestsApiService")
public class TestsApiServiceImp : ITestsApiSerivice { public class TestsApiServiceImp : ITestsApiService {
override fun init(context: Context?) { override fun init(context: Context?) {
} }
......
...@@ -2,7 +2,7 @@ package com.yidianling.tests.api.service ...@@ -2,7 +2,7 @@ package com.yidianling.tests.api.service
import com.alibaba.android.arouter.facade.template.IProvider import com.alibaba.android.arouter.facade.template.IProvider
interface ITestsApiSerivice : IProvider { interface ITestsApiService : IProvider {
fun testDetailH5(testId: String) fun testDetailH5(testId: String)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<com.ydl.ydlcommon.view.TitleBar <com.ydl.ydlcommon.view.TitleBar
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/platform_title_bar_height" android:layout_height="@dimen/platform_title_bar_height"
app:pa_left_start_icon="@drawable/platform_toolbar_back" app:pa_left_start_icon_color="@color/tests_main_theme"
app:pa_title_text="最新联系人" /> app:pa_title_text="最新联系人" />
<RelativeLayout <RelativeLayout
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/platform_title_bar_height" android:layout_height="@dimen/platform_title_bar_height"
app:pa_bm_line_color="@color/transparent" app:pa_bm_line_color="@color/transparent"
app:pa_left_start_icon="@drawable/platform_toolbar_back" app:pa_left_start_icon_color="@color/tests_main_theme"
app:pa_right_iv="@drawable/platform_more12x" app:pa_right_iv="@drawable/platform_more12x"
app:pa_right_start_icon="@drawable/tests_icon_navsearch_green" app:pa_right_start_icon="@drawable/tests_icon_navsearch_green"
app:pa_title_text="心理测试" /> app:pa_title_text="心理测试" />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout" android:id="@+id/swipe_refresh_layout"
...@@ -19,7 +20,10 @@ ...@@ -19,7 +20,10 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:visibility="gone" /> android:visibility="gone" />
<include layout="@layout/tests_testhome_bar" /> <include layout="@layout/tests_testhome_bar" />
</FrameLayout> </FrameLayout>
</android.support.v4.widget.SwipeRefreshLayout> </android.support.v4.widget.SwipeRefreshLayout>
</FrameLayout> </FrameLayout>
...@@ -19,4 +19,15 @@ ...@@ -19,4 +19,15 @@
<item name="android:paddingLeft">15dp</item> <item name="android:paddingLeft">15dp</item>
<item name="android:paddingRight">15dp</item> <item name="android:paddingRight">15dp</item>
</style> </style>
<style name="tests_NoTitleTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:windowActionBar">false</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/tests_main_theme</item>
<item name="colorPrimaryDark">@color/tests_main_theme</item>
<item name="colorAccent">@color/tests_main_theme</item>
</style>
</resources> </resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--主题色-->
<color name="tests_main_theme">#fdbd00</color>
<!--主题浅色-->
<color name="tests_main_theme_light">#FFEC8C</color>
<!--主题亮色-->
<color name="tests_main_theme_bright">#fffae0</color>
<!--确认按钮背景颜色-->
<color name="tests_confirm_bg_color">#FFDD33</color>
<!--确认按钮字体颜色-->
<color name="tests_confirm_text_color">#242424</color>
<!--确认按钮提示字体颜色-->
<color name="tests_confirm_text_hint_color">#666666</color>
<!--筛选条件选择框字体颜色-->
<color name="tests_filter_content_text_color_en">#242424</color>
<color name="tests_filter_content_text_color_un">#555555</color>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--主题色-->
<color name="tests_main_theme">#1da1f2</color>
<!--主题浅色-->
<color name="tests_main_theme_light">#60BDF5</color>
<!--主题亮色-->
<color name="tests_main_theme_bright">#E8F6FF</color>
<!--确认按钮背景颜色-->
<color name="tests_confirm_bg_color">#1da1f2</color>
<!--确认按钮颜色-->
<color name="tests_confirm_text_color">#ffffff</color>
<!--确认提示颜色-->
<color name="tests_confirm_text_hint_color">#60ffffff</color>
<!--筛选条件选择框字体颜色-->
<color name="tests_filter_content_text_color_en">#1da1f2</color>
<color name="tests_filter_content_text_color_un">#242424</color>
</resources>
include ':app',":router", ':ydl-net', ':ydl-utils', ':ydl-platform', ':ydl-webview', ':ydl-media',":m-user", ':m-consultant', ':m-muse', ':m-fm' include ':app',":router", ':ydl-net', ':ydl-utils', ':ydl-platform', ':ydl-webview', ':ydl-media',":m-user", ':m-consultant', ':m-muse', ':m-fm', ':m-tests'
\ No newline at end of file \ No newline at end of file
package com.ydl.ydlcommon.utils; package com.ydl.ydlcommon.utils;
import android.content.Context; import android.content.Context;
import android.util.Log;
import com.umeng.analytics.MobclickAgent;
import com.umeng.analytics.dplus.UMADplus;
import com.ydl.ydl_router.provider.YDLRouterBurryPointProvider;
import com.yidianling.common.tools.LogUtil;
import java.util.HashMap; import com.ydl.ydl_router.provider.YDLRouterBurryPointProvider;
/** /**
* Created by Wi1ls on 2016/11/11; * Created by Wi1ls on 2016/11/11;
......
...@@ -2,7 +2,11 @@ package com.ydl.ydlcommon.view; ...@@ -2,7 +2,11 @@ package com.ydl.ydlcommon.view;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray; import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.AttributeSet; import android.util.AttributeSet;
...@@ -13,8 +17,9 @@ import android.widget.ImageView; ...@@ -13,8 +17,9 @@ import android.widget.ImageView;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.yidianling.common.tools.RxImageTool;
import com.ydl.ydlcommon.R; import com.ydl.ydlcommon.R;
import com.ydl.ydlcommon.utils.bitmap.BitmapUtils;
import com.yidianling.common.tools.RxImageTool;
/** /**
...@@ -31,6 +36,8 @@ public class TitleBar extends RelativeLayout { ...@@ -31,6 +36,8 @@ public class TitleBar extends RelativeLayout {
int mTextColor, mSideTextColor; int mTextColor, mSideTextColor;
//底部线颜色 //底部线颜色
int buttom_color; int buttom_color;
//左侧图标颜色
int mLeftStartIconColor ;
//文字内容 //文字内容
String mLeftText, mTitle, mRightText; String mLeftText, mTitle, mRightText;
...@@ -206,6 +213,10 @@ public class TitleBar extends RelativeLayout { ...@@ -206,6 +213,10 @@ public class TitleBar extends RelativeLayout {
mSideTextColor = a.getColor(R.styleable.Platform_TitleBar_pa_side_text_color, 0xff3c3c3c); mSideTextColor = a.getColor(R.styleable.Platform_TitleBar_pa_side_text_color, 0xff3c3c3c);
//底部线颜色 //底部线颜色
buttom_color = a.getColor(R.styleable.Platform_TitleBar_pa_bm_line_color, getResources().getColor(R.color.platform_divide_color)); buttom_color = a.getColor(R.styleable.Platform_TitleBar_pa_bm_line_color, getResources().getColor(R.color.platform_divide_color));
//左侧图标颜色
mLeftStartIconColor = a.getColor(R.styleable.Platform_TitleBar_pa_left_start_icon_color, 0xffffff);
a.recycle(); a.recycle();
setGravity(Gravity.CENTER_VERTICAL); setGravity(Gravity.CENTER_VERTICAL);
} }
...@@ -229,11 +240,10 @@ public class TitleBar extends RelativeLayout { ...@@ -229,11 +240,10 @@ public class TitleBar extends RelativeLayout {
} }
void setupView() { void setupView() {
//左侧部分 //左侧部分
tv_left_text.setText(mLeftText); tv_left_text.setText(mLeftText);
tv_left_text.setTextColor(mSideTextColor); tv_left_text.setTextColor(mSideTextColor);
tv_left_text.setCompoundDrawablesWithIntrinsicBounds(mLeftStartIcon, null, mLeftEndIcon, null); tv_left_text.setCompoundDrawablesWithIntrinsicBounds(getLeftStartIcon(), null, mLeftEndIcon, null);
//中间部分 //中间部分
tv_center_title.setText(mTitle); tv_center_title.setText(mTitle);
tv_center_title.setTextColor(mTextColor); tv_center_title.setTextColor(mTextColor);
...@@ -252,6 +262,18 @@ public class TitleBar extends RelativeLayout { ...@@ -252,6 +262,18 @@ public class TitleBar extends RelativeLayout {
} }
Drawable getLeftStartIcon(){
if(mLeftStartIconColor != 0xffffff && mLeftStartIcon == null) {
//动态设置返回图标颜色
Resources resources = this.getResources();
Bitmap bmp = BitmapFactory.decodeResource(resources, R.drawable.platform_toolbar_back);
Bitmap colorBmp = BitmapUtils.tintBitmap(bmp, mLeftStartIconColor);
return new BitmapDrawable(resources, colorBmp);
}else {
return mLeftStartIcon;
}
}
public void setDivideHidden(boolean hide) { public void setDivideHidden(boolean hide) {
if (hide) { if (hide) {
iv_title_divide.setVisibility(View.GONE); iv_title_divide.setVisibility(View.GONE);
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<attr name="pa_side_text_color" format="color" /> <attr name="pa_side_text_color" format="color" />
<attr name="pa_title_bar_text_color" format="color|reference" /> <attr name="pa_title_bar_text_color" format="color|reference" />
<attr name="pa_bm_line_color" format="color" /> <attr name="pa_bm_line_color" format="color" />
<attr name="pa_right_iv" format="reference" /> <attr name="pa_right_iv" format="reference" />
<attr name="pa_left_start_icon_color" format="color" />
</declare-styleable> </declare-styleable>
<attr name="pa_left_text" format="string" /> <attr name="pa_left_text" format="string" />
<attr name="pa_right_text" format="string" /> <attr name="pa_right_text" format="string" />
......
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