@@ -462,7 +462,11 @@ async function uploadMemberCard(file, field) {
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
})
|
||||
if (res.code === 0) {
|
||||
currentMember.value[field] = res.data?.[field] || ''
|
||||
const newPath = res.data?.[field] || ''
|
||||
currentMember.value[field] = newPath
|
||||
// 同步列表卡片上的预览,避免仍显示旧路径
|
||||
const hit = memberList.value.find((m) => m.huiyuan_id === currentMember.value.huiyuan_id)
|
||||
if (hit) hit[field] = newPath
|
||||
ElMessage.success('上传成功')
|
||||
} else {
|
||||
ElMessage.error(res.msg || '上传失败')
|
||||
|
||||
Reference in New Issue
Block a user