uni.uploadFile({
url: `${BASEURL}resource/oss/upload`,
filePath: tempImagePath,
name: 'file',
header: {
clientid: clientId,
Authorization: 'Bearer ' + units.token(),
'encrypt-key': encrypt(encryptBase64(aesKey))
},
success: (res) => {
console.log(res.data);
if (res.statusCode === 200) {
let d = JSON.parse(res.data.replace(/\ufeff/g, '') || '{}');
if (d.code === 200) {
const { url, ossId } = d.data;
imgList.value.unshift(url);
imgIds.value.unshift(ossId);
lock = false;
uni.hideLoading();
}
}
},
});
