Browse Source

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

lifanagju_citu 7 tháng trước cách đây
mục cha
commit
d38f4875cd

+ 6 - 1
src/views/recruit/enterprise/entInfoSetting/informationSettingsComponents/enterpriseAlbum.vue

@@ -47,6 +47,8 @@ import { useI18n } from '@/hooks/web/useI18n'
 import { getEnterpriseBaseInfo, updateEnterpriseAlbum } from '@/api/enterprise'
 import Snackbar from '@/plugins/snackbar'
 import Confirm from '@/plugins/confirm'
+import cloneDeep from 'lodash/cloneDeep'
+
 const emit = defineEmits(['complete'])
 
 const { t } = useI18n()
@@ -78,10 +80,13 @@ const handleClick = (index) => {
 const handleDelete = async (url) => {
   const index = imgList.value.indexOf(url)
   if (index === -1) return
+  const albumList = cloneDeep(imgList.value)
+  albumList.splice(index, 1)
   Confirm('系统提示', '是否确认删除?').then(async () => {
-    await updateEnterpriseAlbum({ albumList: imgList.value })
+    await updateEnterpriseAlbum({ albumList })
     Snackbar.success('删除成功')
     imgList.value.splice(index, 1)
+    getInfo()
   })
 }