Commit a40fee19 by honghong

音频判断

parent 01c69967
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<!-- <view>{{getTime(Math.round(currentTime))}}</view> --> <!-- <view>{{getTime(Math.round(currentTime))}}</view> -->
</view> </view>
<view>{{getTime(Math.round(currentTime))}}</view> <view>{{getTime(Math.round(currentTime))}}</view>
<view @click="handleIconDel" v-show="isDel"> <view @click="handleIconDel">
<u-icon name="close-circle-fill" color="#D9001B" size="32"></u-icon> <u-icon name="close-circle-fill" color="#D9001B" size="32"></u-icon>
</view> </view>
</view> </view>
......
...@@ -65,15 +65,20 @@ ...@@ -65,15 +65,20 @@
<view class="form-item-name">上传视频</view> <view class="form-item-name">上传视频</view>
</view> </view>
<view class=""> <view class="">
<comUpload v-model="formInfo.videoList" @getVal="getVideoList" ref="videoRef" <video class="video-box" v-if="formInfo.videoList.length" id="myVideo"
:acceptType="acceptType" :multiple="isMultiple"></comUpload> :src="formInfo.videoList[0].url"
@error="videoErrorCallback" :danmu-list="danmuList" enable-danmu controls
:show-fullscreen-btn='false'></video>
<comUpload v-else :afterWidth="350" v-model="formInfo.videoList" @getVal="getVideoList" ref="videoRef"
:acceptType="acceptType" :maxCount="1" :multiple="isMultiple"></comUpload>
</view> </view>
</view> </view>
<view> <view>
<view class="d-flex j-sb a-center form-item-height-only"> <view class="d-flex j-sb a-center form-item-height-only">
<view class="form-item-name">语音描述</view> <view class="form-item-name">语音描述</view>
</view> </view>
<view v-if="formInfo.voiceList" class="paddding-x-three margin-y-two"> <view v-if="formInfo.voiceList.length" class="">
<free-audio startPic='../../static/play.png' endPic='../../static/stop.png' <free-audio startPic='../../static/play.png' endPic='../../static/stop.png'
audioId='audio1' :url='formInfo.voiceList[0].url' @delete="handleDelete"></free-audio> audioId='audio1' :url='formInfo.voiceList[0].url' @delete="handleDelete"></free-audio>
</view> </view>
...@@ -222,6 +227,7 @@ ...@@ -222,6 +227,7 @@
// 上传音频事件 // 上传音频事件
getVoiceList(data) { getVoiceList(data) {
let that = this let that = this
that.showPopup = false
console.log(data, '有的哈桑') console.log(data, '有的哈桑')
let voiceList = [] let voiceList = []
voiceList.push({ voiceList.push({
...@@ -302,6 +308,8 @@ ...@@ -302,6 +308,8 @@
// 删除语音 // 删除语音
handleDelete() { handleDelete() {
console.log('删除') console.log('删除')
let that = this
that.formInfo.voiceList.splice(0,1)
// const recorderManager = uni.getRecorderManager() // const recorderManager = uni.getRecorderManager()
// console.log(recorderManager,'大数据可能') // console.log(recorderManager,'大数据可能')
}, },
...@@ -330,19 +338,6 @@ ...@@ -330,19 +338,6 @@
pictureList: [], //图片 pictureList: [], //图片
videoList: [], //视频 videoList: [], //视频
voiceList: [], //音频 voiceList: [], //音频
// {
// url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3',
// fileType: 'voice'
// }
// fileVos:[
// {
// url:'https://img1.baidu.com/it/u=567782244,1695500002&fm=253&fmt=auto&app=138&f=JPEG?w=753&h=500',//地址
// fileType:'picture',//文件类型video
// },
// ],
// id:null,
userId: 1, //用户id
} }
} }
} }
...@@ -361,6 +356,10 @@ ...@@ -361,6 +356,10 @@
} }
} }
} }
.video-box{
width:373rpx;
height:210rpx;
}
@import url("@/css/form.css"); @import url("@/css/form.css");
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="index"> <view class="index">
<u-upload :fileList="fileList1" name="1" @afterRead="afterRead" @delete="deletePic" :multiple="multiple" <u-upload :fileList="fileList1" name="1" @afterRead="afterRead" @delete="deletePic" :multiple="multiple"
:maxCount="5" width="210" height="210" :accept="acceptType"> :maxCount="maxCount" :width="afterWidth" :height="afterHeight" :accept="acceptType" :compressed="false">
<view class="index-upload d-flex j-center a-center"> <view class="index-upload d-flex j-center a-center">
<image v-if="imgType === 'camera'" src="@/static/icon/camera.png" mode="widthFix"></image> <image v-if="imgType === 'camera'" src="@/static/icon/camera.png" mode="widthFix"></image>
<view class="index-upload-tlo d-flex flex-wrap j-center" v-else-if="imgType === 'cross'"> <view class="index-upload-tlo d-flex flex-wrap j-center" v-else-if="imgType === 'cross'">
...@@ -38,6 +38,18 @@ ...@@ -38,6 +38,18 @@
value: { value: {
typr: Array, typr: Array,
default: () => [] default: () => []
},
maxCount:{
type: Number,
default: 9
},
afterWidth:{
type: Number,
default: 210
},
afterHeight:{
type: Number,
default: 210
} }
}, },
data() { data() {
......
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
<view class=""> <view class="">
上传视频 上传视频
</view> </view>
<view v-for="(v ,index) in 2" :key="index"> <view v-for="(v ,index) in detailData.videoList" :key="index">
<video id="myVideo" <video id="myVideo"
src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4" :src="v.url"
@error="videoErrorCallback" :danmu-list="danmuList" enable-danmu controls @error="videoErrorCallback" :danmu-list="danmuList" enable-danmu controls
:show-fullscreen-btn='false'></video> :show-fullscreen-btn='false'></video>
</view> </view>
...@@ -47,8 +47,10 @@ ...@@ -47,8 +47,10 @@
<view class=""> <view class="">
语音描述 语音描述
</view> </view>
<view class="content-voice-audio"> <!-- class="content-voice-audio" -->
<view class="margin-y-two">
<free-audio startPic='../../static/play.png' endPic='../../static/stop.png'
audioId='audio1' :url='detailData.voiceList[0].url'></free-audio>
</view> </view>
</view> </view>
<view class="content-remarks"> <view class="content-remarks">
...@@ -87,8 +89,12 @@ ...@@ -87,8 +89,12 @@
import { import {
orderDetailMsgNew orderDetailMsgNew
} from '../../api/system/index.js' } from '../../api/system/index.js'
import freeAudio from '@/components/chengpeng-audio/free-audio.vue'
import apiBaseConfig from '@/config/index.js'; import apiBaseConfig from '@/config/index.js';
export default { export default {
components: {
freeAudio,
},
data() { data() {
return { return {
imgBgUrl: apiBaseConfig.imgBgUrl, imgBgUrl: apiBaseConfig.imgBgUrl,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment