|
@@ -15,11 +15,11 @@
|
|
|
<image :src="item.content" v-if="item.type == 'image'" @tap="onPreview(item.content)"
|
|
|
mode="widthFix">
|
|
|
</image>
|
|
|
- <view class="record" v-if="item.type == 'record'" @tap="onPlay(item.voice,index)">
|
|
|
+ <view class="record" v-if="item.type == 'record'" @tap="onPlay(item.content,index)">
|
|
|
<uni-icons v-if="item.speaker._id != user._id" custom-prefix="iconfont"
|
|
|
type="icon-zuobofang" size="15" color="#333333">
|
|
|
</uni-icons>
|
|
|
- <text class="voice">{{item.content}}</text>"
|
|
|
+ <text class="voice">{{item.voice}}</text>"
|
|
|
<uni-icons v-if="item.speaker._id == user._id" custom-prefix="iconfont"
|
|
|
type="icon-youbofang" size="15" color="#ffffff">
|
|
|
</uni-icons>
|
|
@@ -195,8 +195,8 @@
|
|
|
}
|
|
|
let mess = {
|
|
|
type: 'record',
|
|
|
- voice: res.tempFilePath,
|
|
|
- content: Math.round(res.duration / 1000), // 时长
|
|
|
+ voice: Math.round(res.duration / 1000), // 时长
|
|
|
+ content: res.tempFilePath,
|
|
|
time: new Date() - 0
|
|
|
}
|
|
|
// 写在上传回调内
|
|
@@ -240,10 +240,7 @@
|
|
|
}
|
|
|
let res = await that.$api(`/chat`, 'POST', data)
|
|
|
if (res.errcode == '0') {
|
|
|
- that.list.push({
|
|
|
- ...e,
|
|
|
- ...mess
|
|
|
- });
|
|
|
+ that.search()
|
|
|
that.$set(that, `isRecorder`, false);
|
|
|
that.poalast() // 定位消息最后一行
|
|
|
} else {
|