<uni-file-picker file-mediatype="all" file-extname="pdf,png,jpg" @select="selectUpload" @delete="onDelete"></uni-file-picker>
// 获取上传状态
const selectUpload = (e) => {
uni.uploadFile({
url: import.meta.env.SHOPRO_UPLOAD_URL,
filePath: e.tempFilePaths[0],
name: 'file',
header: {
Authorization: 'Bearer ' + uni.getStorageSync('token'),
'tenant-id': uni.getStorageSync('tenantId'),
},
success: (res) => {},
fail: (err) => {}
})
}
const onDelete = (e) => {}