| | |
| | | uni.chooseVideo({ |
| | | camera: 'back', |
| | | success: (res) => { |
| | | const videoExtensions = /\.(mp4|avi|rmvb)$/i; |
| | | if (!videoExtensions.test(res.name)) { |
| | | uni.showToast({ |
| | | title: '请上传mp4, avi, rmvb格式的视频', |
| | | icon: 'none', |
| | | duration: 3000 |
| | | }) |
| | | return |
| | | } |
| | | this.video.push('loading') |
| | | this.againCklicFlag = true |
| | | const tempFilePath = res.tempFilePath; |
| | |
| | | uni.chooseVideo({ |
| | | count: 9 - this.video.length, |
| | | success: (res) => { |
| | | const videoExtensions = /\.(mp4|avi|rmvb)$/i; |
| | | if (!videoExtensions.test(res.name)) { |
| | | uni.showToast({ |
| | | title: '请上传mp4, avi, rmvb格式的视频', |
| | | icon: 'none', |
| | | duration: 3000 |
| | | }) |
| | | return |
| | | } |
| | | this.video.push('loading') |
| | | const tempFilePath = res.tempFilePath; |
| | | uni.uploadFile({ |