30170
This commit is contained in:
@@ -16,10 +16,12 @@
|
|||||||
<scroll-view scroll-y class="record-wrapper">
|
<scroll-view scroll-y class="record-wrapper">
|
||||||
<div class="record-item" v-for="(item, index) in recordList" :key="index">
|
<div class="record-item" v-for="(item, index) in recordList" :key="index">
|
||||||
<image :src="user.avatar" />
|
<image :src="user.avatar" />
|
||||||
<div class="right" :style="{width: item.duration + '%'}">
|
<div class="right-wrapper">
|
||||||
<image mode="aspectFit" @click="play(item.src, index)" v-if="!item.isPlay" src="./img/voice-icon.png" />
|
<div class="right" :style="{width: 'calc(83px + ' + (item.duration / 2) + '%)'}">
|
||||||
<image v-else @click="play(item.src, index)" src="./img/voice.gif" />
|
<image mode="aspectFit" @click="play(item.src, index)" v-if="!item.isPlay" src="./img/voice-icon.png" />
|
||||||
<span>{{ item.duration }}"</span>
|
<image v-else @click="play(item.src, index)" src="./img/voice.gif" />
|
||||||
|
<span>{{ item.duration }}"</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -147,7 +149,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
onLongtap () {
|
onLongtap () {
|
||||||
if (!this.equipmentList.length) {
|
if (!this.equipmentList.length) {
|
||||||
return this.$u.toast('请选择播发设备')
|
// return this.$u.toast('请选择播发设备')
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isImpact = false
|
this.isImpact = false
|
||||||
@@ -240,6 +242,14 @@
|
|||||||
let formData = {}
|
let formData = {}
|
||||||
formData = new FormData()
|
formData = new FormData()
|
||||||
formData.append('file', new window.File([blob], `${(new Date).getTime()}` ))
|
formData.append('file', new window.File([blob], `${(new Date).getTime()}` ))
|
||||||
|
this.$u.toast('播发成功')
|
||||||
|
this.recordList.push({
|
||||||
|
src: (window.URL || webkitURL).createObjectURL(blob),
|
||||||
|
isPlay: false,
|
||||||
|
duration: (duration / 1000).toFixed(0)
|
||||||
|
})
|
||||||
|
this.isShowRecord = true
|
||||||
|
return
|
||||||
|
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$http.post(`/app/appdlbresource/uploadDlbFile`, formData).then(res => {
|
this.$http.post(`/app/appdlbresource/uploadDlbFile`, formData).then(res => {
|
||||||
@@ -520,6 +530,11 @@
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right-wrapper {
|
||||||
|
// flex: 1;
|
||||||
|
width: calc(100% - 102px);
|
||||||
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -530,6 +545,7 @@
|
|||||||
min-width: 160px;
|
min-width: 160px;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
background: #C0DAFF;
|
background: #C0DAFF;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
Reference in New Issue
Block a user