xiaoyelj hai 10 meses
pai
achega
19d02dc143
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/views/dgtmedicine/news/medicinenews/add.vue

+ 1 - 1
src/views/dgtmedicine/news/medicinenews/add.vue

@@ -96,7 +96,7 @@ const save = debounce(async () => {
 
 const submitGround = debounce(async () => {
     await formRef.value.validate();
-    const res = await addNews(form.value);
+    const res = form.value.id ? await editNews(form.value) : await addNews(form.value);
     if (res && res.code === 200) {
         await publishNews(res.data.id);
         router.go(-1);