19 08 2019
 _self = this;
uni.chooseImage({
	count: 1,
	sizeType: ['original', 'compressed'],
	sourceType: ['album'],
	success: function (res) {
		 const tempFilePaths = res.tempFilePaths;
			const uploadTask = uni.uploadFile({
			 url : _self.apiServer+'/wap/index/webupload',
			 filePath: tempFilePaths[0],
			 name: 'file',
			 formData: {
			  'user': 'test'
			 },
			 success: function (uploadFileRes) {
			  // console.log(uploadFileRes.data);
			  _self.photo=_self.apiServer+uploadFileRes.data;
			  console.log(_self.photo);
			 }
			});
	}
});
延伸阅读