This commit is contained in:
2020-08-10 16:47:52 +08:00
3 changed files with 60 additions and 9 deletions

View File

@@ -234,7 +234,7 @@ export default {
count: 1,
sourceType: ['camera', 'album'],
success: function(res) {
self.src = res.tempFilePath;
that.src = res.tempFilePath;
const tempFilePaths = res.tempFilePath;
uni.uploadFile({
url: url, //仅为示例,非真实的接口地址
@@ -247,6 +247,7 @@ export default {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: uploadFileRes => {
console.log(uploadFileRes);
let obj = JSON.parse(uploadFileRes.data);
that.videopath = obj.data.url;
that.selectvideo = obj.data.key;