This commit is contained in:
cansnow
2026-01-01 04:15:30 +08:00
parent 09c7889525
commit 78386d4cc1
75 changed files with 1995 additions and 1715 deletions
@@ -21,8 +21,9 @@
src="/static/images/sync_error.png">
</u--image>
<u--text class="address" :style="{
width:selfWidth+'px'
}" :lines="1" :size="20" :text="desc"></u--text>
width:selfWidth+'px',
paddingTop:'5px'
}" :lines="1" :size="16" :text="desc"></u--text>
</view>
</template>
@@ -38,7 +39,6 @@
data() {
return {
selfWidth:200,
loadingWidth: "200px",
src:"",
coverDownloading:false,
coverDownloadProgress:"",
@@ -48,12 +48,13 @@
};
},
created() {
this.selfWidth = uni.$u.getPx('400rpx');
let loc = this.message.locationElem;
this.desc = loc.description;
this.apisrc = "http://api.tianditu.gov.cn/staticimage?"
+"center="+loc.longitude+","+loc.latitude
+"&width=400"
+"&height=300"
+"&height=250"
+"&zoom=10"
+"&markers="+loc.longitude+","+loc.latitude
+"&tk=5255a4be64441ba9fa2ebe605ca472bf";
@@ -94,7 +95,6 @@
})
},
onLoaded() {
this.loadingWidth = "auto";
},
},
@@ -104,7 +104,6 @@
<style lang="scss" scoped>
.location_message_container{
.address{
margin-top: 20rpx;
}
}
</style>
@@ -0,0 +1,44 @@
<template>
<view class="text_message_container bg_container" v-if="notification.contentType == 101">
<u-parse :content="getContent" :previewImg="false" :showImgMenu="false" selectable></u-parse>
</view>
</template>
<script>
import {parseBr} from "@/util/common";
export default {
name: "NotificationRender",
components: {
},
props: {
message: Object,
conversationID:String,
isSender:Boolean
},
computed:{
notification(){
const body = JSON.parse(this.message.notificationElem.detail);
body.data = JSON.parse(body.data);
return body.data;
},
getContent() {
return parseBr(this.notification.textElem?.content);
}
},
data() {
return {
content:"",
};
},
mounted() {
},
methods: {
onMessageEvent(e){
this.$emit('onMessageEvent',e);
}
},
};
</script>
<style lang="scss" scoped></style>
@@ -54,7 +54,7 @@
"videoType": "mp4",
"videoSize": 3751005,
"duration": 44,
"snapshotPath": "/storage/emulated/0/Android/data/hk.huisheng.im/apps/__UNI__CA458BA/doc/video_cover_2ea1c8ec.jpg",
"snapshotPath": "/storage/emulated/0/Android/data/hk.huisheng.im/apps/__UNI__E41111F/doc/video_cover_2ea1c8ec.jpg",
"snapshotSize": 36974,
"snapshotUrl": "http://www.axzc.xyz/object/100003/msg_videoSnapshot_d9a596f3e665e84559821a8aa5fb9f16.jpg",
"snapshotWidth": 1087,
@@ -116,8 +116,11 @@
},
methods: {
async init(){
const snapshotUrl = this.message?.videoElem?.snapshotUrl;
const self = this;
console.log(this.message?.videoElem);
const snapshotUrl = this.message?.videoElem?.snapshotPath || this.message?.videoElem?.snapshotUrl;
self.coverDownloading = true;
console.log(snapshotUrl);
util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{
self.coverDownloading = false;
self.src = fn;
@@ -57,6 +57,7 @@
import MarkdownMessageRender from "./MarkdownMessageRender";
import StreamMessageRender from "./StreamMessageRender";
import OANotificationRender from "./OANotificationRender";
import NotificationRender from "./NotificationRender";
import ErrorMessageRender from "./ErrorMessageRender";
import {noticeMessageTypes} from "@/constant";
@@ -82,6 +83,7 @@
MarkdownMessageRender,
StreamMessageRender,
OANotificationRender,
NotificationRender,
ErrorMessageRender
},
props: {
@@ -173,7 +175,8 @@
['type_'+MessageType.FaceMessage] : "FaceMessageRender",
['type_'+MessageType.MarkdownMessage] : "MarkdownMessageRender",
['type_'+MessageType.StreamMessage] : "StreamMessageRender",
['type_'+MessageType.OANotification] : "OANotificationRender"
['type_'+MessageType.OANotification] : "OANotificationRender",
'type_2001' : "NotificationRender"
};
this.component = MsgType2Components['type_'+this.source.contentType] || "ErrorMessageRender";
this.$emit('userEvent',{type:"messageItemRender"},this.source.clientMsgID);