|
@@ -40,7 +40,8 @@
|
|
|
:class="[
|
|
|
'blink',
|
|
|
'message-body-content',
|
|
|
- message.flow === 'out' ? 'content-out' : 'content-in',
|
|
|
+ messageClass(message),
|
|
|
+
|
|
|
message.hasRiskContent && 'content-has-risk',
|
|
|
isNoPadding ? 'content-no-padding' : '',
|
|
|
isNoPadding && isBlink ? 'blink-shadow' : '',
|
|
@@ -66,6 +67,7 @@
|
|
|
{{ riskContentText }}
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
<!-- audio unplay mark -->
|
|
|
<div v-if="isDisplayUnplayMark" class="audio-unplay-mark" />
|
|
|
<!-- Fail Icon -->
|
|
@@ -137,7 +139,8 @@ import RadioSelect from "../../../common/RadioSelect/index.vue";
|
|
|
import loadingIcon from "../../../../assets/icon/loading.png";
|
|
|
import { shallowCopyMessage } from "../../utils/utils";
|
|
|
import { isPC } from "../../../../utils/env";
|
|
|
-
|
|
|
+import { watchEffect, ref } from "../../../../adapter-vue";
|
|
|
+import { isUrl, JSONToObject } from "../../../../utils/index";
|
|
|
interface IProps {
|
|
|
messageItem: IMessageModel;
|
|
|
content?: any;
|
|
@@ -161,6 +164,28 @@ interface IEmits {
|
|
|
}
|
|
|
|
|
|
const emits = defineEmits<IEmits>();
|
|
|
+const isCustom = ref();
|
|
|
+watchEffect(() => {
|
|
|
+ const { payload } = props.messageItem;
|
|
|
+ isCustom.value = payload.data || "";
|
|
|
+ isCustom.value = JSONToObject(payload.data);
|
|
|
+});
|
|
|
+function messageClass(message) {
|
|
|
+ let businessId = message._message.payload.data
|
|
|
+ ? JSON.parse(message._message.payload.data).businessID
|
|
|
+ : "";
|
|
|
+ console.log(businessId);
|
|
|
+
|
|
|
+ if (message.flow === "out" && businessId != "red_envelope_message") {
|
|
|
+ return "content-out";
|
|
|
+ } else if (message.flow === "in" && businessId != "red_envelope_message") {
|
|
|
+ return "content-in";
|
|
|
+ } else if (message.flow === "out" && businessId == "red_envelope_message") {
|
|
|
+ return "contentCustom-out";
|
|
|
+ } else if (message.flow === "in" && businessId == "red_envelope_message") {
|
|
|
+ return "contentCustom-in";
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
const props = withDefaults(defineProps<IProps>(), {
|
|
|
isAudioPlayed: false,
|
|
@@ -258,6 +283,16 @@ function openReadUserPanel() {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.contentCustom-in {
|
|
|
+ height: 100px;
|
|
|
+ // background: linear-gradient(225deg, #f74d30 0%, #ff7633 100%);
|
|
|
+ background: url("../../../../../static/img/hbbj.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ padding: 16px 20px !important;
|
|
|
+ display: block !important;
|
|
|
+ box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(226, 226, 226, 0.23);
|
|
|
+ border-radius: 0px 20px 20px 20px;
|
|
|
+}
|
|
|
:not(not) {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|