发送消息的回执请求完善

This commit is contained in:
2022-02-28 16:52:37 +08:00
parent bce7822e51
commit 04d9d772c4
3 changed files with 54 additions and 22 deletions

View File

@@ -5,9 +5,11 @@
<view class="">
<view class="name" v-if="isGroup && isRemote">{{ contact(message.senderUserId).name }}</view>
<view class="location" :class="isRemote ? 'left': 'right'" @click="showLocation">
{{ content.customFields.name }}
{{ content.customFields.thumbnail }}
<!-- 缩略图在考虑是否要通过截图后自动截屏来操作 -->
<view class="location--name">
{{ content.customFields.name }}
{{ content.customFields.address }}
</view>
<image class="map" :src="content.customFields.thumbnail" />
</view>
</view>
</view>
@@ -48,8 +50,16 @@
},
methods: {
showLocation() {
console.log(this.content.customFields.longitude, this.content.customFields.latitude)
uni.openLocation({
latitude: Number(this.content.customFields.latitude),
longitude: Number(this.content.customFields.longitude),
fail: (err) => {
uni.showToast({
icon: 'none',
title: '打开地图失败'
})
}
})
}
}
}
@@ -66,20 +76,27 @@
}
.location {
.image {
width: 180rpx;
position: relative;
width: 400rpx;
background: #FFFFFF;
padding: 10rpx;
.location--name {
overflow: hidden;
word-break: break-all;
}
.map {
width: 400rpx;
height: 200rpx;
}
&.left {
.image {
border-radius: 0 10rpx 10rpx 10rpx;
}
border-radius: 0 10rpx 10rpx 10rpx;
}
&.right {
.image {
border-radius: 10rpx 0 10rpx 10rpx;
}
border-radius: 10rpx 0 10rpx 10rpx;
}
}
}