|
|
|
@ -30,12 +30,19 @@ const uploadFile = function (filePath, successc, failc) { |
|
|
|
let fileTypeIndex = filePath.lastIndexOf('.'); |
|
|
|
let fileType = filePath.substring(fileTypeIndex); |
|
|
|
|
|
|
|
var accountInfo = wx.getAccountInfoSync(); |
|
|
|
var autoappid = accountInfo.miniProgram.appId; |
|
|
|
|
|
|
|
var uploadappid = autoappid || 'wxeb58570b5e04d147'; |
|
|
|
|
|
|
|
console.log('上次',uploadappid) |
|
|
|
|
|
|
|
uni.uploadFile({ |
|
|
|
url: url + url_a,//开发者服务器 url
|
|
|
|
filePath: filePath,//要上传文件资源的路径
|
|
|
|
name: 'image', |
|
|
|
header: { |
|
|
|
appid: 'wxb35ef055a4dd8ad4', |
|
|
|
appid: uploadappid, |
|
|
|
Authentication: uni.getStorageSync('userinfo').token |
|
|
|
}, |
|
|
|
|
|
|
|
|