Commit 988f163a by fengquan

Merge remote-tracking branch 'origin/d/v4.3.99' into feat/fq/fq_evaluation_4.3.99

# Conflicts:
#	config.gradle
parents ce2a1fba ccee666b
......@@ -8,12 +8,12 @@ ext {
"m-confide" : "0.0.50.45",
"m-consultant" : "0.0.60.73",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.64",
"m-user" : "0.0.62.71",
"m-home" : "0.0.23.98",
"m-im" : "0.0.21.66",
"m-dynamic" : "0.0.7.79",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.81",
"m-muse" : "0.0.28.84",
"m-tests" : "0.0.24.22",
"m-course" : "0.0.43.39",
......@@ -26,7 +26,7 @@ ext {
"ydl-platform" : "0.0.41.50",
//第二步 若干
"ydl-webview" : "0.0.38.94",
"ydl-webview" : "0.0.38.99",
"ydl-media" : "0.0.21.52",
"ydl-pay" : "0.0.18.21",
"m-audioim" : "0.0.49.30.23",
......@@ -94,17 +94,14 @@ ext {
"m-confide" : "0.0.50.45",
"m-consultant" : "0.0.60.73",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.64",
"m-user" : "0.0.62.71",
"m-home" : "0.0.23.98",
"m-im" : "0.0.21.66",
"m-dynamic" : "0.0.7.79",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.81",
"m-muse" : "0.0.28.84",
"m-tests" : "0.0.24.22",
"m-course" : "0.0.43.39",
//-------------- 功能组件 --------------
//mdt 组件
......@@ -112,8 +109,9 @@ ext {
//第一步
"ydl-platform" : "0.0.41.50",
//第二步 若干
"ydl-webview" : "0.0.38.94",
"ydl-webview" : "0.0.38.99",
"ydl-media" : "0.0.21.52",
"ydl-pay" : "0.0.18.21",
"m-audioim" : "0.0.49.30.23",
......
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="29dp"
android:height="29dp"
android:viewportWidth="29"
android:viewportHeight="29">
<path
android:pathData="M14.5,14.5m-14.5,0a14.5,14.5 0,1 1,29 0a14.5,14.5 0,1 1,-29 0"
android:strokeWidth="1"
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
<path
android:pathData="M20.2426,8.6932C18.9653,7.6331 17.3222,7.1176 15.6208,7.2388C15.3959,7.258 15.2304,7.4463 15.2496,7.6712C15.2559,7.7747 15.3054,7.8742 15.3831,7.951C15.4616,8.0192 15.5692,8.0562 15.6727,8.05C17.1662,7.9498 18.6111,8.3931 19.7304,9.3251C20.8506,10.2486 21.5134,11.5269 21.6149,12.9262C21.6283,13.1248 21.7836,13.2783 21.9786,13.2988C22.0041,13.3015 22.021,13.3032 22.0474,13.2974C22.2722,13.2782 22.4378,13.0899 22.4185,12.865C22.3072,11.2332 21.5368,9.755 20.2426,8.6932Z"
android:strokeWidth="1"
android:fillColor="#5ECEA9"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
<path
android:pathData="M15.6922,10.0665C16.5646,10.0038 17.4031,10.2634 18.0577,10.8037C18.7048,11.3346 19.0896,12.0779 19.15,12.89C19.1634,13.0886 19.3187,13.2421 19.5137,13.2626C19.5391,13.2652 19.5561,13.267 19.5824,13.2612C19.8073,13.242 19.9728,13.0537 19.9536,12.8288C19.8825,11.7927 19.3902,10.8494 18.569,10.1802C17.7563,9.5119 16.7112,9.1792 15.6403,9.2552C15.4154,9.2745 15.2499,9.4628 15.2691,9.6877C15.2799,9.9117 15.4673,10.0857 15.6922,10.0665Z"
android:strokeWidth="1"
android:fillColor="#5ECEA9"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
<path
android:pathData="M15.1838,11.9674C15.2624,12.0357 15.3699,12.0727 15.4734,12.0664C15.9138,12.0356 16.3373,12.1658 16.6685,12.4406C16.992,12.7061 17.1844,13.0778 17.2103,13.4834C17.2238,13.6819 17.3791,13.8354 17.5656,13.855C17.591,13.8577 17.6165,13.8604 17.6343,13.8537C17.8592,13.8344 18.0247,13.6461 18.0055,13.4212C17.9603,12.7907 17.6604,12.2192 17.1628,11.8154C16.6737,11.4125 16.0436,11.2092 15.3952,11.261C15.1703,11.2803 15.0048,11.4686 15.024,11.6935C15.0557,11.7997 15.1053,11.8992 15.1838,11.9674Z"
android:strokeWidth="1"
android:fillColor="#5ECEA9"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
<path
android:pathData="M19.0824,17.506C18.6476,17.1991 18.1958,16.9178 17.7951,16.7132C17.1472,16.3722 16.8573,16.3295 16.7039,16.3295C16.3714,16.3295 16.0816,16.5 15.8514,16.841C15.7065,17.0542 15.5956,17.3014 15.4933,17.5401C15.4422,17.6509 15.3569,17.864 15.2887,17.9749C15.1609,17.9322 14.854,17.8044 14.3084,17.4293C13.7713,17.0627 13.1831,16.5853 12.7398,16.1505C12.305,15.7072 11.8276,15.119 11.461,14.5734C11.0859,14.0193 10.958,13.7209 10.9154,13.593C11.0262,13.5248 11.2308,13.4395 11.3587,13.3799C11.5974,13.2776 11.8446,13.1667 12.0492,13.0218C12.3817,12.7916 12.5522,12.5018 12.5522,12.1693C12.5522,12.0073 12.5096,11.726 12.1686,11.0696C11.964,10.6774 11.6826,10.2171 11.3757,9.7823C11.1456,9.4584 10.8046,8.9895 10.438,8.6144C10.0117,8.1711 9.6878,7.975 9.3724,7.975C8.6477,7.975 7.8549,8.9383 7.5395,9.3475C7.2411,9.7653 6.525,10.8224 6.525,11.8283C6.525,12.7661 7.1388,13.9681 7.6588,14.8121C8.3494,15.9289 9.2956,17.1394 10.3357,18.205L10.6767,18.546C11.7423,19.5861 12.9444,20.5409 14.0611,21.2314C14.9051,21.7515 16.0986,22.3653 17.0364,22.3653C18.0423,22.3653 19.0994,21.6492 19.5086,21.3423C19.9178,21.0354 20.8812,20.234 20.8812,19.5094C20.8812,19.1939 20.6851,18.8615 20.2418,18.4352C19.8752,18.0857 19.4063,17.7362 19.0824,17.506Z"
android:strokeWidth="1"
android:fillColor="#5ECEA9"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
<path
android:pathData="M10.3186,12.7405C10.0032,12.9536 9.8498,13.2094 9.8583,13.5163C9.8583,13.6527 9.8753,14.0704 10.6085,15.1531C11.0092,15.7413 11.5292,16.3892 12.0151,16.8837C12.5011,17.3525 13.1404,17.8811 13.7287,18.2818C14.8113,19.0234 15.2291,19.032 15.3825,19.032C15.6809,19.032 15.9366,18.87 16.1412,18.5631C16.2606,18.3841 16.3629,18.1539 16.4481,17.9408C16.5163,17.7788 16.5931,17.6083 16.6613,17.4889C16.6954,17.4293 16.7209,17.3952 16.738,17.3781C16.8147,17.3952 16.9852,17.4548 17.3092,17.6253C17.6416,17.8044 18.0423,18.0431 18.4174,18.3073C19.3552,18.9552 19.7473,19.3986 19.8411,19.5435C19.8155,19.5946 19.7559,19.7055 19.6109,19.876C19.4234,20.0976 19.1506,20.3363 18.8607,20.558C18.1958,21.0524 17.5138,21.3423 17.0449,21.3423C16.5078,21.3423 15.6212,20.9842 14.6153,20.3619C13.5667,19.714 12.4243,18.8103 11.4098,17.8214L11.0859,17.4889C10.097,16.4745 9.1933,15.3321 8.5454,14.275C7.9231,13.2605 7.5651,12.3739 7.5651,11.8368C7.5651,11.3594 7.8549,10.686 8.3494,10.0125C8.5625,9.7141 8.8097,9.4498 9.0228,9.2623C9.1933,9.1174 9.3042,9.0492 9.3553,9.0321C9.5002,9.1259 9.9435,9.518 10.5914,10.4558C10.8557,10.8394 11.0944,11.2401 11.2734,11.5726C11.4439,11.8965 11.5036,12.067 11.5207,12.1437C11.5036,12.1608 11.4695,12.1864 11.4098,12.2205C11.282,12.2972 11.1115,12.3739 10.941,12.4421C10.7193,12.5274 10.5062,12.6211 10.3186,12.7405Z"
android:strokeWidth="1"
android:fillColor="#5ECEA9"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
</vector>
......@@ -3,8 +3,8 @@
android:shape="rectangle">
<corners
android:radius="8dp"/>
android:radius="26dp"/>
<solid android:color="#ffffff"/>
<solid android:color="#61CEAC"/>
</shape>
\ No newline at end of file
......@@ -2,10 +2,12 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/confide_61CEAC"
android:endColor="@color/confide_48CC95"/>
<!-- <gradient-->
<!-- android:startColor="@color/confide_61CEAC"-->
<!-- android:endColor="@color/confide_48CC95"/>-->
<corners android:radius="8dp" />
<solid android:color="@color/white"/>
<corners android:radius="15dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="7dp"
android:height="8dp"
android:viewportWidth="7"
android:viewportHeight="8">
<path
android:pathData="M0,0h7v7h-7z"
android:strokeAlpha="0"
android:strokeWidth="1"
android:fillColor="#54B6F3"
android:fillType="nonZero"
android:strokeColor="#00000000"
android:fillAlpha="0"/>
<path
android:pathData="M2.7,7.41143l-0.55918,-0.50312l2.42266,-2.69199l-2.56348,-2.69814l0.54551,-0.51816l3.04199,3.20264z"
android:strokeWidth="1"
android:fillColor="#55B7F3"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
</vector>
......@@ -22,7 +22,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/quick_consult_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="52dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
......@@ -40,7 +40,8 @@
android:id="@+id/confide_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/confide_call_logo"
android:layout_marginStart="8dp"
android:src="@drawable/confide_call_logo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
......@@ -57,8 +58,9 @@
android:gravity="center_vertical"
android:maxLines="1"
android:text="智能推荐,一键倾诉"
android:textColor="@color/platform_color_333333"
android:textColor="@color/white"
android:textSize="14dp"
android:textStyle="bold"
android:layout_marginStart="@dimen/platform_dp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/confide_logo"
......@@ -85,9 +87,10 @@
android:paddingRight="@dimen/platform_dp_7"
android:text="我要倾诉"
android:layout_marginTop="@dimen/platform_dp_12"
android:textColor="@color/white"
android:textColor="#55CDA0"
android:textSize="13sp"
android:drawableRight="@drawable/confide_right_arrow" />
android:textStyle="bold"
app:drawableRightCompat="@drawable/confide_right_arrow" />
<ImageView
android:id="@+id/confideRed"
......
......@@ -6,6 +6,7 @@ import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.media.AudioManager;
import android.os.Bundle;
import android.os.Handler;
......@@ -50,6 +51,7 @@ import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.ydl.ydlcommon.utils.AnimUtils;
import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.Utils;
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils;
import com.ydl.ydlcommon.utils.log.AliYunLogConfig;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
......@@ -185,6 +187,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private TextView tv_all_comment_desc;
private ImageView tv_all_comment_go;
private ImCommentBannerView comment_banner_view;
private TextView tvCommentCount;
private ImRedStarGradeView good_num_icons;
......@@ -259,8 +262,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
top_expert_info_ll = rootView.findViewById(R.id.top_expert_info_ll);
top_expert_info_cl = rootView.findViewById(R.id.top_expert_info_cl);
comment_banner_view_ll = rootView.findViewById(R.id.comment_banner_view_ll);
tv_all_comment_desc = rootView.findViewById(R.id.tv_all_comment_desc);
tv_all_comment_go = rootView.findViewById(R.id.tv_all_comment_go);
tvCommentCount = rootView.findViewById(R.id.tv_comment_count);
comment_banner_view = rootView.findViewById(R.id.comment_banner_view);
messageListView = rootView.findViewById(R.id.messageListView); // 消息列表
top_view_container = rootView.findViewById(R.id.top_view_container); // 消息列表
......@@ -851,13 +855,24 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
int commentCounter = ActionHandlerStorage.getL(sessionId).getInfo().commentCounter;
tv_all_comment_desc.setText(String.valueOf(commentCounter));
String commentCountInfo = String.format("评价(%d)", commentCounter);
tvCommentCount.setText(commentCountInfo);
Drawable drawable = getResources().getDrawable(R.drawable.platform_right_arrow);
drawable.setBounds(0, 0, 36, 36);
tvCommentCount.setCompoundDrawables(null, null, drawable, null);
tvCommentCount.setCompoundDrawablePadding(4);
H5Params params = new H5Params(ActionHandlerStorage.getL(sessionId).getInfo().commentCounterUrl, "");
View.OnClickListener onClickListener = v -> NewH5Activity.start(getActivity(), params);
tv_all_comment_desc.setOnClickListener(onClickListener);
tv_all_comment_go.setOnClickListener(onClickListener);
View.OnClickListener onClickListener = v -> {
if (Utils.isFastClick()) {
return;
}
ActionCountUtils.Companion.baiDuCountSign3("chat_page", "evaluate_lick_click", "", "", "");
NewH5Activity.start(getActivity(), params);
};
tvCommentCount.setOnClickListener(onClickListener);
comment_banner_view.initData(ActionHandlerStorage.getL(sessionId).getInfo().commentList);
......
......@@ -315,50 +315,15 @@
android:layout_weight="1"/>
<TextView
android:id="@+id/tv_comment_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
android:lines="1"
android:text="评价"
android:textColor="@color/platform_main_theme"
android:textSize="12dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="1dp"
android:lines="1"
android:text="("
android:textColor="@color/platform_main_theme"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_all_comment_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:lines="1"
android:textColor="@color/platform_main_theme"
android:textSize="12dp"
tools:text="18714" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="1dp"
android:lines="1"
android:text=")"
android:textColor="@color/platform_main_theme"
android:textSize="12dp" />
<ImageView
android:id="@+id/tv_all_comment_go"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_gravity="center"
android:src="@drawable/platform_right_arrow" />
android:textSize="12sp"
tools:text="评价(10086)" />
</LinearLayout>
......
package com.yidianling.muse.activity
//import com.yidianling.muse.dialog.ChooseMusicDialog
import android.content.Intent
import android.media.MediaPlayer
import android.os.Bundle
......@@ -17,6 +16,7 @@ import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.event.MeditationEvent
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper.Companion.show
......@@ -58,6 +58,11 @@ class PlayMeditationActivity : BaseActivity() {
private var mMediaUrl = ""
private var mMediaCoverUrl = ""
private var mMinProgramId: String? = null
private var mCateId: Int? = null
private var mTagId: String? = null
private var mMark: Int? = null
private var mTitle = ""
private var mDesc = ""
private var mStatus = 0
......@@ -90,6 +95,11 @@ class PlayMeditationActivity : BaseActivity() {
private var mBuried: String? = null
private var mVideoId: String? = null
private var mIndexForMini = 0
private var mMinProgramPath: String? = null
/**
* 传递过来的mediaId 用于判断正在播放的是否是同一条音频
*/
......@@ -139,6 +149,11 @@ class PlayMeditationActivity : BaseActivity() {
val module = it.data
mMediaId = module.mediaId
mMinProgramId = module.minProgramId
mCateId = module.cateId
mTagId = module.tagId
mMark = module.mark
meditations.clear()
module.mediaList?.forEach { meditationPlayBean ->
......@@ -148,7 +163,10 @@ class PlayMeditationActivity : BaseActivity() {
if (meditationPlayBean.mediaId == mMediaId) {
currentMeditation =
meditationPlayBean.copy(meditationType = mMeditationType,meditationId = mMeditationId!!)
meditationPlayBean.copy(
meditationType = mMeditationType,
meditationId = mMeditationId!!
)
mMediaId = module?.mediaId ?: 0L
mTitle = meditationPlayBean.title
......@@ -168,49 +186,21 @@ class PlayMeditationActivity : BaseActivity() {
collected = mStatus == 1
mVideoId = meditationPlayBean.videoId
mIndexForMini = 0
updateUI()
initMediaPlayer(mMediaUrl, currentPosition,mMediaIdFromLocal == mMediaId)
}
}
// mediaListLink = module.playDetailUrl?:""
//
// val mediaList = module.mediaList
// if(!mediaList.isNullOrEmpty()){
// val meditation = mediaList[0]
//
//
//
// currentMeditation = meditation.copy(meditationType = mMeditationType,meditationId = mMeditationId!!)
// mTitle = meditation.title
// mDesc = meditation.desc?:""
// mMediaUrl = meditation.mediaUrl
// mMediaCoverUrl = meditation.coverImageUrl
// val currentPosition = meditation.broadcastTime
// mBusinessType = meditation.businessType
// mBuried = meditation.buried
// mStatus = meditation.status
//
// collected = mStatus == 1
//
// updateUI()
//
// initMediaPlayer(
// mMediaUrl,
// currentPosition,
// mMediaIdFromLocal == mMediaId
// )
//
// //快进点击事件
// ActionCountUtils.baiDuCountSign3(
// MuseBIConstants.YDL_MUSE_MEDITATION_MUSIC_PLAY_PAGE,
// MuseBIConstants.YDL_MUSE_PLAY_PAGE_VISIT,
// currentMeditation?.title ?: "",
// mBuried ?: "",
// ""
// )
// }
formatMiniPath()
initMediaPlayer(
mMediaUrl,
currentPosition,
mMediaIdFromLocal == mMediaId
)
}
}
}
}, object : ThrowableConsumer() {
override fun accept(msg: String) {
......@@ -231,17 +221,26 @@ class PlayMeditationActivity : BaseActivity() {
val module = it.data
mMediaId = module.mediaId
mMinProgramId = module.minProgramId
mCateId = module.cateId
mTagId = module.tagId
mMark = module.mark
meditations.clear()
module.mediaList?.forEach { meditationPlayBean ->
module.mediaList?.forEachIndexed { index, meditationPlayBean ->
meditations.add(meditationPlayBean)
if (meditationPlayBean.mediaId == mMediaId) {
mIndexForMini = index
currentMeditation =
meditationPlayBean.copy(meditationType = mMeditationType,meditationId = mMeditationId!!)
meditationPlayBean.copy(
meditationType = mMeditationType,
meditationId = mMeditationId!!
)
mMediaId = module?.mediaId ?: 0L
mTitle = meditationPlayBean.title
......@@ -261,9 +260,17 @@ class PlayMeditationActivity : BaseActivity() {
collected = mStatus == 1
mVideoId = meditationPlayBean.videoId
formatMiniPath()
updateUI()
initMediaPlayer(mMediaUrl, currentPosition,mMediaIdFromLocal == mMediaId)
initMediaPlayer(
mMediaUrl,
currentPosition,
mMediaIdFromLocal == mMediaId
)
}
}
}
......@@ -322,7 +329,7 @@ class PlayMeditationActivity : BaseActivity() {
""
)
if (!mediaListLink.isNullOrBlank()) {
ChooseMusicActivity.launch(this, H5Params(mediaListLink,"") )
ChooseMusicActivity.launch(this, H5Params(mediaListLink, ""))
}
}
......@@ -392,7 +399,7 @@ class PlayMeditationActivity : BaseActivity() {
""
)
if(mMeditationType == 0){
if (mMeditationType == 0) {
if (mMeditationId != null && mMediaId != null) {
MediaPlayerTimeUtil.uploadPlayRecord(
meditationId = mMeditationId!!.toInt(),
......@@ -407,7 +414,7 @@ class PlayMeditationActivity : BaseActivity() {
finish()
}
}else{
} else {
if (quitDialog == null) {
quitDialog = QuitMeditationDialog.newInstance()
}
......@@ -441,9 +448,13 @@ class PlayMeditationActivity : BaseActivity() {
mBuried ?: "",
""
)
val event = MeditationFloatEvent(true,
meditation = currentMeditation?.copy(meditationType = mMeditationType,meditationId =
mMeditationId?:0))
val event = MeditationFloatEvent(
true,
meditation = currentMeditation?.copy(
meditationType = mMeditationType, meditationId =
mMeditationId ?: 0
)
)
EventBus.getDefault().post(event)
Handler().postDelayed({
......@@ -466,13 +477,15 @@ class PlayMeditationActivity : BaseActivity() {
shareTitle = mTitle,
shareContent = mDesc,
shareUrl = mMediaUrl,
shareImageUrl = mMediaCoverUrl
shareImageUrl = mMediaCoverUrl,
miniId = "gh_c154608001f0",
// miniId = mMinProgramId!!,
miniPath = mMinProgramPath!!
)
}
if (shareDialog != null && shareDialog?.isAdded == false) {
shareDialog?.show(supportFragmentManager, ShareMeditationDialog.TAG)
}
}
iv_time_off.setOnClickListener {
......@@ -485,7 +498,7 @@ class PlayMeditationActivity : BaseActivity() {
""
)
val intent = Intent(this, MeditationTimeOffActivity::class.java)
intent.putExtra("BG_IMAGE_URL",mMediaCoverUrl)
intent.putExtra("BG_IMAGE_URL", mMediaCoverUrl)
startActivityForResult(intent, request_code)
}
......@@ -499,7 +512,7 @@ class PlayMeditationActivity : BaseActivity() {
""
)
val intent = Intent(this, MeditationTimeOffActivity::class.java)
intent.putExtra("BG_IMAGE_URL",mMediaCoverUrl)
intent.putExtra("BG_IMAGE_URL", mMediaCoverUrl)
startActivityForResult(intent, request_code)
}
......@@ -578,7 +591,7 @@ class PlayMeditationActivity : BaseActivity() {
)
var currentPosition = 0
meditations?.forEachIndexed { index, meditationDetail ->
if (meditationDetail.mediaId == mMediaId){
if (meditationDetail.mediaId == mMediaId) {
currentPosition = index
}
}
......@@ -595,17 +608,22 @@ class PlayMeditationActivity : BaseActivity() {
)
val meditation = meditations[currentPosition - 1]
currentMeditation = meditation.copy(meditationId = mMeditationId!!)
mMediaId = meditation.mediaId
mMediaCoverUrl = meditation.coverImageUrl
mMediaUrl = meditation.mediaUrl
val currentPosition = meditation.broadcastTime
mStatus = meditation.status
mTitle = meditation.title
mDesc = meditation.title
mVideoId = meditation.videoId
mIndexForMini = currentPosition - 1
formatMiniPath()
updateUI(needRefresh = false)
initMediaPlayer(mMediaUrl, 0, mMediaIdFromLocal == mMediaId)
......@@ -627,7 +645,7 @@ class PlayMeditationActivity : BaseActivity() {
)
var currentPosition = 0
meditations?.forEachIndexed { index, meditationDetail ->
if (meditationDetail.mediaId == mMediaId){
if (meditationDetail.mediaId == mMediaId) {
currentPosition = index
}
}
......@@ -650,11 +668,15 @@ class PlayMeditationActivity : BaseActivity() {
mMediaId = meditation.mediaId
mMediaCoverUrl = meditation.coverImageUrl
mMediaUrl = meditation.mediaUrl
val currentPosition = meditation.broadcastTime
mStatus = meditation.status
mTitle = meditation.title
mDesc = meditation.title
mVideoId = meditation.videoId
mIndexForMini = currentPosition + 1
formatMiniPath()
updateUI(needRefresh = false)
......@@ -743,10 +765,11 @@ class PlayMeditationActivity : BaseActivity() {
})
val isLoop = MediaPlayerManager.getInstance(this@PlayMeditationActivity)?.getTimeOffStatus() == true
val isLoop =
MediaPlayerManager.getInstance(this@PlayMeditationActivity)?.getTimeOffStatus() == true
initPlayCompletionListener(isLoop = isLoop)
MeditationFloatPermissionUtil.checkSuspendedWindowPermission(this){
MeditationFloatPermissionUtil.checkSuspendedWindowPermission(this) {
}
......@@ -756,9 +779,9 @@ class PlayMeditationActivity : BaseActivity() {
mMediaPlayer?.setOnCompletionListener {
val duration = currentMeditation?.duration?.toInt()?:0
val currentDuration = (mMediaPlayer?.currentPosition?:0)/1000
if(currentDuration==duration){
val duration = currentMeditation?.duration?.toInt() ?: 0
val currentDuration = (mMediaPlayer?.currentPosition ?: 0) / 1000
if (currentDuration == duration) {
val playTime = (seekbar_play_progress.progress / 1000.00).roundToInt()
MediaPlayerTimeUtil.uploadPlayRecord(
......@@ -770,11 +793,10 @@ class PlayMeditationActivity : BaseActivity() {
)
}
if (isLoop){
if (isSingle || meditations.size == 1){
if (isLoop) {
if (isSingle || meditations.size == 1) {
switchSound()
// MediaPlayerManager.getInstance(this)?.setAudioPath(mMediaUrl)
}else{
} else {
switchSound()
}
}
......@@ -796,18 +818,20 @@ class PlayMeditationActivity : BaseActivity() {
}
private fun switchSound(){
var meditation:MeditationPlayModuleBean.MeditationDetail? = null
private fun switchSound() {
var meditation: MeditationPlayModuleBean.MeditationDetail? = null
meditations?.forEachIndexed { index, meditationDetail ->
if (meditationDetail.mediaId == mMediaId){
if (meditationDetail.mediaId == mMediaId) {
currentMeditationIndex = index
}
}
if (mMeditationId == null || mMediaId == null) return
if (currentMeditationIndex < meditations.size - 1) {
meditation = meditations[currentMeditationIndex + 1]
mIndexForMini = currentMeditationIndex + 1
} else {
meditation = meditations[0]
mIndexForMini = 0
}
currentMeditation = meditation.copy(meditationId = mMeditationId!!)
......@@ -819,6 +843,10 @@ class PlayMeditationActivity : BaseActivity() {
mTitle = meditation.title
mDesc = meditation.title
mVideoId = meditation.videoId
formatMiniPath()
updateUI(needRefresh = false)
initMediaPlayer(mMediaUrl, 0, mMediaIdFromLocal == mMediaId)
......@@ -826,7 +854,7 @@ class PlayMeditationActivity : BaseActivity() {
private fun initMediaPlayer(path: String, current: Int, isSameOne: Boolean = false) {
if (MediaPlayerManager.getInstance(this)?.getAudioPath()!=null &&
if (MediaPlayerManager.getInstance(this)?.getAudioPath() != null &&
MediaPlayerManager.getInstance(this)?.getMediaId() == mMediaId
) {
if (mMediaPlayer?.isPlaying == true) {
......@@ -888,7 +916,8 @@ class PlayMeditationActivity : BaseActivity() {
mTimer.schedule(object : TimerTask() {
override fun run() {
if (!isSeekbarChanging) {
seekbar_play_progress.progress = mMediaPlayer?.currentPosition ?: 0
seekbar_play_progress.progress =
mMediaPlayer?.currentPosition ?: 0
}
}
}, 0, 50)
......@@ -921,7 +950,7 @@ class PlayMeditationActivity : BaseActivity() {
MediaPlayerManager.getInstance(this)?.setTimeOffStatus(true)
initRxTimeOff((minute * 60 * 1000).toLong(), 1)
}
val event = MeditationFloatEvent(false,time = (minute * 60 * 1000).toLong())
val event = MeditationFloatEvent(false, time = (minute * 60 * 1000).toLong())
EventBus.getDefault().post(event)
} else {
initPlayCompletionListener()
......@@ -931,13 +960,13 @@ class PlayMeditationActivity : BaseActivity() {
tv_time_off.visibility = View.GONE
tv_time_off_pure_music.visibility = View.GONE
mMediaPlayer?.isLooping = false
val event = MeditationFloatEvent(false,time = 0)
val event = MeditationFloatEvent(false, time = 0)
EventBus.getDefault().post(event)
}
}
}
private fun updateUI(needRefresh:Boolean = true){
private fun updateUI(needRefresh: Boolean = true) {
tv_title.text = mTitle
tv_content.text = mDesc
Glide.with(this)
......@@ -952,10 +981,10 @@ class PlayMeditationActivity : BaseActivity() {
}
)
if(needRefresh){
if(MediaPlayerManager.getInstance(this)?.getTimeOffStatus() == true){
if (needRefresh) {
if (MediaPlayerManager.getInstance(this)?.getTimeOffStatus() == true) {
val timeOff = MediaPlayerManager.getInstance(this)?.getTimeOff()
if (timeOff!=null && timeOff>0 && mMeditationType!=null){
if (timeOff != null && timeOff > 0 && mMeditationType != null) {
initRxTimeOff(timeOff, mMeditationType!!)
}
}
......@@ -1064,4 +1093,10 @@ class PlayMeditationActivity : BaseActivity() {
const val request_code = 0x0001
}
private fun formatMiniPath() {
mMinProgramPath = "/pages/player/index?share=1&meditationId=${mMeditationId}" +
"&meditionType=${mMeditationType}&mediaId=${mMediaId}&collectStatus=${mStatus}&index=${mIndexForMini}&videoId=${mVideoId}&cateId=${mCateId}&mark=${mMark}&tagId=${mTagId}"
LogUtil.d("Lancet======", mMinProgramPath)
}
}
\ No newline at end of file
......@@ -5,31 +5,36 @@ package com.yidianling.muse.bean
* Created by xj on 2019/9/16.
*/
class MeditationPlayModuleBean : HomeItemBaseBean {
constructor():super(false)
constructor(isRealEmpty:Boolean):super(isRealEmpty)
constructor() : super(false)
constructor(isRealEmpty: Boolean) : super(isRealEmpty)
var meditationId:Long? = null
var mediaId:Long? = null
var mediaType:Int?=null
var playDetailUrl:String? = null
var meditationId: Long? = null
var mediaId: Long? = null
var mediaType: Int? = null
var playDetailUrl: String? = null
val minProgramId: String? = null
val cateId: Int? = null
val tagId: String? = null
val mark: Int? = null
var mediaList: ArrayList<MeditationDetail>? = null
data class MeditationDetail(
val meditationType:Int? = null,
val mediaId:Long?=null,
val meditationId:Long,
val title:String,
val author:String,
val coverImageUrl:String,
val mediaUrl:String,
val duration:Float?=null,
val status:Int,
val broadcastTime:Int,
val businessType:Int,
val buried:String?=null,
val desc:String?=null,
val coverImageUrlIcon:String
val meditationType: Int? = null,
val mediaId: Long? = null,
val meditationId: Long,
val title: String,
val author: String,
val coverImageUrl: String,
val mediaUrl: String,
val duration: Float? = null,
val status: Int,
val broadcastTime: Int,
val businessType: Int,
val buried: String? = null,
val desc: String? = null,
val coverImageUrlIcon: String,
val videoId: String? = null
)
override fun toString(): String {
......
......@@ -60,10 +60,12 @@ class ShareMeditationDialog : DialogFragment() {
private fun initView(view: View?) {
val shareImageUrl = arguments?.getString(KEY_SHARE_IMAGE_URL)?:""
val shareTitle = arguments?.getString(KEY_SHARE_TITLE)?:""
val shareContent = arguments?.getString(KEY_SHARE_CONTENT)?:""
val shareUrl = arguments?.getString(KEY_SHARE_URL)?:""
val shareImageUrl = arguments?.getString(KEY_SHARE_IMAGE_URL) ?: ""
val shareTitle = arguments?.getString(KEY_SHARE_TITLE) ?: ""
val shareContent = arguments?.getString(KEY_SHARE_CONTENT) ?: ""
val shareUrl = arguments?.getString(KEY_SHARE_URL) ?: ""
val shareMiniId = arguments?.getString(KEY_SHARE_MINI_ID) ?: ""
val shareMiniPath = arguments?.getString(KEY_SHARE_MINI_PATH) ?: ""
ivSharePicture = view?.findViewById(R.id.iv_share_picture)
......@@ -82,13 +84,15 @@ class ShareMeditationDialog : DialogFragment() {
llQQFriend = view?.findViewById(R.id.ll_qq_friend)
llWeChat?.setOnClickListener {
ShareUtils.shareTo(
SHARE_MEDIA.WEIXIN,
ShareUtils.shareSmailWeixin(
activity as Activity,
shareTitle,
shareUrl,
shareContent,
shareImageUrl
shareImageUrl,
path = shareMiniPath,
id = shareMiniId,
shareListener = null
)
dismiss()
}
......@@ -147,13 +151,24 @@ class ShareMeditationDialog : DialogFragment() {
private const val KEY_SHARE_URL = "key_share_url"
private const val KEY_SHARE_CONTENT = "key_share_content"
private const val KEY_SHARE_IMAGE_URL = "key_share_image_url"
fun newInstance(shareTitle:String,shareUrl:String,shareContent:String,shareImageUrl: String): ShareMeditationDialog {
private const val KEY_SHARE_MINI_ID = "key_share_mini_id"
private const val KEY_SHARE_MINI_PATH = "key_share_mini_path"
fun newInstance(
shareTitle: String,
shareUrl: String,
shareContent: String,
shareImageUrl: String,
miniId: String,
miniPath: String
): ShareMeditationDialog {
val args = Bundle()
args.putString(KEY_SHARE_TITLE, shareTitle)
args.putString(KEY_SHARE_CONTENT, shareContent)
args.putString(KEY_SHARE_URL, shareUrl)
args.putString(KEY_SHARE_IMAGE_URL, shareImageUrl)
args.putString(KEY_SHARE_MINI_ID, miniId)
args.putString(KEY_SHARE_MINI_PATH, miniPath)
val fragment = ShareMeditationDialog()
fragment.arguments = args
return fragment
......
package com.yidianling.user.bean
data class EvaluateOrderBean(
val consultOrder: Boolean? = null,
val listenOrder: Boolean? = null
)
......@@ -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.data.AppDataManager
import com.yidianling.user.mine.data.AppDataManager.getHttp
import com.yidianling.user.mine.data.AppDataManager.getLocal
import com.yidianling.user.mine.http.MineHttpImpl
......@@ -101,14 +102,14 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
text_userName.setOnClickListener(this)
jtv_test.setOnClickListener(this)
swipe_refresh_layout.setOnRefreshListener(this)
rootView.findViewById<View>(R.id.ll_trade_order).setOnClickListener(this)
rootView.findViewById<View>(R.id.csl_trade_order).setOnClickListener(this)
rootView.findViewById<View>(R.id.jtv_introduce).setOnClickListener(this)
rootView.findViewById<View>(R.id.iv_edit_info).setOnClickListener(this)
//分享
rootView.findViewById<View>(R.id.iv_share).setOnClickListener(this)
rootView.findViewById<View>(R.id.ll_my_courses).setOnClickListener(this)
rootView.findViewById<View>(R.id.ll_red_packet).setOnClickListener(this)
rootView.findViewById<View>(R.id.ll_call_order).setOnClickListener(this)
rootView.findViewById<View>(R.id.csl_call_order).setOnClickListener(this)
rootView.findViewById<View>(R.id.ll_account).setOnClickListener(this)
rootView.findViewById<View>(R.id.ll_guanzhu).setOnClickListener(this)
rootView.findViewById<View>(R.id.ll_my_trends).setOnClickListener(this)
......@@ -124,6 +125,8 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
.into(iv_mine_logo)
refreshCouponData()
}
override fun initDataAndEventLazy() {}
......@@ -199,12 +202,59 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
refreshCouponData()
}
private fun getConfideOrder(uid: String) {
MineHttpImpl.getInstance().getHasConfideOrder(uid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ response ->
if ("200" == response.code) {
if (response.data != null) {
if (response.data.listenOrder == true) {
iv_confide_tip.visibility = View.VISIBLE
getLocal().setConfide(true)
} else {
iv_confide_tip.visibility = View.GONE
getLocal().setConfide(false)
}
if (response.data.consultOrder == true) {
iv_order_tip.visibility = View.VISIBLE
getLocal().setConsult(true)
} else {
iv_order_tip.visibility = View.GONE
getLocal().setConsult(false)
}
}else{
getLocal().setConfide(false)
getLocal().setConsult(false)
}
}else{
getLocal().setConfide(false)
getLocal().setConsult(false)
}
},{
getLocal().setConfide(false)
getLocal().setConsult(false)
})
}
/**
* 更新优惠券信息
*/
@SuppressLint("CheckResult")
private fun refreshCouponData() {
getLocal().setCoupon(false)
getLocal().setConfide(false)
getLocal().setConsult(false)
val userInfo = getUserInfo() ?: return
if (userInfo.uid != null) {
getConfideOrder(userInfo.uid!!)
}
//获取用户信息
MineHttpImpl.getInstance().getNewCoupon(BaseCommand())
.compose(netCheck())
......@@ -214,11 +264,17 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
if (response.data != null) {
if (response.data?.count ?: 0 > 0) {
view_new_coupon.visibility = View.VISIBLE
getLocal().setCoupon(true)
} else {
view_new_coupon.visibility = View.INVISIBLE
view_new_coupon.visibility = View.GONE
getLocal().setCoupon(false)
}
}else{
getLocal().setCoupon(false)
}
}) { throwable: Throwable? ->
getLocal().setCoupon(false)
}
}) { throwable: Throwable? -> }
}
/**
......@@ -265,7 +321,6 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
} else {
jtv_about_us?.setLeftRedDotVisibility(View.GONE)
}
//切换环境按钮逻辑
debugChangeEnvironment()
}
......@@ -409,7 +464,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
startActivity(Intent(activity, PrivacyActivity::class.java))
}
} else if (id == R.id.ll_trade_order) { //预约
} else if (id == R.id.csl_trade_order) { //预约
count(UserMyPageEvent.YDL_USER_MY_MIDDLE_TYPE_CLICK, "预约订单")
mActivity?.let { activity ->
if (!startLoginByStatus(activity, true)) {
......@@ -431,7 +486,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
provide(ICourseService::class.java).startMyCourseActivity(activity)
}
} else if (id == R.id.ll_call_order) { //倾诉
} else if (id == R.id.csl_call_order) { //倾诉
count(UserMyPageEvent.YDL_USER_MY_MIDDLE_TYPE_CLICK, "倾诉记录")
mActivity?.let { activity ->
if (!startLoginByStatus(activity, true)) {
......
......@@ -18,4 +18,16 @@ interface AppLocal {
fun putUpdate(update: Boolean)
fun getCoupon():Boolean
fun setCoupon(have:Boolean)
fun getConsult():Boolean
fun setConsult(have: Boolean)
fun getConfide():Boolean
fun setConfide(have: Boolean)
}
\ No newline at end of file
......@@ -16,9 +16,13 @@ internal class AppLocalImpl private constructor(): AppLocal {
return Holder.INSTANCE
}
private val APP = "app"
private val RED_POCKET_TIME = "red_pocket_time"
private val UPDATE = "update"
private const val APP = "app"
private const val RED_POCKET_TIME = "red_pocket_time"
private const val UPDATE = "update"
private const val CONFIDE = "confide"
private const val CONSULT = "consult"
private const val COUPON = "coupon"
}
......@@ -38,6 +42,30 @@ internal class AppLocalImpl private constructor(): AppLocal {
getAppSP().edit().putBoolean(UPDATE, update).apply()
}
override fun getCoupon(): Boolean {
return getAppSP().getBoolean(COUPON, false)
}
override fun setCoupon(have: Boolean) {
getAppSP().edit().putBoolean(COUPON, have).apply()
}
override fun getConsult(): Boolean {
return getAppSP().getBoolean(CONSULT, false)
}
override fun setConsult(have: Boolean) {
getAppSP().edit().putBoolean(CONSULT, have).apply()
}
override fun getConfide(): Boolean {
return getAppSP().getBoolean(CONFIDE, false)
}
override fun setConfide(have: Boolean) {
getAppSP().edit().putBoolean(CONFIDE, have).apply()
}
private fun getAppSP(): SharedPreferences {
return BaseApp.getApp().getSharedPreferences(APP, Context.MODE_PRIVATE)
}
......
......@@ -6,6 +6,7 @@ import com.ydl.ydlcommon.bean.MustUP
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlcommon.data.http.BaseResponse
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.EvaluateOrderBean
import com.yidianling.user.bean.FundData
import com.yidianling.user.bean.Recharge
import com.yidianling.user.mine.bean.AccountBean
......@@ -95,4 +96,12 @@ interface MineApi {
@POST("sms/list")
fun getSysMsgList(@FieldMap params: Map<String, String>): Observable<BaseResponse<String>>
/**
* 倾诉订单是否有待评价
*/
@POST("consult/user/order/isEvaluateOrder")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun hasConfideOrder(@Body body: RequestBody):Observable<BaseAPIResponse<EvaluateOrderBean>>
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ import com.yidianling.im.message.param.MsgListParam
import com.yidianling.user.bean.FundData
import com.yidianling.user.bean.Recharge
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.EvaluateOrderBean
import com.yidianling.user.mine.*
import com.yidianling.user.mine.bean.AccountBean
import com.yidianling.user.mine.bean.BalanceBean
......@@ -47,4 +48,6 @@ interface MineHttp {
fun getSysMsgList(param: MsgListParam): Observable<BaseResponse<String>>
fun getHasConfideOrder(uid: String): Observable<BaseAPIResponse<EvaluateOrderBean>>
}
\ No newline at end of file
......@@ -6,10 +6,14 @@ import com.ydl.ydlcommon.data.http.*
import com.ydl.ydlcommon.utils.NetworkParamsUtils
import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.im.message.param.MsgListParam
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.EvaluateOrderBean
import com.yidianling.user.bean.FundData
import com.yidianling.user.bean.Recharge
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.mine.*
import com.yidianling.user.mine.APPWillUpParam
import com.yidianling.user.mine.FeedBackParam
import com.yidianling.user.mine.FundListParam
import com.yidianling.user.mine.RechargeParam
import com.yidianling.user.mine.bean.AccountBean
import com.yidianling.user.mine.bean.BalanceBean
import com.yidianling.user.mine.bean.FeedBackDetailBean
......@@ -18,6 +22,7 @@ import io.reactivex.Observable
import okhttp3.MediaType
import okhttp3.RequestBody
import java.io.File
import java.util.*
class MineHttpImpl private constructor() : MineHttp {
......@@ -127,6 +132,14 @@ class MineHttpImpl private constructor() : MineHttp {
.flatMap { getAppApi().getSysMsgList(it) }
}
override fun getHasConfideOrder(uid: String): Observable<BaseAPIResponse<EvaluateOrderBean>> {
var param = WeakHashMap<String, String>().toMutableMap()
param["uid"] = uid
val body =
RequestBody.create(MediaType.parse("application/json; charset=utf-8"), param.toString())
return getAppApi().hasConfideOrder(body)
}
object Holder {
val INSTANCE = MineHttpImpl()
}
......
......@@ -354,9 +354,8 @@
</RelativeLayout>
<LinearLayout
android:id="@+id/ll_call_order"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/csl_call_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
......@@ -365,10 +364,25 @@
android:orientation="vertical">
<ImageView
android:id="@+id/iv_confide"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginTop="3dp"
android:src="@drawable/user_mine_ic_qinshu_record" />
android:src="@drawable/user_mine_ic_qinshu_record"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_confide_tip"
android:layout_width="8dp"
android:layout_height="8dp"
android:src="@drawable/user_mine_background_red_point_new_coupon"
android:visibility="gone"
app:layout_constraintCircle="@id/iv_confide"
app:layout_constraintCircleAngle="45"
app:layout_constraintCircleRadius="13dp"
tools:visibility="visible" />
<TextView
android:layout_width="wrap_content"
......@@ -376,12 +390,15 @@
android:layout_marginTop="8dp"
android:text="倾诉记录"
android:textColor="@color/platform_color_999999"
android:textSize="12sp" />
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_confide" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/ll_trade_order"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/csl_trade_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
......@@ -390,10 +407,25 @@
android:orientation="vertical">
<ImageView
android:id="@+id/iv_trade_order"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginTop="3dp"
android:src="@drawable/user_mine_ic_order" />
android:src="@drawable/user_mine_ic_order"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_order_tip"
android:layout_width="8dp"
android:layout_height="8dp"
android:src="@drawable/user_mine_background_red_point_new_coupon"
android:visibility="gone"
app:layout_constraintCircle="@id/iv_trade_order"
app:layout_constraintCircleAngle="45"
app:layout_constraintCircleRadius="13dp"
tools:visibility="visible" />
<TextView
android:layout_width="wrap_content"
......@@ -401,9 +433,12 @@
android:layout_marginTop="8dp"
android:text="预约订单"
android:textColor="@color/platform_color_999999"
android:textSize="12sp" />
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_trade_order" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
......
......@@ -14,10 +14,13 @@ class ShareData : Serializable {
var cover: String? = null
var desc: String? = null
// just for Meditation
var type:String? = null
// just for Meditation
var type: String? = null
var isDarkMode = false
// 兼容评价列表分享H5传参数据结构
var imageBase64: String? = null
//分享到动态url
var url: String? = null
......
......@@ -73,6 +73,8 @@ class ShareMeditationDialog : DialogFragment() {
val shareTitle = arguments?.getString(KEY_SHARE_TITLE)
val shareContent = arguments?.getString(KEY_SHARE_CONTENT)
val shareCover = arguments?.getString(KEY_SHARE_COVER)
val miniId = arguments?.getString(KEY_SHARE_MINI_ID)
val miniPath = arguments?.getString(KEY_SHARE_MINI_PATH)
llRootLayout = view?.findViewById(R.id.csl_share_layout)
......@@ -96,13 +98,15 @@ class ShareMeditationDialog : DialogFragment() {
updateUI(isDarkMode == true)
llWeChat?.setOnClickListener {
ShareUtils.shareTo(
SHARE_MEDIA.WEIXIN,
ShareUtils.shareSmailWeixin(
activity as Activity,
shareTitle!!,
shareUrl!!,
shareContent!!,
shareCover!!
shareCover!!,
path = miniPath,
id = miniId,
shareListener = null
)
dismiss()
}
......@@ -191,15 +195,21 @@ class ShareMeditationDialog : DialogFragment() {
private const val KEY_SHARE_TITLE = "key_share_title"
private const val KEY_SHARE_CONTENT = "key_share_content"
private const val KEY_SHARE_COVER = "key_share_cover"
private const val KEY_SHARE_MINI_ID = "key_share_mini_id"
private const val KEY_SHARE_MINI_PATH = "key_share_mini_path"
fun newInstance(isDarkMode: Boolean,shareUrl:String,shareTitle:String,
shareContent:String,shareCover:String): ShareMeditationDialog {
fun newInstance(
isDarkMode: Boolean, shareUrl: String, shareTitle: String,
shareContent: String, shareCover: String, miniId: String, miniPath: String
): ShareMeditationDialog {
val args = Bundle()
args.putBoolean(KEY_SHARE_DARK_MODE, isDarkMode)
args.putString(KEY_SHARE_URL, shareUrl)
args.putString(KEY_SHARE_TITLE, shareTitle)
args.putString(KEY_SHARE_CONTENT, shareContent)
args.putString(KEY_SHARE_COVER, shareCover)
args.putString(KEY_SHARE_MINI_ID, miniId)
args.putString(KEY_SHARE_MINI_PATH, miniPath)
val fragment = ShareMeditationDialog()
fragment.arguments = args
......
......@@ -41,6 +41,7 @@ import com.ydl.view.ShareMeditationDialog;
import com.ydl.ydl_router.manager.YDLRouterManager;
import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.base.BaseApp;
import com.ydl.ydlcommon.bean.ShareData;
import com.ydl.ydlcommon.bean.StatusBarOptions;
import com.ydl.ydlcommon.event.MeditationEvent;
import com.ydl.ydlcommon.modular.ModularServiceManager;
......@@ -51,6 +52,7 @@ import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.NetWorkSpeedUtils;
import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.ydl.ydlcommon.utils.URLUtils;
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils;
import com.ydl.ydlcommon.utils.log.AliYunLogConfig;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlcommon.view.TitleBar;
......@@ -117,6 +119,11 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
protected String shareTitle;
protected String shareDesc;
private String cover;
private String miniId;
private String miniPath;
// 评价2.0新增字段 区分评价列表
private H5JsBean.H5JsCmd.Params paramsForCommentList;
private boolean isShareCommentList;
private boolean isDarkMode = false;
......@@ -520,6 +527,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
shareTitle = params.getShare().getTitle();
shareDesc = params.getShare().getDesc();
cover = params.getShare().getCover();
paramsForCommentList = params;
LogUtil.d("title: " + shareTitle + " url: " + shareUrl + " desc: " + shareDesc + " cover: " + cover);
new Handler(getMainLooper()).post(() -> initShareMenu());
}
......@@ -537,15 +545,17 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
shareTitle = params.getShare().getTitle();
shareDesc = params.getShare().getDesc();
cover = params.getShare().getCover();
miniId = params.getShare().getMinProgramId();
miniPath = params.getShare().getMinProgramPath();
isDarkMode = params.getShare().isDarkMode();
if(shareMeditationDialog == null){
if (shareMeditationDialog == null) {
shareMeditationDialog = ShareMeditationDialog.Companion.newInstance(isDarkMode,
shareUrl,shareTitle,shareDesc,cover);
shareUrl, shareTitle, shareDesc, cover, miniId, miniPath);
}
if (shareMeditationDialog!=null && !shareMeditationDialog.isAdded()){
shareMeditationDialog.show(getSupportFragmentManager(),"share_meditation");
if (shareMeditationDialog != null && !shareMeditationDialog.isAdded()) {
shareMeditationDialog.show(getSupportFragmentManager(), "share_meditation");
}
}else{
}else {
purl = params.getShare().getUrl();
shareUrl = params.getShare().getShare_url();
shareTitle = params.getShare().getTitle();
......@@ -1047,7 +1057,14 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private void initShareMenu() {
tb_title.setRightIcon(getResources().getDrawable(R.drawable.web_common_share));
tb_title.setOnRightTextClick((view, isActive) -> {
ShareData shareData = paramsForCommentList.getShare();
if (shareData != null && "commentList".equals(shareData.getType())) {
isShareCommentList = true;
ActionCountUtils.Companion.record("experts_comment_list_page", "comment_share_click");
share(shareData.getImageBase64(), paramsForCommentList);
} else {
share(null, null);
}
});
LogUtil.d("setSeccessful");
}
......@@ -1440,9 +1457,13 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
//如果未引入动态模块的话,隐藏分享至动态按钮
dialog = YDLShareDialog.Companion.style4(this, shareTitle, shareUrl, shareDesc, cover);
} else {
if (isShareCommentList){
dialog = YDLShareDialog.Companion.style7(this, shareTitle, shareUrl, shareDesc, cover, minPath, minId);
}else {
dialog = YDLShareDialog.Companion.style1(this, shareTitle, shareUrl, shareDesc, cover, minPath, minId);
}
}
}
dialog.setCallBack(type -> {
......
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