|
@@ -248,6 +248,7 @@ import {
|
|
|
opt = {};
|
|
|
opt.url = url;
|
|
|
}
|
|
|
+ let token = uni.getStorageSync('token')
|
|
|
let count = opt.count || 1,
|
|
|
sizeType = opt.sizeType || ['compressed'],
|
|
|
sourceType = opt.sourceType || ['album', 'camera'],
|
|
@@ -259,11 +260,13 @@ import {
|
|
|
sizeType: sizeType,
|
|
|
sourceType: sourceType,
|
|
|
success: function(res) {
|
|
|
- console.log()
|
|
|
+ console.log('----',res)
|
|
|
+ console.log('token',token)
|
|
|
|
|
|
uni.showLoading({
|
|
|
title: '图片上传中',
|
|
|
});
|
|
|
+ console.log('----url',HTTP_REQUEST_URL + '/api/' + uploadUrl)
|
|
|
uni.uploadFile({
|
|
|
url: HTTP_REQUEST_URL + '/api/' + uploadUrl,
|
|
|
filePath: res.tempFilePaths[0],
|
|
@@ -275,7 +278,7 @@ import {
|
|
|
|
|
|
"Content-Type": "multipart/form-data",
|
|
|
|
|
|
- [TOKENNAME]: 'Bearer ' + store.state.app.token
|
|
|
+ [TOKENNAME]: 'Bearer ' + token
|
|
|
},
|
|
|
success: function(res) {
|
|
|
uni.hideLoading();
|