提交 56aca6b4 authored 作者: 杨斌基's avatar 杨斌基

feat(上报内容): 选择照片方式从接口获取

上级 a55aa094
......@@ -493,6 +493,12 @@ const numberPlateMap = new Map([
['6', '普通摩托车(黄底黑字)']
])
const uploadSourceTypeMap = {
1: ['camera', 'album'],
2: ['camera'],
3: ['album']
}
export default {
components: { CertificateTypeActionSheet, UploadActionSheet },
data() {
......@@ -840,12 +846,15 @@ export default {
}
};
const { activeItem } = this
switch (item.type) {
case 'image':
if (this.isAllowUploadImages && this.uploadedImages.length === mustUploadImageCount) {
return uni.$u.toast(`照片只能上传 ${mustUploadImageCount} `)
}
uni.chooseImage({
sourceType: uploadSourceTypeMap[activeItem.upload_mode],
success: (result) => {
result.tempFiles.forEach((value, index) => {
upLoad(value, undefined, result.tempFilePaths[index]);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论