let submit = {
logonName: "",
entity: "",
}
let uploadUrl = common.serverUrl + "njdtXz/mobile-nfc/assistSave";
let tempFilePath = this.item;
console.log(uploadUrl)
console.log(tempFilePath)
let token=this.userInfo.access_token;
uni.uploadFile({
url: uploadUrl,
filePath: tempFilePath,
header: {
// "Cookie":"Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoieWFuZ195NCIsInVzZXJfa2V5IjoiMDg4N2M2MTgtNzM3ZS00MGQ1LThkMmQtZmYwMzI0OTRlOWRlIiwidXNlcm5hbWUiOiLmnajmtIsifQ.4HKBEKaHSwaz-ojv9tL4lagxMETFP2IQKyewrJScHzom7Hv6Ugeni8SHrEKYcMvRgl7XAhYB-yRKqex0YcMfOw; Admin-Expires-In=720; systemType=zf",
"Authorization": "Bearer " + token
},
name: 'file',
formData: submit,
success: function(res) {
var tmpData = JSON.parse(res.data);
console.log('上传文件返回数据:', tmpData)
// 根据个人需求返回相关数据
if (tmpData.code == 200) {
uni.showToast({
title: "提交成功!",
icon: 'none'
})
uni.navigateBack({
delta: 1
})
// resolve(tmpData.data.pic_path);
} else {
uni.showToast({
title: "提交失败!" + tmpData.code,
icon: 'none'
})
// reject("error");
}
}
});