Browse Source

品种概况

xiaoyelj 10 tháng trước cách đây
mục cha
commit
19d02dc143
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);