发送消息的回执请求完善
This commit is contained in:
@@ -132,7 +132,8 @@
|
||||
break;
|
||||
case 'location':
|
||||
uni.chooseLocation({
|
||||
success: (location) => {
|
||||
success: (location) => {
|
||||
console.log(location);
|
||||
im.sentLocation(this.conversationType, this.targetId, location).then(() => {
|
||||
this.success()
|
||||
})
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user