This commit is contained in:
cmxdd
2020-08-10 16:55:34 +08:00
5 changed files with 179 additions and 9 deletions

View File

@@ -237,7 +237,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, //仅为示例,非真实的接口地址
@@ -250,6 +250,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;