Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_wxcp_app into dev
This commit is contained in:
@@ -97,7 +97,8 @@
|
|||||||
equipmentList: [],
|
equipmentList: [],
|
||||||
recordList: [],
|
recordList: [],
|
||||||
innerAudioContext: null,
|
innerAudioContext: null,
|
||||||
currIndex: -1
|
currIndex: -1,
|
||||||
|
broadcastId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -220,31 +221,47 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.time = '00:00:00'
|
this.time = '00:00:00'
|
||||||
// this.blobToDataURI(blob).then(res => {
|
|
||||||
// console.log(res, (window.URL || webkitURL).createObjectURL(blob), '时长:' + duration + 'ms')
|
|
||||||
// })
|
|
||||||
this.recordList.push({
|
|
||||||
src: (window.URL || webkitURL).createObjectURL(blob),
|
|
||||||
isPlay: false,
|
|
||||||
duration: (duration / 1000).toFixed(0)
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
let formData = {}
|
let formData = {}
|
||||||
formData = new FormData()
|
formData = new FormData()
|
||||||
formData.append('file', blob)
|
formData.append('file', new window.File([blob], `${(new Date).getTime()}` ))
|
||||||
|
|
||||||
|
this.$loading()
|
||||||
this.$http.post(`/app/appdlbresource/uploadDlbFile`, formData).then(res => {
|
this.$http.post(`/app/appdlbresource/uploadDlbFile`, formData).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post(`/app/appzyvideobroadcast/playrealtime`, {
|
||||||
|
mediaId: res.data.mediaId,
|
||||||
|
accessUrl: res.data.accessUrl,
|
||||||
|
messageLevel: 1,
|
||||||
|
taskType: 0,
|
||||||
|
coverageType: 4,
|
||||||
|
broadcastId: this.broadcastId || '',
|
||||||
|
serialNo: this.equipmentList.map(v => v.serialNo).join(',')
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$u.toast('播发成功')
|
||||||
|
this.recordList.push({
|
||||||
|
src: (window.URL || webkitURL).createObjectURL(blob),
|
||||||
|
isPlay: false,
|
||||||
|
duration: (duration / 1000).toFixed(0)
|
||||||
|
})
|
||||||
|
this.isShowRecord = true
|
||||||
|
}
|
||||||
|
this.isShow = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.isShow = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.isShow = false
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.isShow = false
|
||||||
})
|
})
|
||||||
this.isShowRecord = true
|
|
||||||
this.isShow = false
|
|
||||||
console.log(blob, (window.URL || webkitURL).createObjectURL(blob), '时长:' + duration + 'ms')
|
console.log(blob, (window.URL || webkitURL).createObjectURL(blob), '时长:' + duration + 'ms')
|
||||||
}, msg => {
|
}, msg => {
|
||||||
console.log('录音失败:' + msg)
|
console.log('录音失败:' + msg)
|
||||||
this.recorder.close()
|
this.recorder.close()
|
||||||
|
this.isShow = false
|
||||||
this.recorder = null
|
this.recorder = null
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -313,7 +330,7 @@
|
|||||||
transition: all ease 0.5s;
|
transition: all ease 0.5s;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
z-index: 1111111111111;
|
z-index: 111;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user