zs 6 月之前
父節點
當前提交
725f987600
共有 2 個文件被更改,包括 8 次插入2 次删除
  1. 4 1
      src/views/center/parts/company.vue
  2. 4 1
      src/views/center/parts/expert.vue

+ 4 - 1
src/views/center/parts/company.vue

@@ -317,7 +317,10 @@ onMounted(async () => {
 const search = async () => {
   if (user.value.id) {
     let res = await companyStore.query({ user: user.value.id })
-    if (res.errcode == '0') form.value = res.data[0] || { logo: [] }
+    if (res.errcode == '0') {
+      form.value = res.data[0] || { logo: [] }
+      if (!res.data[0].logo) form.value.logo = []
+    }
   }
 }
 const handleClick = async (event) => {

+ 4 - 1
src/views/center/parts/expert.vue

@@ -159,7 +159,10 @@ onMounted(async () => {
 const search = async () => {
   if (user.value.id) {
     let res = await expertStore.query({ user: user.value.id })
-    if (res.errcode == '0') form.value = res.data[0] || { icon: [] }
+    if (res.errcode == '0') {
+      form.value = res.data[0] || { icon: [] }
+      if (!res.data[0].icon) form.value.icon = []
+    }
   }
 }
 </script>